3v4l.org

run code in 300+ PHP versions simultaneously
<html> <body> <?php $favcolor="green"; 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/WOoZr
function name:  (null)
number of ops:  19
compiled vars:  !0 = $favcolor
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    1     0  E >   ECHO                                                     '%3Chtml%3E%0A%3Cbody%3E%0A%0A'
    5     1        ASSIGN                                                   !0, 'green'
    7     2      > SWITCH_STRING                                            !0, [ 'red':->10, 'blue':->12, 'green':->14, ], ->16
    8     3    >   IS_EQUAL                                                 !0, 'red'
          4      > JMPNZ                                                    ~2, ->10
   11     5    >   IS_EQUAL                                                 !0, 'blue'
          6      > JMPNZ                                                    ~2, ->12
   14     7    >   IS_EQUAL                                                 !0, 'green'
          8      > JMPNZ                                                    ~2, ->14
          9    > > JMP                                                      ->16
    9    10    >   ECHO                                                     'Your+favorite+color+is+red%21'
   10    11      > JMP                                                      ->17
   12    12    >   ECHO                                                     'Your+favorite+color+is+blue%21'
   13    13      > JMP                                                      ->17
   15    14    >   ECHO                                                     'Your+favorite+color+is+green%21'
   16    15      > JMP                                                      ->17
   18    16    >   ECHO                                                     'Your+favorite+color+is+neither+red%2C+blue%2C+or+green%21'
   21    17    >   ECHO                                                     '++%0A%3C%2Fbody%3E%0A%3C%2Fhtml%3E'
   23    18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.96 ms | 1395 KiB | 13 Q