I agree with Dmitri and Ferenc.

-1 on this idea, it's unnecessary.

> the reason for this is simple actually at the moment if you want to include
> a file for usage but want to check it exists you have todo the following
> if (file_exists("/file/located/here.php")) {
>  $cFile = "/file/located/here.php";
> }

On Wed, Jan 4, 2012 at 4:54 PM, Dmitri Snytkine
<dsnytk...@ultralogistics.com> wrote:
> pretty sure it's a bad idea because this function expected to return
> true/false
> Not to mention it is completely unnecessary since you can assign path to a
> var
> $file = '/path/file.txt';
> if(!file_exists($file)){
> // you already have access to $file
> }
>
> Dmitri Snytkine
> Web Developer
> Ultra Logistics, Inc.
> Phone: (888) 220-4640 x 2097
> Fax: (888) 795-6642
> E-Mail: dsnytk...@ultralogistics.com
> Web: www.ultralogistics.com
>
> "A Top 100 Logistics I.T. Provider in 2011"
>
>
> -----Original Message-----
> From: Keloran [mailto:ava...@gmail.com]
> Sent: Wednesday, January 04, 2012 11:19 AM
> To: PHP Internals
> Subject: [PHP-DEV] Feature Request
>
> I dont seem to have the karma for doing this in RFC so ill propose it here,
> and once karma make an RFC
>
> Is it possible to have a 2nd option on file_exists so that it returns the
> path you specified
>
> --Example
> $cFile = file_exists("/file/located/here.php", true);
>
> and if that exists it will return
> /file/located/here.php
>
> instead of true
>
> --Reason
> the reason for this is simple actually at the moment if you want to include
> a file for usage but want to check it exists you have todo the following
> if (file_exists("/file/located/here.php")) {
>  $cFile = "/file/located/here.php";
> }
>
> which can if your doing lots of checking alot of extra code for no reason,
> or if you want to use variables, lots of louse variables just for something
> that could be pulled from the request
>
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to