3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array( // Creates Key1 and assigns the value to it // A copy of the value is also placed in $ref // At this stage, it's not a reference "Key1"=>($ref = array( "Value1", "Value2" )), // Now Key2 is a reference to $ref, but not to Key1 "Key2"=>&$ref, // Now everything is referenced together "Key1"=>&$ref );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Ptb3R
function name:  (null)
number of ops:  6
compiled vars:  !0 = $array, !1 = $ref
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   ASSIGN                                           ~2      !1, <array>
          1        INIT_ARRAY                                       ~3      ~2, 'Key1'
   14     2        ADD_ARRAY_ELEMENT                                ~3      !1, 'Key2'
   17     3        ADD_ARRAY_ELEMENT                                ~3      !1, 'Key1'
    3     4        ASSIGN                                                   !0, ~3
   19     5      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
188.14 ms | 1392 KiB | 13 Q