3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Set everything up $testArray = array( 'a' => array(), 'b' => array() ); $saved = array(); $ref =& $testArray['b']; // Set a value via the reference $ref = array(1); // Save the current array state $saved[] = $testArray; // This shouldn't be a reference, right? // Set another value via the reference $ref = array(2); // Save the current array state $saved[] = $testArray; // This shouldn't be a reference, right? var_dump($saved);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mdfc2
function name:  (null)
number of ops:  14
compiled vars:  !0 = $testArray, !1 = $saved, !2 = $ref
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    8     1        ASSIGN                                                   !1, <array>
   10     2        FETCH_DIM_W                                      $5      !0, 'b'
          3        ASSIGN_REF                                               !2, $5
   13     4        ASSIGN                                                   !2, <array>
   16     5        ASSIGN_DIM                                               !1
          6        OP_DATA                                                  !0
   19     7        ASSIGN                                                   !2, <array>
   22     8        ASSIGN_DIM                                               !1
          9        OP_DATA                                                  !0
   24    10        INIT_FCALL                                               'var_dump'
         11        SEND_VAR                                                 !1
         12        DO_ICALL                                                 
         13      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.65 ms | 1394 KiB | 15 Q