On Dec 31, 2009, at 5:22 AM, Johannes Schlüter wrote: > On Thu, 2009-12-31 at 12:20 +0000, Derick Rethans wrote: >> Hmm, I don't actually think many people test whether parsing parameters >> failed, but they do test the return value. AFAIK, our "standard" is to >> return NULL for parameter parsing failures (at least that's what all the >> examples in README.PARAMETER_PARSING_API do). I'd like to see that be >> the case for all things, but changing it now could be quite a bit of a >> BC break. > > This is also the documented as the general convention: > http://de.php.net/manual/en/functions.internal.php > > While there are exceptions to this on purpose: For instance get_object > is documented to "Return FALSE if /object/ is not an object" (this > exception was discussed in detail in the past)
Ideally the documentation would be explicit, as currently it says: "In this case it will likely return NULL but this is just a convention, and cannot be relied upon." Knowing exactly which do (and do not) follow this rule would be great. Regards, Philip -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php