3v4l.org

run code in 500+ PHP versions simultaneously
<?php $a = new stdClass; $a->id = 1; $b = $a; $b->id = 2; var_dump($a->id, $b->id); // int 2 e int 2
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nCG4J
function name:  (null)
number of ops:  15
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   NEW                                                  $2      'stdClass'
          1        DO_FCALL                                          0          
          2        ASSIGN                                                       !0, $2
    4     3        ASSIGN_OBJ                                                   !0, 'id'
          4        OP_DATA                                                      1
    6     5        ASSIGN                                                       !1, !0
    8     6        ASSIGN_OBJ                                                   !1, 'id'
          7        OP_DATA                                                      2
   10     8        INIT_FCALL                                                   'var_dump'
          9        FETCH_OBJ_R                                          ~8      !0, 'id'
         10        SEND_VAL                                                     ~8
         11        FETCH_OBJ_R                                          ~9      !1, 'id'
         12        SEND_VAL                                                     ~9
         13        DO_ICALL                                                     
         14      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
228.07 ms | 2602 KiB | 14 Q