3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public static function bar() { call_user_func_array('self::baz', []); } public static function baz() { die('failed'); } } class Bar { public static function baz() { die('Worked!'); } } Bar::bar();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qe1ZJ
function name:  (null)
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   28     0  E >   INIT_STATIC_METHOD_CALL                                  'Bar', 'bar'
          1        DO_FCALL                                      0          
          2      > RETURN                                                   1

Class Foo:
Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qe1ZJ
function name:  bar
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   INIT_USER_CALL                                0          'call_user_func_array', 'self%3A%3Abaz'
          1        SEND_ARRAY                                               <array>
          2        CHECK_UNDEF_ARGS                                         
          3        DO_FCALL                                      0          
    9     4      > RETURN                                                   null

End of function bar

Function baz:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 79) Position 1 = -2
filename:       /in/qe1ZJ
function name:  baz
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E > > EXIT                                                     'failed'
   14     1*     > 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 = 79) Position 1 = -2
filename:       /in/qe1ZJ
function name:  baz
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E > > EXIT                                                     'Worked%21'
   24     1*     > RETURN                                                   null

End of function baz

End of class Bar.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.18 ms | 1385 KiB | 13 Q