Bug->Doc #67048 [Opn->Ver]: pathinfo() doesn't document parsing of dot-files

From: Date: Wed, 22 Jun 2016 14:16:25 +0000
Subject: Bug->Doc #67048 [Opn->Ver]: pathinfo() doesn't document parsing of dot-files
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-13585@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=67048&edit=1 ID: 67048 Updated by: cmb@php.net Reported by: russellbarnhart at gmail dot com -Summary: pathinfo() incorrectly parsing hidden file paths +Summary: pathinfo() doesn't document parsing of dot-files -Status: Open +Status: Verified -Type: Bug +Type: Documentation Problem Package: Filesystem function related Operating System: *nix PHP Version: Irrelevant -Assigned To: +Assigned To: cmb Block user comment: N Private report: N Previous Comments: ------------------------------------------------------------------------ [2015-02-15 21:20:37] cmbecker69 at gmx dot de pathinfo's behavior wrt. "hidden" files might be debatable (under the assumption that extension is defined as everything after the rightmost dot in the basename, it is not a bug). However, the behavior is the same since PHP 4.3 at least[1], so changing it would be a massive BC break. I suggest to improve the documentation, and to change the issue to "Documentation problem" respectively. [1] <http://3v4l.org/hsDPm> ------------------------------------------------------------------------ [2014-04-09 12:51:22] russellbarnhart at gmail dot com Description: ------------ The function pathinfo() assumes all files that have a basename starting with a period only have an extension. This bug is present in at least 5.3.x to 5.5.x. Test script: --------------- # copy & paste into a shell php -r "print_r(pathinfo('/some/path/.test'));" Expected result: ---------------- Array ( [dirname] => /some/path [basename] => .test [extension] => [filename] => .test ) Actual result: -------------- Array ( [dirname] => /some/path [basename] => .test [extension] => test [filename] => ) ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=67048&edit=1

« previous php.doc.bugs (#13585) next »