3v4l.org

run code in 500+ PHP versions simultaneously
<?php // Current. $array = ['foo' => 1, 'bar' => 2, 'baz' => 3]; unset($array['bar']); $reversed = array_reverse($array); $reversed['bar'] = 4; $new = array_reverse($reversed); print_r($new); // unset & + $array = ['foo' => 1, 'bar' => 2, 'baz' => 3]; $array = ['bar' => '4'] + $array; print_r($array);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6uEX1
function name:  (null)
number of ops:  22
compiled vars:  !0 = $array, !1 = $reversed, !2 = $new
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                       !0, <array>
    5     1        UNSET_DIM                                                    !0, 'bar'
    6     2        INIT_FCALL                                                   'array_reverse'
          3        SEND_VAR                                                     !0
          4        DO_ICALL                                             $4      
          5        ASSIGN                                                       !1, $4
    7     6        ASSIGN_DIM                                                   !1, 'bar'
          7        OP_DATA                                                      4
    8     8        INIT_FCALL                                                   'array_reverse'
          9        SEND_VAR                                                     !1
         10        DO_ICALL                                             $7      
         11        ASSIGN                                                       !2, $7
    9    12        INIT_FCALL                                                   'print_r'
         13        SEND_VAR                                                     !2
         14        DO_ICALL                                                     
   12    15        ASSIGN                                                       !0, <array>
   13    16        ADD                                                  ~11     <array>, !0
         17        ASSIGN                                                       !0, ~11
   14    18        INIT_FCALL                                                   'print_r'
         19        SEND_VAR                                                     !0
         20        DO_ICALL                                                     
         21      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
170.14 ms | 2155 KiB | 15 Q