Skip to content

Fix GH-25418: Fix var_dump() printing full anonymous class name with NUL byte - #25419

Open
jorgsowa wants to merge 1 commit into
php:PHP-8.6from
jorgsowa:fix-var-dump-anon-class-nul
Open

jorgsowa wants to merge 1 commit into
php:PHP-8.6from
jorgsowa:fix-var-dump-anon-class-nul

Conversation

@jorgsowa

Copy link
Copy Markdown
Contributor

The %pS migration made var_dump() and debug_zval_dump() print the whole anonymous class name, including the NUL byte and file path, while property labels and print_r() still show class@anonymous.

The %pS migration made var_dump() and debug_zval_dump() print the whole
anonymous class name, including the NUL byte and file path, while
property labels and print_r() still show class@anonymous.
@jorgsowa
jorgsowa force-pushed the fix-var-dump-anon-class-nul branch from 748fca0 to c89d4c3 Compare November 12, 2026 13:01
@jorgsowa jorgsowa changed the title Fix-25418: Fix var_dump() printing full anonymous class name with NUL byte Fix GH-25418: Fix var_dump() printing full anonymous class name with NUL byte Nov 12, 2026
@bwoebi

bwoebi commented Nov 13, 2026

Copy link
Copy Markdown
Member

I think that's a feature, not a bug.
This gives clarity which anonymous class exactly was used.

@jorgsowa

Copy link
Copy Markdown
Contributor Author

If it's feature, then it's inconsistent, because property labels and print_r() still show truncated class@anonymous. And also bit problematic feature seeing the stage of release cycle (8.6) it was merged into. I think this is also for release managers to decide what should be done.

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.

var_dump() and debug_zval_dump() print the full anonymous class name with a raw NUL byte

2 participants