> How about using array_keys($array, $value) to find the key?
obviously it is cheaper to let in_array return it and it is more php 4
stylish, we have booleans, why not use them?
if ($key=in_array()) do_someting_with_key($key);
is less expensive than
if (in_array()) {
$key=array_keys($array,$value);
do_something_with_key($key); }
--
· André Langhorst t: +49 331 5811560 ·
· [EMAIL PROTECTED] m: +49 173 9558736 ·
* PHP Quality Assurance http://qa.php.net *
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
- [PHP-DEV] PHP 4.0 Bug #9337 Updated: make in_array return ... andre
- Re: [PHP-DEV] PHP 4.0 Bug #9337 Updated: make in_arra... Andrei Zmievski
- Re: [PHP-DEV] PHP 4.0 Bug #9337 Updated: make in_... Andr� Langhorst
- Re: [PHP-DEV] PHP 4.0 Bug #9337 Updated: make... Andrei Zmievski
- Re: [PHP-DEV] PHP 4.0 Bug #9337 Updated: ... Jason Greene
- Re: [PHP-DEV] PHP 4.0 Bug #9337 Upda... Andrei Zmievski
- Re: [PHP-DEV] PHP 4.0 Bug #9337 ... Jason Greene
- Re: [PHP-DEV] PHP 4.0 Bug #9... Andrei Zmievski
- Re: [PHP-DEV] PHP 4.0 Bug #9... Jason Greene
- Re: [PHP-DEV] PHP 4.0 Bug #9... Andr� Langhorst
- Re: [PHP-DEV] PHP 4.0 Bug #9... Stig Venaas
- Re: [PHP-DEV] PHP 4.0 Bug #9... Andrei Zmievski
- Re: [PHP-DEV] PHP 4.0 Bug #9... Stig Venaas
