<?php

define('FLAGA',40);
define('FLAGB',10);
define('FLAGC',3);

function foo($sFile, $vFlags) {
  if ($vFlags & FLAGA) {
  	echo "FLAGA is set\n";
  }
  if ($vFlags & FLAGB) {
  	echo "FLAGB is set\n";
  }
  if ($vFlags & FLAGC) {
  	echo "FLAGC is set\n";
  }
}
foo('test.txt',FLAGA | FLAGB | FLAGC);