3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array(new stdClass()); $a[0]->state = true; $b = array_values($a); $b[0]->state = false; var_dump($a, $b);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ohq6a
function name:  (null)
number of ops:  19
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $2      'stdClass'
          1        DO_FCALL                                      0          
          2        INIT_ARRAY                                       ~4      $2
          3        ASSIGN                                                   !0, ~4
    4     4        FETCH_DIM_W                                      $6      !0, 0
          5        ASSIGN_OBJ                                               $6, 'state'
          6        OP_DATA                                                  <true>
    6     7        INIT_FCALL                                               'array_values'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                         $8      
         10        ASSIGN                                                   !1, $8
    7    11        FETCH_DIM_W                                      $10     !1, 0
         12        ASSIGN_OBJ                                               $10, 'state'
         13        OP_DATA                                                  <false>
    9    14        INIT_FCALL                                               'var_dump'
         15        SEND_VAR                                                 !0
         16        SEND_VAR                                                 !1
         17        DO_ICALL                                                 
         18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
197.54 ms | 1394 KiB | 17 Q