3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { function __toString() { return "me"; } } $me = function () { var_dump(func_get_args()); }; $test = new Test(); $$test("Hello");
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4F12p
function name:  (null)
number of ops:  11
compiled vars:  !0 = $me, !1 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_CLASS                                            'test'
   10     1        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F4F12p%3A10%241'
          2        ASSIGN                                                   !0, ~2
   14     3        NEW                                              $4      'Test'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !1, $4
   15     6        FETCH_R                      local               ~7      !1
          7        INIT_DYNAMIC_CALL                                        ~7
          8        SEND_VAL_EX                                              'Hello'
          9        DO_FCALL                                      0          
         10      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2F4F12p%3A10%241:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4F12p
function name:  {closure}
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   INIT_FCALL                                               'var_dump'
          1        FUNC_GET_ARGS                                    ~0      
          2        SEND_VAL                                                 ~0
          3        DO_ICALL                                                 
   12     4      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2F4F12p%3A10%241

Class Test:
Function __tostring:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4F12p
function name:  __toString
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E > > RETURN                                                   'me'
    7     1*       VERIFY_RETURN_TYPE                                       
          2*     > RETURN                                                   null

End of function __tostring

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.7 ms | 1395 KiB | 15 Q