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); $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 = 14
Branch analysis from position: 14
2 jumps found. (Code = 44) Position 1 = 16, Position 2 = 4
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 7
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 16, Position 2 = 4
Branch analysis from position: 16
Branch analysis from position: 4
Branch analysis from position: 7
filename:       /in/QbvuS
function name:  (null)
number of ops:  20
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        ASSIGN                                                   !1, ~3
          3      > JMP                                                      ->14
   13     4    >   IS_EQUAL                                                 !1, 1
          5      > JMPZ                                                     ~5, ->7
   14     6    >   UNSET_DIM                                                !0, !1
   15     7    >   CONCAT                                           ~6      !1, '+%28'
          8        FETCH_DIM_R                                      ~7      !0, !1
          9        CONCAT                                           ~8      ~6, ~7
         10        CONCAT                                           ~9      ~8, '%29'
         11        CONCAT                                           ~10     ~9, '%0A'
         12        ECHO                                                     ~10
   12    13        PRE_DEC                                                  !1
         14    >   IS_SMALLER_OR_EQUAL                                      0, !1
         15      > JMPNZ                                                    ~12, ->4
   18    16    >   INIT_FCALL                                               'print_r'
         17        SEND_VAR                                                 !0
         18        DO_ICALL                                                 
         19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.62 ms | 1395 KiB | 15 Q