Skip to content

Instantly share code, notes, and snippets.

@ptarjan
Created January 29, 2014 17:03
Show Gist options
  • Save ptarjan/8692284 to your computer and use it in GitHub Desktop.
Save ptarjan/8692284 to your computer and use it in GitHub Desktop.
enum Mode {
PHP_INI_NONE = 0,
PHP_INI_ONLY = 1,
PHP_INI_SYSTEM = 2,
PHP_INI_PERDIR = 4,
PHP_INI_USER = 8,
PHP_INI_ALL = 16,
};
some_function(Mode mode) {
}
other_function() {
some_function(static_cast<Mode>(PHP_INI_USER | PHP_INI_ALL));
}
(gdb) p mode
HPHP::IniSetting::PHP_INI_ONLY | HPHP::IniSetting::PHP_INI_SYSTEM | HPHP::IniSetting::PHP_INI_PERDIR
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment