3v4l.org

run code in 300+ PHP versions simultaneously
<?php $master = array(); $arrColors = array('R', 'B', 'G' ,'Y'); $arrNumbers = array('1', '2', '3', '4'); foreach($arrColors as $color) { foreach($arrNumbers as $num) { $arr2 = array_push($master, $num); //$master += array($color => $num); //echo $color.' => '.$num; //echo "\n"; } array_push($arr2, $color); } print_r($master);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 19
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 19
Branch analysis from position: 5
2 jumps found. (Code = 77) Position 1 = 6, Position 2 = 13
Branch analysis from position: 6
2 jumps found. (Code = 78) Position 1 = 7, Position 2 = 13
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 13
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
filename:       /in/CuWeK
function name:  (null)
number of ops:  24
compiled vars:  !0 = $master, !1 = $arrColors, !2 = $arrNumbers, !3 = $color, !4 = $num, !5 = $arr2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        ASSIGN                                                   !1, <array>
    4     2        ASSIGN                                                   !2, <array>
    6     3      > FE_RESET_R                                       $9      !1, ->19
          4    > > FE_FETCH_R                                               $9, !3, ->19
    7     5    > > FE_RESET_R                                       $10     !2, ->13
          6    > > FE_FETCH_R                                               $10, !4, ->13
    8     7    >   INIT_FCALL                                               'array_push'
          8        SEND_REF                                                 !0
          9        SEND_VAR                                                 !4
         10        DO_ICALL                                         $11     
         11        ASSIGN                                                   !5, $11
    7    12      > JMP                                                      ->6
         13    >   FE_FREE                                                  $10
   13    14        INIT_FCALL                                               'array_push'
         15        SEND_REF                                                 !5
         16        SEND_VAR                                                 !3
         17        DO_ICALL                                                 
    6    18      > JMP                                                      ->4
         19    >   FE_FREE                                                  $9
   16    20        INIT_FCALL                                               'print_r'
         21        SEND_VAR                                                 !0
         22        DO_ICALL                                                 
         23      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.94 ms | 1396 KiB | 17 Q