3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { public function testA() { echo 'A'; } public function callIt($method) { $this->{$method}(); } } $t = new Test(); var_dump($t->callIt('testA')); die;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 79) Position 1 = -2
filename:       /in/XLepT
function name:  (null)
number of ops:  11
compiled vars:  !0 = $t
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   NEW                                              $1      'Test'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   18     3        INIT_FCALL                                               'var_dump'
          4        INIT_METHOD_CALL                                         !0, 'callIt'
          5        SEND_VAL_EX                                              'testA'
          6        DO_FCALL                                      0  $4      
          7        SEND_VAR                                                 $4
          8        DO_ICALL                                                 
   19     9      > EXIT                                                     
         10*     > RETURN                                                   1

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

End of function testa

Function callit:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XLepT
function name:  callIt
number of ops:  4
compiled vars:  !0 = $method
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
   11     1        INIT_METHOD_CALL                                         !0
          2        DO_FCALL                                      0          
   12     3      > RETURN                                                   null

End of function callit

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.15 ms | 1387 KiB | 15 Q