4 ms·in_array(needle, haystack) PHP with its argument ordering strikes again :)by nexxer 12y agoin_array(needle, haystack) PHP with its argument ordering strikes again :)izietto 12y agoDamn!!! :Dpygy_ 12y ago... actually, if(!IDEMPOTENT_COMMANDS[$cmdname]) { ... would do, and, assuming dictionary lookups are optimised, is possibly faster.RutZap 12y agoactually, if (! isset(IDEMPOTENT_COMMANDS[$cmdname])) otherwise you'll get an undefined index notice :)pygy_ 12y agoIndeed. My PHP-fu is a bit rusty... I tested `if(NULL)...` in the REPL and since it was working, I left it at that.