Skip to content

Conversation

nielsdos
Copy link
Member

No description provided.

Copy link
Member

@iluuu1994 iluuu1994 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Side-note: I looked through the uses of ZEND_AST_CALL in zend_compile.c, and I think the same is necessary for zend_compile_var_inner() (the if (CG(memoize_mode) != ZEND_MEMOIZE_NONE) { branch). This will ensure (1 |> foo(..))->bar ??= 2 doesn't execute foo() twice.

Edit: Nevermind, it seems this is disallowed (https://3v4l.org/KPGL2/rfc#vgit.master, Cannot use temporary expression in write context), though I don't completely see why. Edit 2: Ah, likely because pipes are not considered variables, but plain function calls are.

@nielsdos nielsdos closed this in c98b173 Aug 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants