3v4l.org

run code in 500+ PHP versions simultaneously
<?php function f(int $flags){ if($flags & LOCK_SH){ echo "im handling a LOCK_SH request!"; }elseif($flags & LOCK_EX){ echo "im handling a LOCK_EX request!"; }elseif($flags & LOCK_UN){ echo "im handling a LOCK_UN request!"; }else{ echo "didn't understand those flags..."; } } f(LOCK_UN);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tHWuc
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   15     0  E >   INIT_FCALL                                                   'f'
          1        SEND_VAL                                                     3
          2        DO_FCALL                                          0          
          3      > RETURN                                                       1

Function f:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 5
Branch analysis from position: 3
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: 5
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 9
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 13
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tHWuc
function name:  f
number of ops:  15
compiled vars:  !0 = $flags
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   RECV                                                 !0      
    4     1        BW_AND                                               ~1      !0, 1
          2      > JMPZ                                                         ~1, ->5
    5     3    >   ECHO                                                         'im+handling+a+LOCK_SH+request%21'
    4     4      > JMP                                                          ->14
    6     5    >   BW_AND                                               ~2      !0, 2
          6      > JMPZ                                                         ~2, ->9
    7     7    >   ECHO                                                         'im+handling+a+LOCK_EX+request%21'
    6     8      > JMP                                                          ->14
    8     9    >   BW_AND                                               ~3      !0, 3
         10      > JMPZ                                                         ~3, ->13
    9    11    >   ECHO                                                         'im+handling+a+LOCK_UN+request%21'
    8    12      > JMP                                                          ->14
   11    13    >   ECHO                                                         'didn%27t+understand+those+flags...'
   13    14    > > RETURN                                                       null

End of function f

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
164.43 ms | 1860 KiB | 14 Q