in_array(needle, haystack)
PHP with its argument ordering strikes again :)
PHP with its argument ordering strikes again :)
if(!IDEMPOTENT_COMMANDS[$cmdname]) { ...
would do, and, assuming dictionary lookups are optimised, is possibly faster. if (! isset(IDEMPOTENT_COMMANDS[$cmdname]))
otherwise you'll get an undefined index notice :)