3v4l.org

run code in 300+ PHP versions simultaneously
<?php function show_flags ($flags) { if ($flags & 0) { echo "You are P0" + PHP_EOL; } if ($flags & 1) { echo "You are P1" + PHP_EOL; } if ($flags & 2) { echo "You are P2" + PHP_EOL; } if ($flags & 3) { echo "You are P3" + PHP_EOL; } } show_flags( 3 );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AlVDD
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   INIT_FCALL                                               'show_flags'
          1        SEND_VAL                                                 3
          2        DO_FCALL                                      0          
          3      > RETURN                                                   1

Function show_flags:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 5
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 9
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 13
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 17
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
Branch analysis from position: 13
Branch analysis from position: 9
Branch analysis from position: 5
filename:       /in/AlVDD
function name:  show_flags
number of ops:  18
compiled vars:  !0 = $flags
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        BW_AND                                           ~1      !0, 0
          2      > JMPZ                                                     ~1, ->5
    5     3    >   ADD                                              ~2      'You+are+P0', '%0A'
          4        ECHO                                                     ~2
    7     5    >   BW_AND                                           ~3      !0, 1
          6      > JMPZ                                                     ~3, ->9
    8     7    >   ADD                                              ~4      'You+are+P1', '%0A'
          8        ECHO                                                     ~4
   10     9    >   BW_AND                                           ~5      !0, 2
         10      > JMPZ                                                     ~5, ->13
   11    11    >   ADD                                              ~6      'You+are+P2', '%0A'
         12        ECHO                                                     ~6
   13    13    >   BW_AND                                           ~7      !0, 3
         14      > JMPZ                                                     ~7, ->17
   14    15    >   ADD                                              ~8      'You+are+P3', '%0A'
         16        ECHO                                                     ~8
   16    17    > > RETURN                                                   null

End of function show_flags

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.93 ms | 1399 KiB | 14 Q