3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = array("php", 4.0, array("green", "red")); $input2 = $input; // add ref count $ar = &$input2[0]; print_r($input2); $ar = 100; print_r($input2); /* $reversed = array_reverse($input); $preserved = array_reverse($input, true); print_r($input); print_r($reversed); print_r($preserved); */
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/jBo8B
function name:  (null)
number of ops:  12
compiled vars:  !0 = $input, !1 = $input2, !2 = $ar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        ASSIGN                                                   !1, !0
    4     2        FETCH_DIM_W                                      $5      !1, 0
          3        ASSIGN_REF                                               !2, $5
    5     4        INIT_FCALL                                               'print_r'
          5        SEND_VAR                                                 !1
          6        DO_ICALL                                                 
    7     7        ASSIGN                                                   !2, 100
    8     8        INIT_FCALL                                               'print_r'
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                                 
   17    11      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.99 ms | 1394 KiB | 15 Q