You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
var_dump() and debug_zval_dump() print the full anonymous class name with a raw NUL byte #25418
Since 5ed6625 (#23143, %pS migration of ext/standard), var_dump() and debug_zval_dump() print the internal name of an anonymous class, including the NUL byte and the defining file path. PHP 8.5 printed class@anonymous.
The commit changed php_printf("...object(%s)...", ZSTR_VAL(class_name)) to %pS, which prints the whole zend_string. The private property label (zend_unmangle_property_name() + %s) and print_r() still stop at the NUL, so the same dump now shows two different names for one class. The change is in 8.6.0RC6/RC7.
The full name is a deliberate consequence of treating NUL truncation as a bug (#23142), but for dumpers it was not discussed: #23143 had no review, the change is not in NEWS or UPGRADING, and labels and print_r() were left truncated. For 8.6 I suggest restoring %s for the two object headers in ext/standard/var.c (8.5 output); printing the full name consistently in dumps could be discussed for master. @DanielEScherzer, what do you think?
Activity
jorgsowa commentedon Nov 12, 2026
I created suggested fix #25419 but feel free to apply your changes. I wanted only to point up regressions in PHP 8.6.
Girgias commentedon Nov 12, 2026
I'm in favour of just reverting for 8.6, as this change wasn't really discussed and the fact it was hidden might break quite a few assumptions?
Girgias commentedon Nov 12, 2026
Daniel said he'll respond to this later today and would like that any revert be postponed until he has time to reply.
jorgsowa commentedon Nov 12, 2026
Sure, it's not up to me to make any decisions in this matter. That's not really my area of expertise.