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=0; $k<count($a); $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 = 13
Branch analysis from position: 13
2 jumps found. (Code = 44) Position 1 = 16, Position 2 = 3
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 6
Branch analysis from position: 5
2 jumps found. (Code = 44) Position 1 = 16, Position 2 = 3
Branch analysis from position: 16
Branch analysis from position: 3
Branch analysis from position: 6
filename:       /in/v3in6
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        ASSIGN                                                   !1, 0
          2      > JMP                                                      ->13
   13     3    >   IS_EQUAL                                                 !1, 1
          4      > JMPZ                                                     ~4, ->6
   14     5    >   UNSET_DIM                                                !0, !1
   15     6    >   CONCAT                                           ~5      !1, '+%28'
          7        FETCH_DIM_R                                      ~6      !0, !1
          8        CONCAT                                           ~7      ~5, ~6
          9        CONCAT                                           ~8      ~7, '%29'
         10        CONCAT                                           ~9      ~8, '%0A'
         11        ECHO                                                     ~9
   12    12        PRE_INC                                                  !1
         13    >   COUNT                                            ~11     !0
         14        IS_SMALLER                                               !1, ~11
         15      > JMPNZ                                                    ~12, ->3
   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:
174.94 ms | 1395 KiB | 15 Q