Re: [PHP-DEV] RFC: Short echo tag can also call closures

2023-09-18 Thread Shailesh Humbad
On 9/18/2023 3:36 PM, Larry Garfield wrote: I can see where you're going with this, but as others have noted I don't think it's really the right way to go about it. If the property hooks RFC passes (we're stalled a bit trying to put together benchmarks, sorry), that will solve this use case

Re: [PHP-DEV] RFC: Short echo tag can also call closures

2023-09-18 Thread Robert Landers
On Mon, Sep 18, 2023 at 8:18 PM Shailesh Humbad wrote: > > Hello, > > I'm gauging interest on a proposed change to the short echo tag " > CURRENTLY: > The short echo tag "" is equivalent to "", > which allows for beautiful MVC views like this: > > > title ?> > body ?> > > > INSTEAD: > Change

Re: [PHP-DEV] RFC: Short echo tag can also call closures

2023-09-18 Thread Larry Garfield
On Mon, Sep 18, 2023, at 6:18 PM, Shailesh Humbad wrote: > Hello, > > I'm gauging interest on a proposed change to the short echo tag " > CURRENTLY: > The short echo tag "" is equivalent to "", > which allows for beautiful MVC views like this: > > > title ?> > body ?> > > > INSTEAD: > Change

Re: [PHP-DEV] RFC: Short echo tag can also call closures

2023-09-18 Thread Bruce Weirdan
I think it's a non-starter because it would change how the existing code is interpreted. E.g. currently ``` ``` outputs `rand`, but with your proposal it would invoke `rand()` and output its result. On Mon, Sep 18, 2023 at 8:19 PM Shailesh Humbad wrote: > > Hello, > > I'm gauging interest on

Re: [PHP-DEV] RFC: Short echo tag can also call closures

2023-09-18 Thread Lanre Waju
I think a big part of your problem is misusing PHP constructs. Why are you adding a function as a property? Of course the engine sees it as a method call, you can't even use a callable as the typehint for a property. If the 'body' function is separate from each instance, why not make it a

Re: [PHP-DEV] RFC: Short echo tag can also call closures

2023-09-18 Thread Shailesh Humbad
On 9/18/2023 2:40 PM, Dusk wrote: Surely this can already be accomplished unambiguously using syntax like `` or `title)() ?>` ? In any case, this seems like a non-starter, as it would substantially change the behavior of some existing code, e.g. when echoing objects which implement both

Re: [PHP-DEV] RFC: Short echo tag can also call closures

2023-09-18 Thread Dusk
On Sep 18, 2023, at 11:18, Shailesh Humbad wrote: > INSTEAD: > Change the short echo tag "" to be equivalent to " is_callable($x) ? $x() : echo $x; ?>", which allows view model properties to > be defined as closures. Surely this can already be accomplished unambiguously using syntax like `` or

[PHP-DEV] RFC: Short echo tag can also call closures

2023-09-18 Thread Shailesh Humbad
Hello, I'm gauging interest on a proposed change to the short echo tag "The short echo tag "" is equivalent to "", which allows for beautiful MVC views like this: title ?> body ?> INSTEAD: Change the short echo tag "" to be equivalent to "is_callable($x) ? $x() : echo $x; ?>", which allows

Re: [PHP-DEV] [RFC] [Discussion] DOM HTML5 parsing and serialization support

2023-09-18 Thread Niels Dossche
Hi Stephen On 18/09/2023 08:46, Stephen Reay wrote: > > >> On 17 Sep 2023, at 18:28, Niels Dossche wrote: >> >> Hi Alexandru >> >> On 9/17/23 11:59, Alexandru Pătrănescu wrote: >>> On Sat, Sep 16, 2023, 02:17 Niels Dossche wrote: >>> We'll add a common abstract base class

Re: [PHP-DEV] A new JIT engine for PHP-8.4/9

2023-09-18 Thread Dmitry Stogov
On Sat, Sep 16, 2023 at 12:46 PM Hans Henrik Bergan wrote: > I think the submodule approach is fine, but maybe it should be moved from > Dmitry's gh to php-src gh, or maybe it's own dedicated group, to reduce the > bus factor (how much work needs to be done if Dmitry is hit by a bus~) > ``git

Re: [PHP-DEV] A new JIT engine for PHP-8.4/9

2023-09-18 Thread Dmitry Stogov
On Sat, Sep 16, 2023 at 1:22 AM Tim Düsterhus wrote: > Hi > > On 9/15/23 17:50, Ben Ramsey wrote: > > Additionally, despite the use of a Git submodule complicating things for > > "everyone else," it provides a clear dependency and development > > boundary, avoiding situations where the php-src

Re: [PHP-DEV] A new JIT engine for PHP-8.4/9

2023-09-18 Thread Dmitry Stogov
On Mon, Sep 18, 2023 at 8:01 AM Pierre Joye wrote: > Great work! This is a massive jump for PHP. Thank you :) > > I don't have much concerns about the license etc as the ZE is already > under Zend the ZE license (never updated since Perforce acquired them, > tho'): > >

Re: [PHP-DEV] [RFC] [Discussion] DOM HTML5 parsing and serialization support

2023-09-18 Thread Stephen Reay
> On 17 Sep 2023, at 18:28, Niels Dossche wrote: > > Hi Alexandru > > On 9/17/23 11:59, Alexandru Pătrănescu wrote: >> On Sat, Sep 16, 2023, 02:17 Niels Dossche wrote: >> >>> >>> We'll add a common abstract base class DOM\Document (name taken from the >>> DOM spec & Javascript world). >>>

Re: [PHP-DEV] A new JIT engine for PHP-8.4/9

2023-09-18 Thread Dmitry Stogov
Hi Ben, On Fri, Sep 15, 2023 at 6:50 PM Ben Ramsey wrote: > On 9/15/23 09:35, Derick Rethans wrote: > > > I understand that working on an RFC for such a complex issue is going to > > take time, but that also gives to opportunity to pair with somebody, > > who, while writing it, will also learn

Re: [PHP-DEV] A new JIT engine for PHP-8.4/9

2023-09-18 Thread Dmitry Stogov
Hi Derick, On Fri, Sep 15, 2023 at 5:35 PM Derick Rethans wrote: > I think this is great work. It looks like the new JIT-IR approach is > more suitable. I have however concerns with a few things here. > > This is a lot of new code, that very few other people understand in > great detail. > > I