3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = new StdClass(); function something($first) { $b = clone $first; $b->value = 4; var_dump($b); } something($a); var_dump($a);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/FL7GT
function name:  (null)
number of ops:  10
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $1      'StdClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
    9     3        INIT_FCALL                                               'something'
          4        SEND_VAR                                                 !0
          5        DO_FCALL                                      0          
   10     6        INIT_FCALL                                               'var_dump'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                                 
          9      > RETURN                                                   1

Function something:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/FL7GT
function name:  something
number of ops:  9
compiled vars:  !0 = $first, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    5     1        CLONE                                            ~2      !0
          2        ASSIGN                                                   !1, ~2
    6     3        ASSIGN_OBJ                                               !1, 'value'
          4        OP_DATA                                                  4
    7     5        INIT_FCALL                                               'var_dump'
          6        SEND_VAR                                                 !1
          7        DO_ICALL                                                 
    8     8      > RETURN                                                   null

End of function something

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.5 ms | 1397 KiB | 16 Q