3v4l.org

run code in 300+ PHP versions simultaneously
<?php function v($val) { switch ($val) { case $val < 5: echo 'less than five'; break; case $val < 10: echo 'less than ten'; break; default: echo 'very big'; } } v(5);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Ba0PU
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   INIT_FCALL                                               'v'
          1        SEND_VAL                                                 5
          2        DO_FCALL                                      0          
          3      > RETURN                                                   1

Function v:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 44) Position 1 = 4, Position 2 = 8
Branch analysis from position: 4
2 jumps found. (Code = 44) Position 1 = 7, Position 2 = 10
Branch analysis from position: 7
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: 10
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
filename:       /in/Ba0PU
function name:  v
number of ops:  14
compiled vars:  !0 = $val
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    6     1        IS_SMALLER                                       ~2      !0, 5
          2        IS_EQUAL                                                 !0, ~2
          3      > JMPNZ                                                    ~1, ->8
    9     4    >   IS_SMALLER                                       ~3      !0, 10
          5        IS_EQUAL                                                 !0, ~3
          6      > JMPNZ                                                    ~1, ->10
          7    > > JMP                                                      ->12
    7     8    >   ECHO                                                     'less+than+five'
    8     9      > JMP                                                      ->13
   10    10    >   ECHO                                                     'less+than+ten'
   11    11      > JMP                                                      ->13
   13    12    >   ECHO                                                     'very+big'
   17    13    > > RETURN                                                   null

End of function v

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
179.95 ms | 1402 KiB | 14 Q