3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = 1; switch($a){ case 1.0: echo "here"; case "1": echo "fall through"; break; case foo(): case $b: default: echo ""; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 44) Position 1 = 3, Position 2 = 12
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 5, Position 2 = 13
Branch analysis from position: 5
2 jumps found. (Code = 44) Position 1 = 9, Position 2 = 15
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 11, Position 2 = 15
Branch analysis from position: 11
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: 15
Branch analysis from position: 15
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
filename:       /in/Im6gC
function name:  (null)
number of ops:  17
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 1
    5     1        IS_EQUAL                                                 !0, 1
          2      > JMPNZ                                                    ~3, ->12
    7     3    >   IS_EQUAL                                                 !0, '1'
          4      > JMPNZ                                                    ~3, ->13
   10     5    >   INIT_FCALL_BY_NAME                                       'foo'
          6        DO_FCALL                                      0  $4      
          7        IS_EQUAL                                                 !0, $4
          8      > JMPNZ                                                    ~3, ->15
   12     9    >   IS_EQUAL                                                 !0, !1
         10      > JMPNZ                                                    ~3, ->15
         11    > > JMP                                                      ->15
    6    12    >   ECHO                                                     'here'
    8    13    >   ECHO                                                     'fall+through'
    9    14      > JMP                                                      ->16
   15    15    >   ECHO                                                     ''
   17    16    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
178.83 ms | 1394 KiB | 13 Q