3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ '17' => "x", '16' => "x", '15' => "x", '14' => "108.7000", '13' => "x", '12' => "x", '11' => "x", '10' => "x", '09' => "108.2635", '08' => "x", '07' => "x", '06' => "x", '05' => "x", '04' => "x", '03' => "x", '02' => "x", '01' => "x", '00' => "x", '23' => "x", '22' => "x", '21' => "x", '20' => "x", '19' => "x", '18' => "x" ]; foreach ($array as $k => $v) { if ($v === 'x') { $array[$k] =& $ref; } else { if (isset($ref)) { unset($ref); } $ref = $v; } } var_export($array);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 14
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 14
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 9
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 12
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 12
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
filename:       /in/f6PIA
function name:  (null)
number of ops:  19
compiled vars:  !0 = $array, !1 = $v, !2 = $k, !3 = $ref
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   30     1      > FE_RESET_R                                       $5      !0, ->14
          2    > > FE_FETCH_R                                       ~6      $5, !1, ->14
          3    >   ASSIGN                                                   !2, ~6
   31     4        IS_IDENTICAL                                             !1, 'x'
          5      > JMPZ                                                     ~8, ->9
   32     6    >   FETCH_DIM_W                                      $9      !0, !2
          7        ASSIGN_REF                                               $9, !3
   31     8      > JMP                                                      ->13
   34     9    >   ISSET_ISEMPTY_CV                                         !3
         10      > JMPZ                                                     ~11, ->12
   35    11    >   UNSET_CV                                                 !3
   37    12    >   ASSIGN                                                   !3, !1
   30    13    > > JMP                                                      ->2
         14    >   FE_FREE                                                  $5
   40    15        INIT_FCALL                                               'var_export'
         16        SEND_VAR                                                 !0
         17        DO_ICALL                                                 
         18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.44 ms | 1005 KiB | 14 Q