3v4l.org

run code in 300+ PHP versions simultaneously
<!DOCTYPE html> <html> <body> <?php $favcolor="red"; switch ($favcolor) { case "red": echo "Your favorite color is red!"; break; case "blue": echo "Your favorite color is blue!"; break; case "green": echo "Your favorite color is green!"; break; default: echo "Your favorite color is neither red, blue, or green!"; } ?> </body> </html>
Finding entry points
Branch analysis from position: 0
5 jumps found. (Code = 188) Position 1 = 10, Position 2 = 12, Position 3 = 14, Position 4 = 16, Position 5 = 3
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 5, Position 2 = 10
Branch analysis from position: 5
2 jumps found. (Code = 44) Position 1 = 7, Position 2 = 12
Branch analysis from position: 7
2 jumps found. (Code = 44) Position 1 = 9, Position 2 = 14
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
Branch analysis from position: 14
Branch analysis from position: 12
Branch analysis from position: 10
filename:       /in/9C7up
function name:  (null)
number of ops:  19
compiled vars:  !0 = $favcolor
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    1     0  E >   ECHO                                                     '%3C%21DOCTYPE+html%3E%0A%3Chtml%3E%0A%3Cbody%3E%0A%0A'
    6     1        ASSIGN                                                   !0, 'red'
    8     2      > SWITCH_STRING                                            !0, [ 'red':->10, 'blue':->12, 'green':->14, ], ->16
    9     3    >   IS_EQUAL                                                 !0, 'red'
          4      > JMPNZ                                                    ~2, ->10
   12     5    >   IS_EQUAL                                                 !0, 'blue'
          6      > JMPNZ                                                    ~2, ->12
   15     7    >   IS_EQUAL                                                 !0, 'green'
          8      > JMPNZ                                                    ~2, ->14
          9    > > JMP                                                      ->16
   10    10    >   ECHO                                                     'Your+favorite+color+is+red%21'
   11    11      > JMP                                                      ->17
   13    12    >   ECHO                                                     'Your+favorite+color+is+blue%21'
   14    13      > JMP                                                      ->17
   16    14    >   ECHO                                                     'Your+favorite+color+is+green%21'
   17    15      > JMP                                                      ->17
   19    16    >   ECHO                                                     'Your+favorite+color+is+neither+red%2C+blue%2C+or+green%21'
   22    17    >   ECHO                                                     '++%0A%3C%2Fbody%3E%0A%3C%2Fhtml%3E'
   24    18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.74 ms | 1395 KiB | 13 Q