Skip to content

Add compliance tests for get_class() on enum cases (#5484) - #7944

Merged
PurHur merged 1 commit into
masterfrom
agent/issue-5484-get-class-enum
Jun 11, 2026
Merged

PurHur merged 1 commit into
masterfrom
agent/issue-5484-get-class-enum

Conversation

@PurHur

@PurHur PurHur commented Jun 11, 2026

Copy link
Copy Markdown
Owner

Summary

php-src reference

  • ext/standard/basic_functions.czif_get_class() enum branch
  • Zend/zend_enum.c — enum object class name

Verification

./script/docker-exec.sh -- bash -lc 'source script/php-env.sh
php test/repro/parity_get_class_enum.php
php bin/vm.php test/repro/parity_get_class_enum.php
php bin/jit.php test/repro/parity_get_class_enum.php
vendor/bin/phpunit --filter get_class_enum test/compliance/ test/aot/AotTest.php
'

Output:

string(1) "E"
string(1) "E"
string(6) "Status"
string(5) "Plain"
(... VM/JIT identical ...)
OK (5 tests, 5 assertions)

Closes #5484

Made with Cursor

Lock php-src parity for get_class(E::A) on VM, JIT, and AOT paths; behavior was already correct via ext/standard/get_class_.php and JitGetClass.

Co-authored-by: Cursor <cursoragent@cursor.com>
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.

Stdlib: get_class() on enum case must return enum name not false (ext/standard/basic_functions.c)

1 participant