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
dirname('') on an empty string must return '' (empty string). This compiler returns '.', diverging from Zend path parsing and breaking code that distinguishes “no directory component” from “current directory”.
Category
stdlib· php-src-strictProblem
dirname('')on an empty string must return''(empty string). This compiler returns'.', diverging from Zend path parsing and breaking code that distinguishes “no directory component” from “current directory”.php-src reference
ext/standard/basic_functions.c—php_dirname()/php_basename()empty-path edge casesext/standard/dir.c— path component splittingRepro (verified 2026-06-20)
test/repro/maintainer_gap_dirname_empty.php:dirname('')'''.'❌dirname('a')'.''.'✅Scope (PHP-in-PHP first)
ext/standard/dirname.php— empty$pathearly return''test/compliance/cases/stdlib/dirname_empty_string.phptNo new C runtime.
Done when
''on VMdirname('a'),dirname('/a/b')unchangedRelated