3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { public function test() { call_user_function([$this, 'test2']); } private function test2() { echo 'Yay'; } } $test = new Test(); $test->test();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/t3MJN
function name:  (null)
number of ops:  6
compiled vars:  !0 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   NEW                                              $1      'Test'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   17     3        INIT_METHOD_CALL                                         !0, 'test'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

Class Test:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/t3MJN
function name:  test
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   INIT_FCALL_BY_NAME                                       'call_user_function'
          1        FETCH_THIS                                       ~0      
          2        INIT_ARRAY                                       ~1      ~0
          3        ADD_ARRAY_ELEMENT                                ~1      'test2'
          4        SEND_VAL_EX                                              ~1
          5        DO_FCALL                                      0          
    8     6      > RETURN                                                   null

End of function test

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

End of function test2

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
175.01 ms | 1394 KiB | 13 Q