3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?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));
Output for 4.3.0 - 5.6.21, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
bool(true)