Skip to content

RFC: Turn clone() into a function - #18919

Merged
TimWolla merged 14 commits into
php:masterfrom
TimWolla:clone-function
Jun 24, 2025
Merged

RFC: Turn clone() into a function#18919
TimWolla merged 14 commits into
php:masterfrom
TimWolla:clone-function

Conversation

@TimWolla

Copy link
Copy Markdown
Member

This is necessary for `clone()` which does not currently accept a
parameter-less syntax, unless fully-qualified.

@iluuu1994iluuu1994 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM in general

Comment threadZend/tests/clone/bug36071.phpt Outdated
Comment threadZend/tests/clone/bug42817.phpt Outdated
Comment threadZend/zend_builtin_functions.c
Comment threadZend/zend_builtin_functions.c
Comment threadZend/zend_compile.c

@ndosschendossche left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

See my syntax remark. Otherwise seems fine mostly.

Comment threadZend/zend_builtin_functions.c Outdated
Comment threadZend/zend_language_parser.y
Comment threadZend/zend_vm_def.h

@ndosschendossche left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Questions were answered and follow ups were proposed, so this LGTM

@TimWolla
TimWolla merged commit ca49a7b into php:masterJun 24, 2025
@TimWolla
TimWolla deleted the clone-function branch June 24, 2025 18:14
aidvu added a commit to Automattic/apm-agent-php that referenced this pull request Oct 16, 2025
[exit](php/php-src#13483) and [clone](php/php-src#18919) are real functions now.
sdevtop100-dot added a commit to sdevtop100-dot/php-parser that referenced this pull request Feb 17, 2026
Sign up for freeto 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.

3 participants

@TimWolla@iluuu1994@ndossche