3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Name_space; class Foo { public static function bar () { call_user_func(function () {var_dump(__FUNCTION__);}); return new \ReflectionFunction(function () {}); } } var_dump(Foo::bar()->getName());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mJXLc
function name:  (null)
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   INIT_NS_FCALL_BY_NAME                                    'Name_space%5Cvar_dump'
          1        INIT_STATIC_METHOD_CALL                                  'Name_space%5CFoo', 'bar'
          2        DO_FCALL                                      0  $0      
          3        INIT_METHOD_CALL                                         $0, 'getName'
          4        DO_FCALL                                      0  $1      
          5        SEND_VAR_NO_REF_EX                                       $1
          6        DO_FCALL                                      0          
          7      > RETURN                                                   1

Function %00name_space%5C%7Bclosure%7D%2Fin%2FmJXLc%3A7%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mJXLc
function name:  Name_space\{closure}
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   INIT_NS_FCALL_BY_NAME                                    'Name_space%5Cvar_dump'
          1        SEND_VAL_EX                                              'Name_space%5C%7Bclosure%7D'
          2        DO_FCALL                                      0          
          3      > RETURN                                                   null

End of function %00name_space%5C%7Bclosure%7D%2Fin%2FmJXLc%3A7%240

Function %00name_space%5C%7Bclosure%7D%2Fin%2FmJXLc%3A8%241:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mJXLc
function name:  Name_space\{closure}
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E > > RETURN                                                   null

End of function %00name_space%5C%7Bclosure%7D%2Fin%2FmJXLc%3A8%241

Class Name_space\Foo:
Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mJXLc
function name:  bar
number of ops:  10
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   INIT_NS_FCALL_BY_NAME                                    'Name_space%5Ccall_user_func'
          1        DECLARE_LAMBDA_FUNCTION                                  '%00name_space%5C%7Bclosure%7D%2Fin%2FmJXLc%3A7%240'
          2        SEND_VAL_EX                                              ~0
          3        DO_FCALL                                      0          
    8     4        NEW                                              $2      'ReflectionFunction'
          5        DECLARE_LAMBDA_FUNCTION                                  '%00name_space%5C%7Bclosure%7D%2Fin%2FmJXLc%3A8%241'
          6        SEND_VAL_EX                                              ~3
          7        DO_FCALL                                      0          
          8      > RETURN                                                   $2
    9     9*     > RETURN                                                   null

End of function bar

End of class Name_space\Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.56 ms | 1396 KiB | 17 Q