3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MyClass { private static function test2($arg) { return "test({$arg})"; } public static function test() { echo call_user_func('self::test2', 'test'); } } call_user_func('MyClass::test');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4oWI2
function name:  (null)
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   INIT_USER_CALL                                0          'call_user_func', 'MyClass%3A%3Atest'
          1        DO_FCALL                                      0          
          2      > RETURN                                                   1

Class MyClass:
Function test2:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4oWI2
function name:  test2
number of ops:  6
compiled vars:  !0 = $arg
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        ROPE_INIT                                     3  ~2      'test%EF%BC%88'
          2        ROPE_ADD                                      1  ~2      ~2, !0
          3        ROPE_END                                      2  ~1      ~2, '%EF%BC%89'
          4      > RETURN                                                   ~1
    5     5*     > RETURN                                                   null

End of function test2

Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4oWI2
function name:  test
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   INIT_USER_CALL                                1          'call_user_func', 'self%3A%3Atest2'
          1        SEND_USER                                                'test'
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
    8     4      > RETURN                                                   null

End of function test

End of class MyClass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.98 ms | 1393 KiB | 13 Q