On Wed, Sep 21, 2016 at 2:55 AM, Nicolas Grekas
<nicolas.gre...@gmail.com> wrote:
> Hello,
>
> our turn to be hit by this 7.1 BC break in Symfony:
> `ReflectionType::__toString()` now adds a `?` in front of type hints where
> `null` is allowed by their default values.
>
> But since `zend_bool` is really an `unsigned char`, we have plenty of room
> to store and forward this semantic subtlety (nullable being set through
> `?Foo $arg` vs `Foo $arg = null`) so that `ReflectionType::__toString()`
> can be accurate again, thus BC.
>
> See https://github.com/php/php-src/pull/2136
>
> Thank for you consideration of this patch.
>
> Cheers,
> Nicolas

On a technical note this is a potentially breaking change for C
extensions. Since it is a currently a `zend_bool` its value is
truthy/falsy; you are now applying specific meaning to values.

Maybe someone else will have more insight into what might be affected
realistically, but this is one reason this was not implemented this
way to begin with.

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

Reply via email to