3v4l.org

run code in 300+ PHP versions simultaneously
<?php $settings = array( 'name' => array( 0 => 'Large Pouch', 1 => 'XL Pouch' ), 'size' => array( 0 => '9x14', 1 => '12x18' ), 'weight' => array( 0 => '10', 1 => '20' ), 'metro_manila_price' => array( 0 => '59', 1 => '79' ), 'luzvimin_price' => array( 0 => '89', 1 => '139' ) ); $shipping_options = array(); foreach ($settings['name'] as $key => $value) { $index = sprintf('%s(%s) - $%s', $value, $settings['size'][$key], $settings['metro_manila_price'][$key]); $shipping_options[$index] = $key; } print_r($shipping_options);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 20
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 20
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
filename:       /in/FUa2E
function name:  (null)
number of ops:  25
compiled vars:  !0 = $settings, !1 = $shipping_options, !2 = $value, !3 = $key, !4 = $index
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   25     1        ASSIGN                                                   !1, <array>
   26     2        FETCH_DIM_R                                      ~7      !0, 'name'
          3      > FE_RESET_R                                       $8      ~7, ->20
          4    > > FE_FETCH_R                                       ~9      $8, !2, ->20
          5    >   ASSIGN                                                   !3, ~9
   27     6        INIT_FCALL                                               'sprintf'
          7        SEND_VAL                                                 '%25s%28%25s%29+-+%24%25s'
   28     8        SEND_VAR                                                 !2
   29     9        FETCH_DIM_R                                      ~11     !0, 'size'
         10        FETCH_DIM_R                                      ~12     ~11, !3
         11        SEND_VAL                                                 ~12
   30    12        FETCH_DIM_R                                      ~13     !0, 'metro_manila_price'
         13        FETCH_DIM_R                                      ~14     ~13, !3
         14        SEND_VAL                                                 ~14
         15        DO_ICALL                                         $15     
   27    16        ASSIGN                                                   !4, $15
   31    17        ASSIGN_DIM                                               !1, !4
         18        OP_DATA                                                  !3
   26    19      > JMP                                                      ->4
         20    >   FE_FREE                                                  $8
   34    21        INIT_FCALL                                               'print_r'
         22        SEND_VAR                                                 !1
         23        DO_ICALL                                                 
         24      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.86 ms | 1395 KiB | 17 Q