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; $i->$a = 'i'; $i->print(); (clone $i)->print();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0OIBO
function name:  (null)
number of ops:  12
compiled vars:  !0 = $i, !1 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   FETCH_CLASS                                   0  $2      !1
          1        NEW                                              $3      $2
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $3
    9     4        ASSIGN_OBJ                                               !0, !1
          5        OP_DATA                                                  'i'
   10     6        INIT_METHOD_CALL                                         !0, 'print'
          7        DO_FCALL                                      0          
   12     8        CLONE                                            ~8      !0
          9        INIT_METHOD_CALL                                         ~8, 'print'
         10        DO_FCALL                                      0          
         11      > RETURN                                                   1

Class A:
Function print:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0OIBO
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:
160.21 ms | 1393 KiB | 13 Q