3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public static function blah() { $foo = function(){ var_dump(get_called_class()); }; $foo(); } } class Bar extends Foo { } Bar::blah();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/i1Eud
function name:  (null)
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   INIT_STATIC_METHOD_CALL                                  'Bar', 'blah'
          1        DO_FCALL                                      0          
          2      > RETURN                                                   1

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

End of function %00%7Bclosure%7D%2Fin%2Fi1Eud%3A8%240

Class Foo:
Function blah:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/i1Eud
function name:  blah
number of ops:  5
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2Fi1Eud%3A8%240'
          1        ASSIGN                                                   !0, ~1
   12     2        INIT_DYNAMIC_CALL                                        !0
          3        DO_FCALL                                      0          
   13     4      > RETURN                                                   null

End of function blah

End of class Foo.

Class Bar:
Function blah:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/i1Eud
function name:  blah
number of ops:  5
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2Fi1Eud%3A8%240'
          1        ASSIGN                                                   !0, ~1
   12     2        INIT_DYNAMIC_CALL                                        !0
          3        DO_FCALL                                      0          
   13     4      > RETURN                                                   null

End of function blah

End of class Bar.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.78 ms | 1396 KiB | 15 Q