3v4l.org

run code in 500+ PHP versions simultaneously
<?php $currencies = [ 'mxn' => [ 'sign' => '$', 'plans' => [ 'tiny' => 429, 'small' => 1319, 'medium' => 3399, 'big' => 6669 ] ], 'usd' => [ 'sign' => '$', 'plans' => [ 'tiny' => 29, 'small' => 319, 'medium' => 399, 'big' => 669 ] ] ]; $currency='mxn'; if(!isset($currencies[$currency])){ echo "$currency was not found in the currencies array."; }else{ echo "In $currency:\n"; foreach($currencies[$currency]['plans'] as $size=>$price){ echo "\t$size costs {$currencies[$currency]['sign']}$price\n"; } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 9
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 29
Branch analysis from position: 29
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
2 jumps found. (Code = 77) Position 1 = 16, Position 2 = 28
Branch analysis from position: 16
2 jumps found. (Code = 78) Position 1 = 17, Position 2 = 28
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
Branch analysis from position: 28
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 28
filename:       /in/dU09B
function name:  (null)
number of ops:  30
compiled vars:  !0 = $currencies, !1 = $currency, !2 = $price, !3 = $size
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                       !0, <array>
   23     1        ASSIGN                                                       !1, 'mxn'
   25     2        ISSET_ISEMPTY_DIM_OBJ                             0  ~6      !0, !1
          3        BOOL_NOT                                             ~7      ~6
          4      > JMPZ                                                         ~7, ->9
   26     5    >   NOP                                                          
          6        FAST_CONCAT                                          ~8      !1, '+was+not+found+in+the+currencies+array.'
          7        ECHO                                                         ~8
   25     8      > JMP                                                          ->29
   28     9    >   ROPE_INIT                                         3  ~10     'In+'
         10        ROPE_ADD                                          1  ~10     ~10, !1
         11        ROPE_END                                          2  ~9      ~10, '%3A%0A'
         12        ECHO                                                         ~9
   29    13        FETCH_DIM_R                                          ~12     !0, !1
         14        FETCH_DIM_R                                          ~13     ~12, 'plans'
         15      > FE_RESET_R                                           $14     ~13, ->28
         16    > > FE_FETCH_R                                           ~15     $14, !2, ->28
         17    >   ASSIGN                                                       !3, ~15
   30    18        ROPE_INIT                                         6  ~20     '%09'
         19        ROPE_ADD                                          1  ~20     ~20, !3
         20        ROPE_ADD                                          2  ~20     ~20, '+costs+'
         21        FETCH_DIM_R                                          ~17     !0, !1
         22        FETCH_DIM_R                                          ~18     ~17, 'sign'
         23        ROPE_ADD                                          3  ~20     ~20, ~18
         24        ROPE_ADD                                          4  ~20     ~20, !2
         25        ROPE_END                                          5  ~19     ~20, '%0A'
         26        ECHO                                                         ~19
   29    27      > JMP                                                          ->16
         28    >   FE_FREE                                                      $14
   32    29    > > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
157.76 ms | 2009 KiB | 13 Q