3v4l.org

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

Function %00lorem%5Cipsum%5C%7Bclosure%7D%2Fin%2FfRR7j%3A9%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fRR7j
function name:  lorem\ipsum\{closure}
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   INIT_STATIC_METHOD_CALL                                  'bar'
          1        DO_FCALL                                      0  $0      
          2      > RETURN                                                   $0
   11     3*     > RETURN                                                   null

End of function %00lorem%5Cipsum%5C%7Bclosure%7D%2Fin%2FfRR7j%3A9%240

Class lorem\ipsum\Foo:
Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fRR7j
function name:  bar
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E > > RETURN                                                   'lorem%5Cipsum%5CFoo%3A%3Abar'
    7     1*     > RETURN                                                   null

End of function bar

Function lol:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fRR7j
function name:  lol
number of ops:  6
compiled vars:  !0 = $func
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   DECLARE_LAMBDA_FUNCTION                                  '%00lorem%5Cipsum%5C%7Bclosure%7D%2Fin%2FfRR7j%3A9%240'
          1        ASSIGN                                                   !0, ~1
   12     2        INIT_DYNAMIC_CALL                                        !0
          3        DO_FCALL                                      0  $3      
          4      > RETURN                                                   $3
   13     5*     > RETURN                                                   null

End of function lol

End of class lorem\ipsum\Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.65 ms | 1400 KiB | 15 Q