3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.97 ms | 1393 KiB | 13 Q