3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public $a = 'foo'; public function print() { echo $a.PHP_EOL; } } $i = (new A)->print(); $i->$a = 'i'; (clone $i)->print();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/T5O19
function name:  (null)
number of ops:  11
compiled vars:  !0 = $i, !1 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   NEW                                              $2      'A'
          1        DO_FCALL                                      0          
          2        INIT_METHOD_CALL                                         $2, 'print'
          3        DO_FCALL                                      0  $4      
          4        ASSIGN                                                   !0, $4
   10     5        ASSIGN_OBJ                                               !0, !1
          6        OP_DATA                                                  'i'
   12     7        CLONE                                            ~7      !0
          8        INIT_METHOD_CALL                                         ~7, 'print'
          9        DO_FCALL                                      0          
         10      > RETURN                                                   1

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

End of function print

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.5 ms | 1393 KiB | 13 Q