There's an IS_NULL check...
if (ZEND_NUM_ARGS() >= 3 && Z_TYPE_P(length_param) != IS_NULL) { ....
If Z_TYPE_P(length_param) is 0, it's not NULL because it has something
in it. If length_param were of type long and had a value of 0, it would
be NULL.
Ouch... Now I see. Is there anybody using this trick, provided it never
was documented? This is *so* wrong.
The manual kind of skirts around it: "If length is given and is
positive, then the sequence will have that many elements in it. If
length is given and is negative then the sequence will stop that many
elements from the end of the array. If it is omitted, then the sequence
will have everything from offset up until the end of the array ."
Meaning, basically, -1 is the same as omitted and the same as null?
--
Stanislav Malyshev, Zend Software Architect
[EMAIL PROTECTED] http://www.zend.com/
(408)253-8829 MSN: [EMAIL PROTECTED]
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php