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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
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: Fri Apr 26 04:01:30 2024 UTC