php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #8882 Additional argument in funtion file($a, $b)
Submitted: 2001-01-24 07:49 UTC Modified: 2002-04-10 18:07 UTC
From: urs at circle dot ch Assigned:
Status: Closed Package: Feature/Change Request
PHP Version: 4.0.4pl1 OS:
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: urs at circle dot ch
New email:
PHP Version: OS:

 

 [2001-01-24 07:49 UTC] urs at circle dot ch
dear all 

very often the following expression is being used in applications using file manipulation (specially treating XML contents): 

$cont = join ("", file ("test.xml")); 

... i would like to propose an addtional attribute in the argument list of the function file(). 

lets consider that: 
$cont = file ("test.xml", FALSE) or $cont = file ("test.xml") 
                would be equivalent to: 
                $cont = file ("test.xml") 

and on the other hand: 
$cont = file ("test.xml", TRUE) 
                would be equivalent to: 
                $cont = join ("", file ("test.xml")) 

the second argument would therefore represent an attribute, which let one specify not only to return an ARRAY (attribute=FALSE, default) but also a STRING (attribute=TRUE). adding this argument would not affect older or current implementations or usage of the function file(). 

what do you think about this? 

best regards, urs 

--
Urs Gehrig <urs@circle.ch>
http://www.circle.ch 

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-02-09 23:22 UTC] jimw@php.net
this is a duplicate of #5008. (same problem, slightly different proposed solution.)
 [2002-04-10 18:07 UTC] sniper@php.net
Added in PHP 4.3.0 (current CVS HEAD):

http://www.php.net/manual/en/function.file-get-contents.php

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed May 08 21:01:33 2024 UTC