Hi, On Sep 5, 2016 8:53 PM, "Julien Pauli" <jpa...@php.net> wrote: > > On Mon, Sep 5, 2016 at 3:19 PM, Julien Pauli <jpa...@php.net> wrote: > > On Mon, Sep 5, 2016 at 2:44 PM, Nicolas Grekas <nicolas.gre...@gmail.com> wrote: > >> Thanks for trying Julien > >> > >>> I guess what you miss for what you want to do, is to detect if strict > >>> types are activated into the current scope, at runtime. > >> > >> > >> From the inside, the author of the code knows if they added the declare or > >> not. > >> I'd need to know from the outside, before concatenating it, if some file has > >> strict types. > >> This could be exposed on the reflection, since a function/method/class could > >> have a flag that tells if it has been compiled with strict types enabled or > >> not. > >> The current alternative is to parse the source to check if it starts with > >> the declare directive (but not trivial because of non semantic tokens). > >> > > > > Then you need reflection. > > > > I just added ReflectionClass:isStrictlyTyped() and > > ReflectionFunction::isStrictlyTyped() to my patch > > > > https://github.com/jpauli/php-src/tree/is_strict_types > > Any souls to +1 the reflection patch ?
I am not sure about it. Given the concept being strict type it should not matter, at all (given the reasons well explained here and in the RFC). Or do I miss something?