3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Name; function Boo() { var_dump('func:', __FUNCTION__, __METHOD__); } class Foo { public static function method () {var_dump('method:', __FUNCTION__, __METHOD__);call_user_func(function () { var_dump('closure:', __FUNCTION__, __METHOD__); }); } } Boo(); Foo::method(); var_dump(__METHOD__);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JaXtX
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%5CBoo'
          1        DO_FCALL                                      0          
   12     2        INIT_STATIC_METHOD_CALL                                  'Name%5CFoo', 'method'
          3        DO_FCALL                                      0          
   13     4        INIT_NS_FCALL_BY_NAME                                    'Name%5Cvar_dump'
          5        SEND_VAL_EX                                              ''
          6        DO_FCALL                                      0          
          7      > RETURN                                                   1

Function name%5Cboo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JaXtX
function name:  Name\Boo
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   INIT_NS_FCALL_BY_NAME                                    'Name%5Cvar_dump'
          1        SEND_VAL_EX                                              'func%3A'
          2        SEND_VAL_EX                                              'Name%5CBoo'
          3        SEND_VAL_EX                                              'Name%5CBoo'
          4        DO_FCALL                                      0          
    6     5      > RETURN                                                   null

End of function name%5Cboo

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

End of function %00name%5C%7Bclosure%7D%2Fin%2FJaXtX%3A8%240

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

End of function method

End of class Name\Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.17 ms | 1407 KiB | 18 Q