Hi!

While it's clear that passing e.g. an array falls into the scope of that general note, it doesn't say anywhere on that page that a string value which contains "\0" is "not what it expects", and I don't think I would ever have guessed that before reading this thread.

So I stand by my assertion that this behaviour was both undocumented and unexpected.

You may assert anything, but it's a fact that PHP functions have returned nulls on bad values since forever. The manual may tell you not to rely on that, but that's still what they did. It's not like it suddenly happened out of nowhere. It has been the case for ages.

--
Stas Malyshev
smalys...@gmail.com

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php

Reply via email to