php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #42244 file_exists() always returns TRUE with the filename as wild-card char(*) on Win
Submitted: 2007-08-08 10:09 UTC Modified: 2007-08-09 10:50 UTC
From: mahesh dot vemula at in dot ibm dot com Assigned:
Status: Not a bug Package: Performance problem
PHP Version: 6CVS-2007-08-08 (snap) OS: Windows XP
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 you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: mahesh dot vemula at in dot ibm dot com
New email:
PHP Version: OS:

 

 [2007-08-08 10:09 UTC] mahesh dot vemula at in dot ibm dot com
Description:
------------
file_exists() function behavior on PHP6 differs with PHP5 for the filenames containing wild-card char(*). 
PHP6 always returns TRUE for the file name with "*", and matches any file with the filename containing wild-card char(*). This is happening only for Windows.

Reproduce code:
---------------
<?php
var_dump( file_exists("*") );
?>

Expected result:
----------------
bool(false)

Actual result:
--------------
bool(true)

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-08-09 10:50 UTC] mahesh dot vemula at in dot ibm dot com
The probelm is fixed in latest snapshot.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun Jan 05 06:01:27 2025 UTC