3v4l.org

run code in 300+ PHP versions simultaneously
<?php const FOO = 30; $foo = 5; $nested = 'nested'; switch ($foo) { case 10; case 20; echo $foo; break; case 'foo'; switch ($nested) { case 'nested' /*comment*/ ; break; default; break; } break; case FOO; { echo $foo; break; } default; echo 'default'; break; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 44) Position 1 = 5, Position 2 = 13
Branch analysis from position: 5
2 jumps found. (Code = 44) Position 1 = 7, Position 2 = 13
Branch analysis from position: 7
2 jumps found. (Code = 44) Position 1 = 9, Position 2 = 15
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 12, Position 2 = 22
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 24
Branch analysis from position: 24
1 jumps found. (Code = 42) Position 1 = 26
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
1 jumps found. (Code = 42) Position 1 = 26
Branch analysis from position: 26
Branch analysis from position: 15
3 jumps found. (Code = 188) Position 1 = 19, Position 2 = 20, Position 3 = 16
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 26
Branch analysis from position: 26
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
Branch analysis from position: 16
2 jumps found. (Code = 44) Position 1 = 18, Position 2 = 19
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
Branch analysis from position: 19
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 26
Branch analysis from position: 26
Branch analysis from position: 13
filename:       /in/liFIK
function name:  (null)
number of ops:  27
compiled vars:  !0 = $foo, !1 = $nested
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   DECLARE_CONST                                            'FOO', 30
    3     1        ASSIGN                                                   !0, 5
    4     2        ASSIGN                                                   !1, 'nested'
    7     3        IS_EQUAL                                                 !0, 10
          4      > JMPNZ                                                    ~4, ->13
    8     5    >   IS_EQUAL                                                 !0, 20
          6      > JMPNZ                                                    ~4, ->13
   11     7    >   IS_EQUAL                                                 !0, 'foo'
          8      > JMPNZ                                                    ~4, ->15
   19     9    >   FETCH_CONSTANT                                   ~5      'FOO'
         10        IS_EQUAL                                                 !0, ~5
         11      > JMPNZ                                                    ~4, ->22
         12    > > JMP                                                      ->24
    9    13    >   ECHO                                                     !0
   10    14      > JMP                                                      ->26
   12    15    > > SWITCH_STRING                                            !1, [ 'nested':->19, ], ->20
   13    16    >   IS_EQUAL                                                 !1, 'nested'
         17      > JMPNZ                                                    ~6, ->19
         18    > > JMP                                                      ->20
   14    19    > > JMP                                                      ->21
   16    20    > > JMP                                                      ->21
   18    21    > > JMP                                                      ->26
   20    22    >   ECHO                                                     !0
   21    23      > JMP                                                      ->26
   24    24    >   ECHO                                                     'default'
   25    25      > JMP                                                      ->26
   26    26    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.06 ms | 998 KiB | 13 Q