3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = true; $b = false; $c = false; switch(true) { case $a: echo 1; case $b: echo 2; case $c: echo 3; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 44) Position 1 = 4, Position 2 = 7
Branch analysis from position: 4
2 jumps found. (Code = 44) Position 1 = 5, Position 2 = 8
Branch analysis from position: 5
2 jumps found. (Code = 44) Position 1 = 6, Position 2 = 9
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uCb2P
function name:  (null)
number of ops:  11
compiled vars:  !0 = $a, !1 = $b, !2 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <true>
    4     1        ASSIGN                                                   !1, <false>
    5     2        ASSIGN                                                   !2, <false>
    8     3      > JMPNZ                                                    !0, ->7
   10     4    > > JMPNZ                                                    !1, ->8
   12     5    > > JMPNZ                                                    !2, ->9
          6    > > JMP                                                      ->10
    9     7    >   ECHO                                                     1
   11     8    >   ECHO                                                     2
   13     9    >   ECHO                                                     3
   15    10    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.91 ms | 1397 KiB | 13 Q