3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
124.47 ms | 474 KiB | 7 Q