On Tue, Jun 15, 2021 at 8:44 AM Claude Pache wrote:
>
>
>
> 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 docum
> > 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 suppo
>
> 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
On Mon, Jun 14, 2021 at 7:47 PM Larry Garfield
wrote:
> On Mon, Jun 14, 2021, at 9:35 AM, Nikita Popov wrote:
> > Hi internals,
> >
> > With the introduction of enums, it's now possible for constants to hold
> > objects. However, this works only when using the `const X = Y` syntax,
> not
> > when
On Mon, Jun 14, 2021, at 9:35 AM, Nikita Popov wrote:
> Hi internals,
>
> With the introduction of enums, it's now possible for constants to hold
> objects. However, this works only when using the `const X = Y` syntax, not
> when using `define('X', Y)`, which still excludes objects.
>
> I've subm
On Mon, Jun 14, 2021 at 5:02 PM Nikita Popov wrote:
> In the future, we're going to switch these resources to be objects, so
> allowing them in constants would be necessary at that point at least.
> Actually, we already encountered this as a BC issue when switching some
> other resource types to
On Mon, Jun 14, 2021 at 4:42 PM Marco Pivetta wrote:
> Hey NikiC,
>
> On Mon, Jun 14, 2021, 16:35 Nikita Popov wrote:
>
>> Hi internals,
>>
>> With the introduction of enums, it's now possible for constants to hold
>> objects. However, this works only when using the `const X = Y` syntax, not
>>
Hey NikiC,
On Mon, Jun 14, 2021, 16:35 Nikita Popov wrote:
> Hi internals,
>
> With the introduction of enums, it's now possible for constants to hold
> objects. However, this works only when using the `const X = Y` syntax, not
> when using `define('X', Y)`, which still excludes objects.
>
> I'v
Hi internals,
With the introduction of enums, it's now possible for constants to hold
objects. However, this works only when using the `const X = Y` syntax, not
when using `define('X', Y)`, which still excludes objects.
I've submitted https://github.com/php/php-src/pull/7149 to relax the
restrict