3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array('a', 'b', 'c'); /*foreach($a as $k=>$v){ if($k==1) unset($a[$k]); echo $k.' => '.$v.' ('.$a[$k].')'.PHP_EOL; }*/ for($k=count($a)-1; $k>=0; $k--){ if($k==1) unset($a[$k]); echo $k.' ('.$a[$k].')'.PHP_EOL; } print_r($a);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
2 jumps found. (Code = 44) Position 1 = 17, Position 2 = 5
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 8
Branch analysis from position: 7
2 jumps found. (Code = 44) Position 1 = 17, Position 2 = 5
Branch analysis from position: 17
Branch analysis from position: 5
Branch analysis from position: 8
filename:       /in/T8ZVW
function name:  (null)
number of ops:  21
compiled vars:  !0 = $a, !1 = $k
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, <array>
   12     1        COUNT                                            ~3      !0
          2        SUB                                              ~4      ~3, 1
          3        ASSIGN                                                   !1, ~4
          4      > JMP                                                      ->15
   13     5    >   IS_EQUAL                                                 !1, 1
          6      > JMPZ                                                     ~6, ->8
   14     7    >   UNSET_DIM                                                !0, !1
   15     8    >   CONCAT                                           ~7      !1, '+%28'
          9        FETCH_DIM_R                                      ~8      !0, !1
         10        CONCAT                                           ~9      ~7, ~8
         11        CONCAT                                           ~10     ~9, '%29'
         12        CONCAT                                           ~11     ~10, '%0A'
         13        ECHO                                                     ~11
   12    14        PRE_DEC                                                  !1
         15    >   IS_SMALLER_OR_EQUAL                                      0, !1
         16      > JMPNZ                                                    ~13, ->5
   18    17    >   INIT_FCALL                                               'print_r'
         18        SEND_VAR                                                 !0
         19        DO_ICALL                                                 
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.64 ms | 1395 KiB | 15 Q