3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public $a = 'foo'; public function print() { echo $this->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/QIvUc
function name:  (null)
number of ops:  11
compiled vars:  !0 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   NEW                                              $1      'A'
          1        DO_FCALL                                      0          
          2        INIT_METHOD_CALL                                         $1, 'print'
          3        DO_FCALL                                      0  $3      
          4        ASSIGN                                                   !0, $3
   10     5        ASSIGN_OBJ                                               !0, 'a'
          6        OP_DATA                                                  'i'
   12     7        CLONE                                            ~6      !0
          8        INIT_METHOD_CALL                                         ~6, '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/QIvUc
function name:  print
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   FETCH_OBJ_R                                      ~0      'a'
          1        CONCAT                                           ~1      ~0, '%0A'
          2        ECHO                                                     ~1
          3      > RETURN                                                   null

End of function print

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
182.57 ms | 1393 KiB | 13 Q