3v4l.org

run code in 300+ PHP versions simultaneously
<?php $vouchers = array( 1 => 100, 3 => 150, 5 => 100 ); $specials = array( 3 => true ); $discounts = array(); $orders = [200,300,500,1000]; foreach ($orders as $order) { foreach ($vouchers as $voucher) { $discounts[$order][$voucher] = 0; } } var_dump($discounts);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 5, Position 2 = 14
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 14
Branch analysis from position: 6
2 jumps found. (Code = 77) Position 1 = 7, Position 2 = 12
Branch analysis from position: 7
2 jumps found. (Code = 78) Position 1 = 8, Position 2 = 12
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 12
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
filename:       /in/vMDfp
function name:  (null)
number of ops:  19
compiled vars:  !0 = $vouchers, !1 = $specials, !2 = $discounts, !3 = $orders, !4 = $order, !5 = $voucher
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    9     1        ASSIGN                                                   !1, <array>
   13     2        ASSIGN                                                   !2, <array>
   14     3        ASSIGN                                                   !3, <array>
   15     4      > FE_RESET_R                                       $10     !3, ->14
          5    > > FE_FETCH_R                                               $10, !4, ->14
   16     6    > > FE_RESET_R                                       $11     !0, ->12
          7    > > FE_FETCH_R                                               $11, !5, ->12
   17     8    >   FETCH_DIM_W                                      $12     !2, !4
          9        ASSIGN_DIM                                               $12, !5
         10        OP_DATA                                                  0
   16    11      > JMP                                                      ->7
         12    >   FE_FREE                                                  $11
   15    13      > JMP                                                      ->5
         14    >   FE_FREE                                                  $10
   23    15        INIT_FCALL                                               'var_dump'
         16        SEND_VAR                                                 !2
         17        DO_ICALL                                                 
         18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.9 ms | 1395 KiB | 15 Q