Re: PHP7 scalar type hint error bug?
| From: | Yasuo Ohgaki | Date: | Thu, 14 May 2015 10:43:06 +0000 |
| Subject: | Re: PHP7 scalar type hint error bug? | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-86218@lists.php.net to get a copy of this message | ||
Hi Nikita,
On Thu, May 14, 2015 at 6:51 PM, Nikita Popov <nikita.ppv@gmail.com> wrote:
> The output is a bit confusing: This will actually throw a TypeException,
> it's just currently rendered like a fatal error (known issue, will have to
> be resolved at some point). If you wrap your code with a catch
> (TypeException $e) you'll be able to handle argument type errors - this
> includes both errors for user typehints and for internal function types.
Thanks again,
It even worked on 3v4l
http://3v4l.org/sp1C4
Regards,
--
Yasuo Ohgaki
yohgaki@ohgaki.net