3v4l.org

run code in 300+ PHP versions simultaneously
<?php class X { static function foo() {} } class Y extends X {} fb_intercept("Y::x", function($name) { var_dump($name, debug_backtrace()); }); Y::foo();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Qr268
function name:  (null)
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    1     0  E >   INIT_FCALL_BY_NAME                                       'fb_intercept'
          1        SEND_VAL_EX                                              'Y%3A%3Ax'
          2        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FQr268%3A1%240'
          3        SEND_VAL_EX                                              ~0
          4        DO_FCALL                                      0          
          5        INIT_STATIC_METHOD_CALL                                  'Y', 'foo'
          6        DO_FCALL                                      0          
          7      > RETURN                                                   1

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

End of function %00%7Bclosure%7D%2Fin%2FQr268%3A1%240

Class X:
Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Qr268
function name:  foo
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
          0  E > > RETURN                                                   null

End of function foo

End of class X.

Class Y:
Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Qr268
function name:  foo
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
          0  E > > RETURN                                                   null

End of function foo

End of class Y.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.9 ms | 1388 KiB | 17 Q