3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Everything you enter here will be executed by our servers. Try it! $region = array( 'AL' => 'Alabama', 'AK' => 'Alaska', 'AZ' => 'Arizona', 'AR' => 'Arkansas', 'CA' => 'California', 'CO' => 'Colorado', 'CT' => 'Connecticut', 'DE' => 'Delaware', 'DC' => 'Washington DC', 'FL' => 'Florida', 'GA' => 'Georgia', 'HI' => 'Hawaii', 'ID' => 'Idaho', 'IL' => 'Illinois', 'IN' => 'Indiana', 'IA' => 'Iowa', 'KS' => 'Kansas', 'KY' => 'Kentucky', 'LA' => 'Louisiana', 'ME' => 'Maine', 'MD' => 'Maryland', 'MA' => 'Massachusetts', 'MI' => 'Michigan', 'MN' => 'Minnesota', 'MS' => 'Mississippi', 'MO' => 'Missouri', 'MT' => 'Montana', 'NE' => 'Nebraska', 'NV' => 'Nevada', 'NH' => 'New Hampshire', 'NJ' => 'New Jersey', 'NM' => 'New Mexico', 'NY' => 'New York', 'NC' => 'North Carolina', 'ND' => 'North Dakota', 'OH' => 'Ohio', 'OK' => 'Oklahoma', 'OR' => 'Oregon', 'PA' => 'Pennsylvania', 'RI' => 'Rhode Island', 'SC' => 'South Carolina', 'SD' => 'South Dakota', 'TN' => 'Tennessee', 'TX' => 'Texas', 'UT' => 'Utah', 'VT' => 'Vermont', 'VA' => 'Virginia', 'WA' => 'Washington', 'WV' => 'West Virginia', 'WI' => 'Wisconsin', 'WY' => 'Wyoming', ); $chosen = (isset($_GET['region']) and isset($region[strtoupper($_GET['region'])])) ? $region[strtoupper($_GET['region'])] : $region['WY']; echo $chosen;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 4, Position 2 = 11
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 20
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
filename:       /in/F6fTd
function name:  (null)
number of ops:  25
compiled vars:  !0 = $region, !1 = $chosen
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, <array>
   58     1        FETCH_IS                                         ~3      '_GET'
          2        ISSET_ISEMPTY_DIM_OBJ                         0  ~4      ~3, 'region'
          3      > JMPZ_EX                                          ~4      ~4, ->11
          4    >   INIT_FCALL                                               'strtoupper'
          5        FETCH_R                      global              ~5      '_GET'
          6        FETCH_DIM_R                                      ~6      ~5, 'region'
          7        SEND_VAL                                                 ~6
          8        DO_ICALL                                         $7      
          9        ISSET_ISEMPTY_DIM_OBJ                         0  ~8      !0, $7
         10        BOOL                                             ~4      ~8
         11    > > JMPZ                                                     ~4, ->20
         12    >   INIT_FCALL                                               'strtoupper'
         13        FETCH_R                      global              ~9      '_GET'
         14        FETCH_DIM_R                                      ~10     ~9, 'region'
         15        SEND_VAL                                                 ~10
         16        DO_ICALL                                         $11     
         17        FETCH_DIM_R                                      ~12     !0, $11
         18        QM_ASSIGN                                        ~13     ~12
         19      > JMP                                                      ->22
         20    >   FETCH_DIM_R                                      ~14     !0, 'WY'
         21        QM_ASSIGN                                        ~13     ~14
         22    >   ASSIGN                                                   !1, ~13
   60    23        ECHO                                                     !1
         24      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
137.79 ms | 1387 KiB | 15 Q