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
Path builtins accept backed enum case path operands on VM (dirname, basename, realpath succeed; pathinfo throws generic build Error) while Zend throws TypeError on all four.
Distinct from filesystem stat/stream path guards (#5735 covers file_get_contents/fopen/… but not the pathinfo family).
Category
stdlib(php-src-strict)Problem
Path builtins accept backed enum case path operands on VM (
dirname,basename,realpathsucceed;pathinfothrows generic buildError) while Zend throwsTypeErroron all four.Distinct from filesystem stat/stream path guards (#5735 covers
file_get_contents/fopen/… but not the pathinfo family).php-src reference
ext/standard/url.c—php_dirname,php_basenameext/standard/filestat.c—php_realpathext/standard/basic_functions.c—PHP_FUNCTION(pathinfo)Repro (verified 2026-06-04)
dirnameTypeErrorbasenameTypeErrorrealpathTypeErrorpathinfoTypeErrorScope (PHP-in-PHP)
ext/standard/dirname.php,basename.php,realpath.php,pathinfo.php— path arg validator rejectingTYPE_ENUM_CASEJit*lowererstest/compliance/cases/stdlib/pathinfo_enum_type_error.phptAcceptance
TypeErrormatching Zend on enum path operands./script/ci-fast.sh --filter pathinfo_enumgreenRelated