Skip to content

Close #9716: match() enum subject must not match scalar int arms - #9783

Merged
PurHur merged 1 commit into
masterfrom
agent/issue-9716-match-enum-subject-scalar-arm
Jun 18, 2026
Merged

PurHur merged 1 commit into
masterfrom
agent/issue-9716-match-enum-subject-scalar-arm

Conversation

@PurHur

@PurHur PurHur commented Jun 18, 2026

Copy link
Copy Markdown
Owner

Summary

Verification

Issue repro (VM + JIT):

./script/docker-exec.sh -- bash -lc 'source script/php-env.sh
php bin/vm.php test/repro-maintainer/match_enum_subject_scalar_arm.php
php bin/jit.php test/repro-maintainer/match_enum_subject_scalar_arm.php
'

Output (both):

case_hit

Compliance:

./script/docker-exec.sh -- bash -lc 'source script/php-env.sh
php vendor/bin/phpunit test/compliance/MatchVMTest.php --filter match_enum_subject_scalar_arm
php vendor/bin/phpunit test/compliance/MatchJITTest.php --filter match_enum_subject_scalar_arm
'
OK (1 test, 1 assertion)  # VM
OK (1 test, 1 assertion)  # JIT

php-src reference

Closes #9716

Made with Cursor

Behavior already matches Zend via identicalTo enum/scalar rejection;
add issue repro, maintainer script, and VM/JIT phpt guards.

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur
PurHur merged commit 3602d36 into master Jun 18, 2026
@PurHur
PurHur deleted the agent/issue-9716-match-enum-subject-scalar-arm branch June 18, 2026 23:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Language: match() enum-case subject must not match scalar int arms via backing coercion (Zend/zend_execute.c)

1 participant