fork(4) download
  1. <?php
  2.  
  3. define('FLAGA',40);
  4. define('FLAGB',10);
  5. define('FLAGC',3);
  6.  
  7. function foo($sFile, $vFlags) {
  8. if ($vFlags & FLAGA) {
  9. echo "FLAGA is set\n";
  10. }
  11. if ($vFlags & FLAGB) {
  12. echo "FLAGB is set\n";
  13. }
  14. if ($vFlags & FLAGC) {
  15. echo "FLAGC is set\n";
  16. }
  17. }
  18. foo('test.txt',FLAGA | FLAGB | FLAGC);
Success #stdin #stdout 0.01s 20520KB
stdin
Standard input is empty
stdout
FLAGA is set
FLAGB is set
FLAGC is set