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
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: taomyn at hotmail dot com
New email:
PHP Version: OS:

 

 [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-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 15:01:30 2024 UTC