3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public static function testFunc($name) { echo "hello " . $name . ' !!'; } } class B { public function testAnotherFunc($funcName) { $funcName('Percy'); } } $b = new B(); $b->testAnotherFunc('A::testFunc');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kPlFc
function name:  (null)
number of ops:  7
compiled vars:  !0 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E >   NEW                                              $1      'B'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   25     3        INIT_METHOD_CALL                                         !0, 'testAnotherFunc'
          4        SEND_VAL_EX                                              'A%3A%3AtestFunc'
          5        DO_FCALL                                      0          
          6      > RETURN                                                   1

Class A:
Function testfunc:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kPlFc
function name:  testFunc
number of ops:  5
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    8     1        CONCAT                                           ~1      'hello+', !0
          2        CONCAT                                           ~2      ~1, '+%21%21'
          3        ECHO                                                     ~2
    9     4      > RETURN                                                   null

End of function testfunc

End of class A.

Class B:
Function testanotherfunc:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kPlFc
function name:  testAnotherFunc
number of ops:  5
compiled vars:  !0 = $funcName
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   RECV                                             !0      
   18     1        INIT_DYNAMIC_CALL                                        !0
          2        SEND_VAL_EX                                              'Percy'
          3        DO_FCALL                                      0          
   19     4      > RETURN                                                   null

End of function testanotherfunc

End of class B.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
193.48 ms | 1394 KiB | 13 Q