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
Stdlib: var_export() — objects with __debugInfo must export via hook (ext/standard/var.c) #4854
var_export() on objects implementing __debugInfo() should produce a ClassName::__set_state(array(...)) string using the array returned by the magic method (same as Zend). This compiler throws LogicException: var_export() does not support this value type.
var_dump() already documents __debugInfo hook support (#3133, #3259); var_export() object subset (#3594) does not invoke it.
php-src reference
php/php-src ext/standard/var.c — php_var_export() → php_object_export() → zend_call_known_instance_method for __debugInfo
Unclaiming: issue repro already matches Zend PHP 8.2 — var_export() does NOT invoke __debugInfo (only var_dump/print_r do per php.net). Both Zend and VM print empty __set_state(array()) for class D with only __debugInfo. With private property, Zend exports secret=>99 but VM omits it (scope bug) — that is ZEND_PROP_PURPOSE_VAR_EXPORT parity, not __debugInfo. Picking a different issue.
Unclaiming: php-src parity confirmed — var_export() does NOT invoke __debugInfo (only var_dump/print_r per php.net language.oop5.magic.php and ext/standard/var.c ZEND_PROP_PURPOSE_VAR_EXPORT). Zend and VM both print empty __set_state(array()) for class D with only __debugInfo. Issue spec contradicts Zend; recommend closing as invalid/wontfix.
Activity
PurHur commentedon Jun 14, 2026
claim: PHP Compiler STD Lib — starting this run
PurHur commentedon Jun 14, 2026
Unclaiming: issue repro already matches Zend PHP 8.2 — var_export() does NOT invoke __debugInfo (only var_dump/print_r do per php.net). Both Zend and VM print empty __set_state(array()) for class D with only __debugInfo. With private property, Zend exports secret=>99 but VM omits it (scope bug) — that is ZEND_PROP_PURPOSE_VAR_EXPORT parity, not __debugInfo. Picking a different issue.
PurHur commentedon Jun 15, 2026
claim: PHP Compiler STD Lib — starting this run
PurHur commentedon Jun 15, 2026
Unclaiming: php-src parity confirmed — var_export() does NOT invoke __debugInfo (only var_dump/print_r per php.net language.oop5.magic.php and ext/standard/var.c ZEND_PROP_PURPOSE_VAR_EXPORT). Zend and VM both print empty __set_state(array()) for class D with only __debugInfo. Issue spec contradicts Zend; recommend closing as invalid/wontfix.
PurHur commentedon Jun 15, 2026
claim: PHP Compiler STD Lib — starting this run
PurHur commentedon Jun 15, 2026
Unclaiming: Zend parity confirmed — var_export() does not invoke __debugInfo (only var_dump/print_r). VM matches Zend empty __set_state(array()).
PurHur commentedon Jul 18, 2026
Invalid premise (confirmed again this run): Zend
var_export()does not invoke__debugInfo— onlyvar_dump/print_rdo.Zend + VM both emit:
Closing as not planned / incorrect spec. Worker lane A.