Re: file_exists and array_merge_clobber

From: Date: Wed, 01 Oct 2003 08:06:51 +0000
Subject: Re: file_exists and array_merge_clobber
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-4630@lists.php.net to get a copy of this message
On Wed, Oct 01, 2003 at 10:00:23AM +0200, Hartmut Holzgraefe wrote: > the whole point about this additional feature is that you can use it to > check > for include file existance before the actual include: > > if (file_exists("somefile.php", true)) { > include "somefile.php"; > } > > IMHO this case is common enough so that it deserves a native C > implementation > either as an option to file_exists() or as a seperate function like > file_exists_in_path() If we're really going to go down this road, why not implement it in a more generic, reusable way: file_exists("somefile.php", ini_get('include_path')) That would give us some additional mileage out of the change. For the record, I'm -0 on this. I'd be -1 if it wasn't so obviously optional. -- Jon Parise (jon@php.net) :: The PHP Project (http://www.php.net/)

« previous php.internals (#4630) next »