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 (array_keys($myExistingArray) as $item) { $myNewArray[$myExistingArray[$item]['key1'] . '_' . $myExistingArray[$item]['key2']] = $myExistingArray[$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 = 13, Position 2 = 25
Branch analysis from position: 13
2 jumps found. (Code = 78) Position 1 = 14, Position 2 = 25
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 25
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/Z1WDv
function name:  (null)
number of ops:  27
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        INIT_FCALL                                               'array_keys'
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                         $10     
         12      > FE_RESET_R                                       $11     $10, ->25
         13    > > FE_FETCH_R                                               $11, !3, ->25
   12    14    >   FETCH_DIM_R                                      ~12     !0, !3
         15        FETCH_DIM_R                                      ~13     ~12, 'key1'
         16        CONCAT                                           ~14     ~13, '_'
         17        FETCH_DIM_R                                      ~15     !0, !3
         18        FETCH_DIM_R                                      ~16     ~15, 'key2'
         19        CONCAT                                           ~17     ~14, ~16
         20        FETCH_DIM_R                                      ~19     !0, !3
         21        FETCH_DIM_R                                      ~20     ~19, 'count'
         22        ASSIGN_DIM                                               !2, ~17
         23        OP_DATA                                                  ~20
   11    24      > JMP                                                      ->13
         25    >   FE_FREE                                                  $11
   13    26      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
289.03 ms | 1017 KiB | 14 Q