Re: ReflectionType::__toString() prepending \ to class names
| From: | Dan Ackroyd | Date: | Sun, 21 Aug 2016 20:28:12 +0000 |
| Subject: | Re: ReflectionType::__toString() prepending \ to class names | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-95356@lists.php.net to get a copy of this message | ||
On 21 August 2016 at 20:43, Marco Pivetta <ocramius@gmail.com> wrote:
>
> Sadly, it won't. Here's an example that shows the BC break in a more
> explicit way:
>
> function foo(Iterator $i = null) {}
> var_dump((string) (new ReflectionParameter('foo', 0))->getType());
>
> This reports
Iterator for PHP 7.0.x,
> ?\Iterator for 7.1.x.
> https://3v4l.org/tDkLj
Thanks.
I missed that part - I thought this was just about ?types, not things
that have default of null.
cheers
Dan