3v4l.org

run code in 300+ PHP versions simultaneously
<?php $inputArray = array(array("number"=>"+918800499626"), array("carrier"=>"asdasd"), array("number"=>"342423"), array("carrier"=>"assssssss")); $resultArray = array(); for($i = 0; $i < count($inputArray); $i++) { $resultArray[] = array("number"=>$inputArray[$i]["number"], "carrier"=>$inputArray[++$i]["carrier"]); } print_r($resultArray);
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 = 17, Position 2 = 4
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
2 jumps found. (Code = 44) Position 1 = 17, Position 2 = 4
Branch analysis from position: 17
Branch analysis from position: 4
filename:       /in/sreaN
function name:  (null)
number of ops:  21
compiled vars:  !0 = $inputArray, !1 = $resultArray, !2 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN                                                   !1, <array>
    6     2        ASSIGN                                                   !2, 0
          3      > JMP                                                      ->14
    8     4    >   FETCH_DIM_R                                      ~7      !0, !2
          5        FETCH_DIM_R                                      ~8      ~7, 'number'
          6        INIT_ARRAY                                       ~9      ~8, 'number'
          7        PRE_INC                                          ~10     !2
          8        FETCH_DIM_R                                      ~11     !0, ~10
          9        FETCH_DIM_R                                      ~12     ~11, 'carrier'
         10        ADD_ARRAY_ELEMENT                                ~9      ~12, 'carrier'
         11        ASSIGN_DIM                                               !1
         12        OP_DATA                                                  ~9
    6    13        PRE_INC                                                  !2
         14    >   COUNT                                            ~14     !0
         15        IS_SMALLER                                               !2, ~14
         16      > JMPNZ                                                    ~15, ->4
   11    17    >   INIT_FCALL                                               'print_r'
         18        SEND_VAR                                                 !1
         19        DO_ICALL                                                 
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.4 ms | 1395 KiB | 15 Q