3v4l.org

run code in 500+ PHP versions simultaneously
<?php $state = 0; switch ($state) { case 'Set Level: 10 %': $return = 1; break; case 'Set Level: 20 %': $return = 2; break; default: $return = 0; break; } echo 'return:'; var_dump($return);
Finding entry points
Branch analysis from position: 0
4 jumps found. (Code = 188) Position 1 = 7, Position 2 = 9, Position 3 = 11, Position 4 = 2
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
Branch analysis from position: 2
2 jumps found. (Code = 44) Position 1 = 4, Position 2 = 7
Branch analysis from position: 4
2 jumps found. (Code = 44) Position 1 = 6, Position 2 = 9
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
Branch analysis from position: 9
Branch analysis from position: 7
filename:       /in/IQ142
function name:  (null)
number of ops:  18
compiled vars:  !0 = $state, !1 = $return
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, 0
    5     1      > SWITCH_STRING                                                !0, [ 'Set+Level%3A+10+%25':->7, 'Set+Level%3A+20+%25':->9, ], ->11
    7     2    >   IS_EQUAL                                                     !0, 'Set+Level%3A+10+%25'
          3      > JMPNZ                                                        ~3, ->7
   13     4    >   IS_EQUAL                                                     !0, 'Set+Level%3A+20+%25'
          5      > JMPNZ                                                        ~3, ->9
          6    > > JMP                                                          ->11
    9     7    >   ASSIGN                                                       !1, 1
   11     8      > JMP                                                          ->13
   15     9    >   ASSIGN                                                       !1, 2
   17    10      > JMP                                                          ->13
   21    11    >   ASSIGN                                                       !1, 0
   23    12      > JMP                                                          ->13
   27    13    >   ECHO                                                         'return%3A'
   29    14        INIT_FCALL                                                   'var_dump'
         15        SEND_VAR                                                     !1
         16        DO_ICALL                                                     
         17      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
160.88 ms | 2071 KiB | 14 Q