|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #24678 BASENAME function - SUFFIX is case-sensitive
Submitted: 2003-07-16 09:23 UTC Modified: 2003-07-16 09:26 UTC
From: taomyn at hotmail dot com Assigned:
Status: Not a bug Package: Filesystem function related
PHP Version: 4.3.2 OS: Windows 2000 Server SP4
Private report: No CVE-ID: None
 [2003-07-16 09:23 UTC] taomyn at hotmail dot com
If you use the "suffix" parameter if BASENAME, the string is treated as case-sensitive, for example:

$fname = "C:\WINDOWS\AFILE.TXT";
print basename($fname,".TXT");

returns "AFILE"


$fname = "C:\WINDOWS\AFILE.TXT";
print basename($fname,".txt");

returns "AFILE.TXT"

Reproduce code:
$fname = "C:\WINDOWS\AFILE.TXT";
print basename($fname,".txt");

Expected result:

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2003-07-16 09:26 UTC]
This is as it should be, not a bug.
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sat Jul 31 21:01:24 2021 UTC