3v4l.org

run code in 300+ PHP versions simultaneously
<?php $value = 'Österreich'; $country = strtolower($value); switch ($country) { case 'deutschland': case 'de': echo "de"; break; case 'österreich': case 'at': case 'oesterreich': echo "at"; break; default: throw new Exception('Invalid country: ' . $value); break; }
Finding entry points
Branch analysis from position: 0
7 jumps found. (Code = 188) Position 1 = 17, Position 2 = 17, Position 3 = 19, Position 4 = 19, Position 5 = 19, Position 6 = 21, Position 7 = 6
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 27
Branch analysis from position: 27
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 27
Branch analysis from position: 27
Branch analysis from position: 19
Branch analysis from position: 19
Branch analysis from position: 21
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 8, Position 2 = 17
Branch analysis from position: 8
2 jumps found. (Code = 44) Position 1 = 10, Position 2 = 17
Branch analysis from position: 10
2 jumps found. (Code = 44) Position 1 = 12, Position 2 = 19
Branch analysis from position: 12
2 jumps found. (Code = 44) Position 1 = 14, Position 2 = 19
Branch analysis from position: 14
2 jumps found. (Code = 44) Position 1 = 16, Position 2 = 19
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
Branch analysis from position: 19
Branch analysis from position: 19
Branch analysis from position: 19
Branch analysis from position: 17
Branch analysis from position: 17
filename:       /in/hAeRl
function name:  (null)
number of ops:  28
compiled vars:  !0 = $value, !1 = $country
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%C3%96sterreich'
    4     1        INIT_FCALL                                               'strtolower'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $3      
          4        ASSIGN                                                   !1, $3
    6     5      > SWITCH_STRING                                            !1, [ 'deutschland':->17, 'de':->17, '%C3%B6sterreich':->19, 'at':->19, 'oesterreich':->19, ], ->21
    7     6    >   IS_EQUAL                                                 !1, 'deutschland'
          7      > JMPNZ                                                    ~5, ->17
    8     8    >   IS_EQUAL                                                 !1, 'de'
          9      > JMPNZ                                                    ~5, ->17
   12    10    >   IS_EQUAL                                                 !1, '%C3%B6sterreich'
         11      > JMPNZ                                                    ~5, ->19
   13    12    >   IS_EQUAL                                                 !1, 'at'
         13      > JMPNZ                                                    ~5, ->19
   14    14    >   IS_EQUAL                                                 !1, 'oesterreich'
         15      > JMPNZ                                                    ~5, ->19
         16    > > JMP                                                      ->21
    9    17    >   ECHO                                                     'de'
   10    18      > JMP                                                      ->27
   15    19    >   ECHO                                                     'at'
   16    20      > JMP                                                      ->27
   19    21    >   NEW                                              $6      'Exception'
         22        CONCAT                                           ~7      'Invalid+country%3A+', !0
         23        SEND_VAL_EX                                              ~7
         24        DO_FCALL                                      0          
         25      > THROW                                         0          $6
   20    26*       JMP                                                      ->27
   21    27    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.92 ms | 1400 KiB | 15 Q