note 103227 added to function.is-array
| From: | portalpress dot org at gmail dot com | Date: | Sat, 02 Apr 2011 03:02:43 +0000 |
| Subject: | note 103227 added to function.is-array | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-178423@lists.php.net to get a copy of this message | ||
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!
----
Server IP: 69.147.83.197
Probable Submitter: 109.32.161.96
----
Manual Page -- http://www.php.net/manual/en/function.is-array.php
Edit -- https://master.php.net/note/edit/103227
Del: integrated -- https://master.php.net/note/delete/103227/integrated
Del: useless -- https://master.php.net/note/delete/103227/useless
Del: bad code -- https://master.php.net/note/delete/103227/bad+code
Del: spam -- https://master.php.net/note/delete/103227/spam
Del: non-english -- https://master.php.net/note/delete/103227/non-english
Del: in docs -- https://master.php.net/note/delete/103227/in+docs
Del: other reasons-- https://master.php.net/note/delete/103227
Reject -- https://master.php.net/note/reject/103227
Search -- https://master.php.net/manage/user-notes.php