Welcome! Log In Create A New Profile

Advanced

[PHP-DEV] [RFC] Make compact function reports undefined passed variables

Posted by Gabriel Caruso 
Hello Internals.


I'd like to announce my new RFC: https://wiki.php.net/rfc/compact.


This was already previously discussed (https://externals.io/message/102012)
and now I have officially opened the RFC so we can discuss, improve and
vote it.


Thanks in advance,
--
Gabriel Caruso
On Fri, May 25, 2018 at 4:17 AM, Gabriel Caruso <[email protected]>
wrote:

> Hello Internals.
>
>
> I'd like to announce my new RFC: https://wiki.php.net/rfc/compact.
>
>
> This was already previously discussed (https://externals.io/message/102012
> )
> and now I have officially opened the RFC so we can discuss, improve and
> vote it.
>
>
> Thanks in advance,
> --
> Gabriel Caruso
>

Sounds reasonable to me. An undefined variable in compact() is most likely
a typo, not an intentional use of a conditionally defined variable.

Nikita
On Thu, May 24, 2018 at 10:17 PM, Gabriel Caruso
<[email protected]> wrote:
> Hello Internals.
>
>
> I'd like to announce my new RFC: https://wiki.php.net/rfc/compact.
>
>
> This was already previously discussed (https://externals.io/message/102012)
> and now I have officially opened the RFC so we can discuss, improve and
> vote it.
>
>
> Thanks in advance,
> --
> Gabriel Caruso

I love it as it would help guard against obscure bugs.

I would suggest raising an E_NOTICE instead of an E_WARNING as that is
the typical behavior of undefined variables elsewhere. :)

Thanks,
Sammy Kaye Powers
sammyk.me

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
Sammy, thanks for point it.

Just test a simple code (https://3v4l.org/0QQ9S) to confirm that.

Gonna change it in the implementation.

Em sex, 25 de mai de 2018 ├ás 08:45, Sammy Kaye Powers <[email protected]>
escreveu:

> On Thu, May 24, 2018 at 10:17 PM, Gabriel Caruso
> <[email protected]> wrote:
> > Hello Internals.
> >
> >
> > I'd like to announce my new RFC: https://wiki.php.net/rfc/compact.
> >
> >
> > This was already previously discussed (
> https://externals.io/message/102012)
> > and now I have officially opened the RFC so we can discuss, improve and
> > vote it.
> >
> >
> > Thanks in advance,
> > --
> > Gabriel Caruso
>
> I love it as it would help guard against obscure bugs.
>
> I would suggest raising an E_NOTICE instead of an E_WARNING as that is
> the typical behavior of undefined variables elsewhere. :)
>
> Thanks,
> Sammy Kaye Powers
> sammyk.me
>
--
Gabriel Caruso
Sorry, only registered users may post in this forum.

Click here to login