3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { public function getThingy() { return new Thingy; } } class Thingy { public function getId() { return 15; } } $test = new Test; echo $test->getThingy()->getId();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Tssf9
function name:  (null)
number of ops:  9
compiled vars:  !0 = $test
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_METHOD_CALL                                         !0, 'getThingy'
          4        DO_FCALL                                      0  $4      
          5        INIT_METHOD_CALL                                         $4, 'getId'
          6        DO_FCALL                                      0  $5      
          7        ECHO                                                     $5
          8      > RETURN                                                   1

Class Test:
Function getthingy:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Tssf9
function name:  getThingy
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   NEW                                              $0      'Thingy'
          1        DO_FCALL                                      0          
          2      > RETURN                                                   $0
    7     3*     > RETURN                                                   null

End of function getthingy

End of class Test.

Class Thingy:
Function getid:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Tssf9
function name:  getId
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E > > RETURN                                                   15
   14     1*     > RETURN                                                   null

End of function getid

End of class Thingy.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.01 ms | 1394 KiB | 13 Q