3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Name_space; class Foo { public static function bar () { 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/JZHgL
function name:  (null)
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     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%2FJZHgL%3A7%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JZHgL
function name:  Name_space\{closure}
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E > > RETURN                                                   null

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

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

End of function bar

End of class Name_space\Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.49 ms | 1395 KiB | 15 Q