3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = '5'; $result = ''; switch ($input) { case 0: $result = "hello"; break; case '1': case '2': case '3': $result = "world"; break; } echo $result.PHP_EOL;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 44) Position 1 = 4, Position 2 = 11
Branch analysis from position: 4
2 jumps found. (Code = 44) Position 1 = 6, Position 2 = 13
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 8, Position 2 = 13
Branch analysis from position: 8
2 jumps found. (Code = 44) Position 1 = 10, Position 2 = 13
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
Branch analysis from position: 13
Branch analysis from position: 13
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
filename:       /in/1rD06
function name:  (null)
number of ops:  18
compiled vars:  !0 = $input, !1 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '5'
    4     1        ASSIGN                                                   !1, ''
    6     2        IS_EQUAL                                                 !0, 0
          3      > JMPNZ                                                    ~4, ->11
    9     4    >   IS_EQUAL                                                 !0, '1'
          5      > JMPNZ                                                    ~4, ->13
   10     6    >   IS_EQUAL                                                 !0, '2'
          7      > JMPNZ                                                    ~4, ->13
   11     8    >   IS_EQUAL                                                 !0, '3'
          9      > JMPNZ                                                    ~4, ->13
         10    > > JMP                                                      ->15
    7    11    >   ASSIGN                                                   !1, 'hello'
    8    12      > JMP                                                      ->15
   12    13    >   ASSIGN                                                   !1, 'world'
   13    14      > JMP                                                      ->15
   16    15    >   CONCAT                                           ~7      !1, '%0A'
         16        ECHO                                                     ~7
   17    17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.92 ms | 1394 KiB | 13 Q