3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr=array(array("img","dummies","slides","01.jpg"),array("img","dummies","slides","01.jpg"),array("img","dummies","slides","01.jpg")); print_r($arr); echo $num_arr=count($arr); for($i=0;$i<$num_arr;$i++) { $new_key="key_".$i; $arr[$new_key] = $arr[$i]; unset($arr[$i]); } print_r($arr);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
2 jumps found. (Code = 44) Position 1 = 18, Position 2 = 9
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 18, Position 2 = 9
Branch analysis from position: 18
Branch analysis from position: 9
filename:       /in/QJIqL
function name:  (null)
number of ops:  22
compiled vars:  !0 = $arr, !1 = $num_arr, !2 = $i, !3 = $new_key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        INIT_FCALL                                               'print_r'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                                 
    5     4        COUNT                                            ~6      !0
          5        ASSIGN                                           ~7      !1, ~6
          6        ECHO                                                     ~7
    6     7        ASSIGN                                                   !2, 0
          8      > JMP                                                      ->16
    8     9    >   CONCAT                                           ~9      'key_', !2
         10        ASSIGN                                                   !3, ~9
    9    11        FETCH_DIM_R                                      ~12     !0, !2
         12        ASSIGN_DIM                                               !0, !3
         13        OP_DATA                                                  ~12
   10    14        UNSET_DIM                                                !0, !2
    6    15        PRE_INC                                                  !2
         16    >   IS_SMALLER                                               !2, !1
         17      > JMPNZ                                                    ~14, ->9
   12    18    >   INIT_FCALL                                               'print_r'
         19        SEND_VAR                                                 !0
         20        DO_ICALL                                                 
         21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.03 ms | 1395 KiB | 15 Q