php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #32856 file(dir) returns array with 1 element containg dir-contents
Submitted: 2005-04-27 15:08 UTC Modified: 2005-04-27 15:48 UTC
From: arjen at mediamonks dot com Assigned:
Status: Not a bug Package: Filesystem function related
PHP Version: 5CVS-2005-04-27 (dev) OS: FreeBSD
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: arjen at mediamonks dot com
New email:
PHP Version: OS:

 

 [2005-04-27 15:08 UTC] arjen at mediamonks dot com
Description:
------------
file('./'); returns an array with 1 element, containing a string which shows weird characters, but between those are some filenames of files in the directory.

Reproduce code:
---------------
var_dump(file('./'));

Expected result:
----------------
Array(0) { }

Actual result:
--------------
array(1) { [0]=> string(512) " - lots of characters here - " }

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-04-27 15:21 UTC] sniper@php.net
Does NOT happen with Linux.

 [2005-04-27 15:48 UTC] sniper@php.net
According to people who know FreeBSD better this is not a bug. It's just how FreeBSD works.

 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Jul 26 06:00:03 2025 UTC