3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = [ "size" => "P", "code" => ["C01","B01","A02"] ]; foreach($arr["code"] as $item){ @$newArr[] = [ "size" => "P", "code" => $item ]; } var_dump($newArr);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 11
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 11
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
filename:       /in/itpEC
function name:  (null)
number of ops:  16
compiled vars:  !0 = $arr, !1 = $item, !2 = $newArr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, <array>
    9     1        FETCH_DIM_R                                      ~4      !0, 'code'
          2      > FE_RESET_R                                       $5      ~4, ->11
          3    > > FE_FETCH_R                                               $5, !1, ->11
   10     4    >   BEGIN_SILENCE                                    ~6      
   11     5        INIT_ARRAY                                       ~8      'P', 'size'
   12     6        ADD_ARRAY_ELEMENT                                ~8      !1, 'code'
   10     7        ASSIGN_DIM                                               !2
   12     8        OP_DATA                                                  ~8
          9        END_SILENCE                                              ~6
    9    10      > JMP                                                      ->3
         11    >   FE_FREE                                                  $5
   16    12        INIT_FCALL                                               'var_dump'
         13        SEND_VAR                                                 !2
         14        DO_ICALL                                                 
         15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.48 ms | 1399 KiB | 15 Q