Re: question regarding type hinting parameters of php functions (array_slice)
| From: | Steph Fox | Date: | Mon, 10 Dec 2007 20:47:23 +0000 |
| Subject: | Re: question regarding type hinting parameters of php functions (array_slice) | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-33915@lists.php.net to get a copy of this message | ||
Both are now on http://bugs.php.net/bug.php?id=43541. Ignore the first of
the three, it breaks when the length param isn't passed.
I'm going offline before I say anything else stupid :)
- Steph
----- Original Message ----- From: "Steph Fox" <steph@zend.com>
To: "Stanislav Malyshev" <stas@zend.com>
Cc: <internals@lists.php.net>
Sent: Monday, December 10, 2007 8:12 PM
Subject: Re: [PHP-DEV] question regarding type hinting parameters of php functions (array_slice)
OK, so if I clean up those patches and re-send, will one of them be applied? (It'd be nice to have some idea which one...) - StephSo it's better to check for == 0? What's the difference? Is an IS_NULL check slower?No, it's not slower, but it makes no sense to compare variable value to a type constant. Even if coincidentally constant value is the same one you need to compare to.-- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php