Re: Allow objects in define()

From: Date: Tue, 15 Jun 2021 06:56:59 +0000
Subject: Re: Allow objects in define()
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-114875@lists.php.net to get a copy of this message
> > Not sure about specific use cases, for me the important aspect here is to
> > avoid arbitrary restrictions. For example, define() accepts resources,
> and
> > this is used for some core constants like STDIN, STDOUT, STDERR.
> >
>
> Per the documentation [1], defining resource constants is supposed to
> “cause unpredictable behavio[u]r” and is “not recommended”. Is this correct
> or just FUD?
>
> [1]: https://www.php.net/manual/en/function.define.php
> <
> https://www.php.net/manual/en/function.define.php>
>
It also states that it is used for STDIN, STDOU and STDERR, which will be
objects in the future but will still need to be defined for BC.

Regards,
Maxime


Thread (9 messages)

« previous php.internals (#114875) next »