3v4l.org

run code in 300+ PHP versions simultaneously
<?php $myExistingArray = []; for ($i = 0; $i < 100; $i++) { $myExistingArray[] = ['key1' => '1234', 'key2' => '56', 'count' => 1]; } $myNewArray = []; foreach ($myExistingArray as $item) { $myNewArray[$item['key1'] . '_' . $item['key2']] = $item['count']; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 8, Position 2 = 3
Branch analysis from position: 8
2 jumps found. (Code = 77) Position 1 = 10, Position 2 = 19
Branch analysis from position: 10
2 jumps found. (Code = 78) Position 1 = 11, Position 2 = 19
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 8, Position 2 = 3
Branch analysis from position: 8
Branch analysis from position: 3
filename:       /in/KqfP3
function name:  (null)
number of ops:  21
compiled vars:  !0 = $myExistingArray, !1 = $i, !2 = $myNewArray, !3 = $item
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        ASSIGN                                                   !1, 0
          2      > JMP                                                      ->6
    6     3    >   ASSIGN_DIM                                               !0
          4        OP_DATA                                                  <array>
    5     5        PRE_INC                                                  !1
          6    >   IS_SMALLER                                               !1, 100
          7      > JMPNZ                                                    ~8, ->3
    9     8    >   ASSIGN                                                   !2, <array>
   11     9      > FE_RESET_R                                       $10     !0, ->19
         10    > > FE_FETCH_R                                               $10, !3, ->19
   12    11    >   FETCH_DIM_R                                      ~11     !3, 'key1'
         12        CONCAT                                           ~12     ~11, '_'
         13        FETCH_DIM_R                                      ~13     !3, 'key2'
         14        CONCAT                                           ~14     ~12, ~13
         15        FETCH_DIM_R                                      ~16     !3, 'count'
         16        ASSIGN_DIM                                               !2, ~14
         17        OP_DATA                                                  ~16
   11    18      > JMP                                                      ->10
         19    >   FE_FREE                                                  $10
   13    20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
196.66 ms | 1013 KiB | 13 Q