3v4l.org

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

Class Test:
Function testa:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0kPaI
function name:  testA
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E > > 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/0kPaI
function name:  callIt
number of ops:  5
compiled vars:  !0 = $method
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   FETCH_OBJ_R                                      ~1      'method'
          1        ASSIGN                                                   !0, ~1
   12     2        INIT_DYNAMIC_CALL                                        !0
          3        DO_FCALL                                      0          
   13     4      > RETURN                                                   null

End of function callit

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.91 ms | 1395 KiB | 15 Q