3v4l.org

run code in 300+ PHP versions simultaneously
<?php define('CURRENT_AS_FILEINFO', 0); define('CURRENT_AS_SELF', 16); define('CURRENT_AS_PATHNAME', 32); define('CURRENT_MODE_MASK', 240); define('KEY_AS_PATHNAME', 0); define('KEY_AS_FILENAME', 256); define('FOLLOW_SYMLINKS', 512); define('KEY_MODE_MASK', 3840); define('NEW_CURRENT_AND_KEY', 256); define('SKIP_DOTS', 4096); define('UNIX_PATHS', 8192); function containsPathnameOrSelfFlag($flags) { if ((($flags & CURRENT_AS_PATHNAME) == CURRENT_AS_PATHNAME) || (($flags & CURRENT_AS_SELF) == CURRENT_AS_SELF)) { return true; } return false; } var_dump(containsPathnameOrSelfFlag(CURRENT_MODE_MASK | CURRENT_AS_FILEINFO));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PhQGr
function name:  (null)
number of ops:  54
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'define'
          1        SEND_VAL                                                 'CURRENT_AS_FILEINFO'
          2        SEND_VAL                                                 0
          3        DO_ICALL                                                 
    3     4        INIT_FCALL                                               'define'
          5        SEND_VAL                                                 'CURRENT_AS_SELF'
          6        SEND_VAL                                                 16
          7        DO_ICALL                                                 
    4     8        INIT_FCALL                                               'define'
          9        SEND_VAL                                                 'CURRENT_AS_PATHNAME'
         10        SEND_VAL                                                 32
         11        DO_ICALL                                                 
    5    12        INIT_FCALL                                               'define'
         13        SEND_VAL                                                 'CURRENT_MODE_MASK'
         14        SEND_VAL                                                 240
         15        DO_ICALL                                                 
    6    16        INIT_FCALL                                               'define'
         17        SEND_VAL                                                 'KEY_AS_PATHNAME'
         18        SEND_VAL                                                 0
         19        DO_ICALL                                                 
    7    20        INIT_FCALL                                               'define'
         21        SEND_VAL                                                 'KEY_AS_FILENAME'
         22        SEND_VAL                                                 256
         23        DO_ICALL                                                 
    8    24        INIT_FCALL                                               'define'
         25        SEND_VAL                                                 'FOLLOW_SYMLINKS'
         26        SEND_VAL                                                 512
         27        DO_ICALL                                                 
    9    28        INIT_FCALL                                               'define'
         29        SEND_VAL                                                 'KEY_MODE_MASK'
         30        SEND_VAL                                                 3840
         31        DO_ICALL                                                 
   10    32        INIT_FCALL                                               'define'
         33        SEND_VAL                                                 'NEW_CURRENT_AND_KEY'
         34        SEND_VAL                                                 256
         35        DO_ICALL                                                 
   11    36        INIT_FCALL                                               'define'
         37        SEND_VAL                                                 'SKIP_DOTS'
         38        SEND_VAL                                                 4096
         39        DO_ICALL                                                 
   12    40        INIT_FCALL                                               'define'
         41        SEND_VAL                                                 'UNIX_PATHS'
         42        SEND_VAL                                                 8192
         43        DO_ICALL                                                 
   21    44        INIT_FCALL                                               'var_dump'
         45        INIT_FCALL                                               'containspathnameorselfflag'
         46        FETCH_CONSTANT                                   ~11     'CURRENT_MODE_MASK'
         47        FETCH_CONSTANT                                   ~12     'CURRENT_AS_FILEINFO'
         48        BW_OR                                            ~13     ~11, ~12
         49        SEND_VAL                                                 ~13
         50        DO_FCALL                                      0  $14     
         51        SEND_VAR                                                 $14
         52        DO_ICALL                                                 
         53      > RETURN                                                   1

Function containspathnameorselfflag:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 6, Position 2 = 11
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 13
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
filename:       /in/PhQGr
function name:  containsPathnameOrSelfFlag
number of ops:  15
compiled vars:  !0 = $flags
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   RECV                                             !0      
   15     1        FETCH_CONSTANT                                   ~1      'CURRENT_AS_PATHNAME'
          2        BW_AND                                           ~2      !0, ~1
          3        FETCH_CONSTANT                                   ~3      'CURRENT_AS_PATHNAME'
          4        IS_EQUAL                                         ~4      ~2, ~3
          5      > JMPNZ_EX                                         ~4      ~4, ->11
   16     6    >   FETCH_CONSTANT                                   ~5      'CURRENT_AS_SELF'
          7        BW_AND                                           ~6      !0, ~5
          8        FETCH_CONSTANT                                   ~7      'CURRENT_AS_SELF'
          9        IS_EQUAL                                         ~8      ~6, ~7
         10        BOOL                                             ~4      ~8
         11    > > JMPZ                                                     ~4, ->13
   17    12    > > RETURN                                                   <true>
   19    13    > > RETURN                                                   <false>
   20    14*     > RETURN                                                   null

End of function containspathnameorselfflag

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
240.56 ms | 1402 KiB | 18 Q