3v4l.org

run code in 300+ PHP versions simultaneously
<?php $action = 'edit'; $id = null; switch ($action) { case 'edit': if ($id) { doSomething(); } else { goto dd; } break; case 'list': break; default: dd: echo "doing default stuff"; break; }
Finding entry points
Branch analysis from position: 0
4 jumps found. (Code = 188) Position 1 = 8, Position 2 = 14, Position 3 = 15, Position 4 = 3
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 12
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
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
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
Branch analysis from position: 15
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 5, Position 2 = 8
Branch analysis from position: 5
2 jumps found. (Code = 44) Position 1 = 7, Position 2 = 14
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
Branch analysis from position: 14
Branch analysis from position: 8
filename:       /in/X71e8
function name:  (null)
number of ops:  18
compiled vars:  !0 = $action, !1 = $id
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'edit'
    3     1        ASSIGN                                                   !1, null
    4     2      > SWITCH_STRING                                            !0, [ 'edit':->8, 'list':->14, ], ->15
    6     3    >   IS_EQUAL                                                 !0, 'edit'
          4      > JMPNZ                                                    ~4, ->8
   14     5    >   IS_EQUAL                                                 !0, 'list'
          6      > JMPNZ                                                    ~4, ->14
          7    > > JMP                                                      ->15
    7     8    > > JMPZ                                                     !1, ->12
    8     9    >   INIT_FCALL_BY_NAME                                       'doSomething'
         10        DO_FCALL                                      0          
    7    11      > JMP                                                      ->13
   10    12    > > JMP                                                      ->15
   12    13    > > JMP                                                      ->17
   15    14    > > JMP                                                      ->17
   18    15    >   ECHO                                                     'doing+default+stuff'
   19    16      > JMP                                                      ->17
   20    17    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
136.17 ms | 997 KiB | 13 Q