3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Printer { function printIt($object) { echo $object->aMethod(); } } class MyClass { function aMethod() { return "Hello"; } } $printer = new Printer; $printer->printit(new MyClass);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rV2Pj
function name:  (null)
number of ops:  9
compiled vars:  !0 = $printer
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   NEW                                              $1      'Printer'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   16     3        INIT_METHOD_CALL                                         !0, 'printit'
          4        NEW                                              $4      'MyClass'
          5        DO_FCALL                                      0          
          6        SEND_VAR_NO_REF_EX                                       $4
          7        DO_FCALL                                      0          
          8      > RETURN                                                   1

Class Printer:
Function printit:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rV2Pj
function name:  printIt
number of ops:  5
compiled vars:  !0 = $object
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    6     1        INIT_METHOD_CALL                                         !0, 'aMethod'
          2        DO_FCALL                                      0  $1      
          3        ECHO                                                     $1
    7     4      > RETURN                                                   null

End of function printit

End of class Printer.

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

End of function amethod

End of class MyClass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.36 ms | 1394 KiB | 13 Q