Re: Fix ReflectionType::__toString() BC break
| From: | Nicolas Grekas | Date: | Wed, 21 Sep 2016 16:34:56 +0000 |
| Subject: | Re: Fix ReflectionType::__toString() BC break | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-96068@lists.php.net to get a copy of this message | ||
>
> I'm not so sure its a BC though. Technically nullable types don't exist in
> 7.0 and as such would be impossible to return said question mark. Its only
> adding support for a new feature, not changing how an existing feature
> works IMO. If nullable types had been in 7.0 its highly probably, that
> __toString would have returned the leading question mark back then.
>
Here is the BC break: https://3v4l.org/VUbIS
As light as it looks to be, the output on PHP7.1RC2 is not the same as in
PHP7.0.
Yet, __toString() is the only public interface that is available on PHP 7.0,
so people have already built things on top.
Nicolas
p.s. to Nikita: my bad for the too short quote...