note 103227 deleted from function.is-array by danbrown
| From: | danbrown@php.net | Date: | Sat, 02 Apr 2011 14:55:33 +0000 |
| Subject: | note 103227 deleted from function.is-array by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-178431@lists.php.net to get a copy of this message | ||
Note Submitter: portalpress dot org at gmail dot com
----
I can't agree with hperrin at gmail dot com.
=== only seems a little faster to me with a NULL value.
pf_is_array() is a custom is_array() function.
YES means, it was an array.
After 100000 iterations and repeated trials.
1) It took 0.01904 seconds to if((array) xarr===xarr) {-NULL
2) It took 0.41439 seconds to if((array) xarr===xarr) {-YES
3) It took 0.06533 seconds to pf_is_array-YES
4) It took 0.02315 seconds to is_array-YES
5) It took 0.03859 seconds to pf_is_array-NULL
6) It took 0.02364 seconds to is_array-NULL
=== with an array takes almost half a second!