3v4l.org

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

Class Cloneable:
Function __clone:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hoNBV
function name:  __clone
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   FETCH_THIS                                       ~0      
          1        CLONE                                            ~1      ~0
          2      > RETURN                                                   ~1
    5     3*     > RETURN                                                   null

End of function __clone

End of class Cloneable.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.08 ms | 1384 KiB | 13 Q