3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.66 ms | 1396 KiB | 17 Q