Re: Missing reflection info about strict types?
| From: | Leigh | Date: | Wed, 07 Sep 2016 08:13:03 +0000 |
| Subject: | Re: Missing reflection info about strict types? | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-95715@lists.php.net to get a copy of this message | ||
On Mon, 5 Sep 2016 at 10:39 Nicolas Grekas <nicolas.grekas@gmail.com> wrote:
> Hello,
>
> It looks like we miss a way to check by reflection if a function/method has
> strict types enabled or not.
>
> We'd need to do this in Symfony to generate a file with concatenated
> classes, but split "declare_strict=1" classes out so that they don't break
> (because there is no way to create a single file that contains both strict
> and non-strict classes unfortunately also).
>
> Would it be possible to expose some flavor of ZEND_ACC_STRICT_TYPES to
> userland?
>
> Regards,
> Nicolas
>
As an aside, would you guys like to see a strict types indicator in debug
backtraces? I wrote a small patch for it back during development of 7, and
then forgot about it.
https://github.com/lt/php-src/commit/ac1171a81df814ad0042ef5989010bfe7d3e1652