3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array(800, 300, 500, 200); $d = 500; $array = array_reverse($a); foreach ($array as $k => &$v) { if ($v === $d) { unset($a[$k]); break; } } var_dump($a); // Your results
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 125) Position 1 = 7, Position 2 = 14
Branch analysis from position: 7
2 jumps found. (Code = 126) Position 1 = 8, Position 2 = 14
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 13
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 14
Branch analysis from position: 14
filename:       /in/mh5dX
function name:  (null)
number of ops:  19
compiled vars:  !0 = $a, !1 = $d, !2 = $array, !3 = $v, !4 = $k
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN                                                   !1, 500
    6     2        INIT_FCALL                                               'array_reverse'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $7      
          5        ASSIGN                                                   !2, $7
    8     6      > FE_RESET_RW                                      $9      !2, ->14
          7    > > FE_FETCH_RW                                      ~10     $9, !3, ->14
          8    >   ASSIGN                                                   !4, ~10
   10     9        IS_IDENTICAL                                             !3, !1
         10      > JMPZ                                                     ~12, ->13
   12    11    >   UNSET_DIM                                                !0, !4
   13    12      > JMP                                                      ->14
    8    13    > > JMP                                                      ->7
         14    >   FE_FREE                                                  $9
   17    15        INIT_FCALL                                               'var_dump'
         16        SEND_VAR                                                 !0
         17        DO_ICALL                                                 
         18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.03 ms | 1395 KiB | 17 Q