php.net |  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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
43 - 41 = ?
Subscribe to this entry?

 
 [2003-07-16 09:23 UTC] taomyn at hotmail dot com
Description:
------------
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"

but

$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:
----------------
AFILE

Actual result:
--------------
AFILE.TXT

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-07-16 09:26 UTC] derick@php.net
This is as it should be, not a bug.
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Wed Aug 12 07:01:25 2020 UTC