3v4l.org

run code in 300+ PHP versions simultaneously
<?php switch ('foo') { case 0: $result = "Oh no!\n"; break; case 'foo': $result = "This is what I expected\n"; break; } echo $result;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 44) Position 1 = 2, Position 2 = 5
Branch analysis from position: 2
2 jumps found. (Code = 44) Position 1 = 4, Position 2 = 7
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
filename:       /in/PLkiG
function name:  (null)
number of ops:  11
compiled vars:  !0 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   IS_EQUAL                                                 'foo', 0
          1      > JMPNZ                                                    ~1, ->5
    7     2    >   IS_EQUAL                                                 'foo', 'foo'
          3      > JMPNZ                                                    ~1, ->7
          4    > > JMP                                                      ->9
    5     5    >   ASSIGN                                                   !0, 'Oh+no%21%0A'
    6     6      > JMP                                                      ->9
    8     7    >   ASSIGN                                                   !0, 'This+is+what+I+expected%0A'
    9     8      > JMP                                                      ->9
   11     9    >   ECHO                                                     !0
   12    10      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.18 ms | 1006 KiB | 13 Q