3v4l.org

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

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

End of function %00%7Bclosure%7D%2Fin%2FicZar%3A6%240

Class Foo:
Function baz:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/icZar
function name:  baz
number of ops:  9
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   INIT_FCALL                                               'var_dump'
          1        GET_CALLED_CLASS                                 ~1      
          2        SEND_VAL                                                 ~1
          3        DO_ICALL                                                 
    6     4        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FicZar%3A6%240'
          5        ASSIGN                                                   !0, ~3
   10     6        INIT_DYNAMIC_CALL                                        !0
          7        DO_FCALL                                      0          
   11     8      > RETURN                                                   null

End of function baz

End of class Foo.

Class Bar:
Function baz:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/icZar
function name:  baz
number of ops:  9
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   INIT_FCALL                                               'var_dump'
          1        GET_CALLED_CLASS                                 ~1      
          2        SEND_VAL                                                 ~1
          3        DO_ICALL                                                 
    6     4        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FicZar%3A6%240'
          5        ASSIGN                                                   !0, ~3
   10     6        INIT_DYNAMIC_CALL                                        !0
          7        DO_FCALL                                      0          
   11     8      > RETURN                                                   null

End of function baz

End of class Bar.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.88 ms | 1388 KiB | 15 Q