Re: [PHP-DEV] file_exists and array_merge_clobber

2003-10-01 Thread Hartmut Holzgraefe
Greg Beaver wrote: In keeping with other functions that test pseudo-types like is_callable(), why not create a new function is_includeable() that will take a filename/path, and use include_path by default, or accept an optional array of paths to search. if (is_includeable("somefile.php")) {

Re: [PHP-DEV] file_exists and array_merge_clobber

2003-10-01 Thread Greg Beaver
In keeping with other functions that test pseudo-types like is_callable(), why not create a new function is_includeable() that will take a filename/path, and use include_path by default, or accept an optional array of paths to search. if (is_includeable("somefile.php")) { include "somefile

RE: [PHP-DEV] file_exists and array_merge_clobber

2003-10-01 Thread Lukas Smith
> From: Jon Parise [mailto:[EMAIL PROTECTED] > Sent: Wednesday, October 01, 2003 10:07 AM > 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

Re: [PHP-DEV] file_exists and array_merge_clobber

2003-10-01 Thread Jon Parise
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 thi

Re: [PHP-DEV] file_exists and array_merge_clobber

2003-10-01 Thread Hartmut Holzgraefe
Justin Hannus wrote: I agree with Wez, what if you are searching for a file with a relative file path, e.g: would return true if "somefile.php" is not in the current directory but is in your include path, not what you expected. Besides, you can easily implement this functionality in php. its going

Re: [PHP-DEV] file_exists and array_merge_clobber

2003-09-30 Thread Justin Hannus
Aahh, I didn't see that in your original message :) "Lukas Smith" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > From: Justin Hannus [mailto:[EMAIL PROTECTED] > > Sent: Tuesday, September 30, 2003 8:12 PM > > > > I agree with Wez, what if you are searching for a file with a relat

RE: [PHP-DEV] file_exists and array_merge_clobber

2003-09-30 Thread Lukas Smith
> From: Justin Hannus [mailto:[EMAIL PROTECTED] > Sent: Tuesday, September 30, 2003 8:12 PM > > I agree with Wez, what if you are searching for a file with a relative > file > path, e.g: > > if (file_exists("somefile.php")) > // ... > > would return true if "somefile.php" is not in the current

Re: [PHP-DEV] file_exists and array_merge_clobber

2003-09-30 Thread Justin Hannus
e other > path). > > --Wez. > > - Original Message - > From: "Lukas Smith" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Tuesday, September 30, 2003 11:32 AM > Subject: [PHP-DEV] file_exists and array_merge_clobber > > > > Hi, >

RE: [PHP-DEV] file_exists and array_merge_clobber

2003-09-30 Thread Lukas Smith
. > > --Wez. > > - Original Message - > From: "Lukas Smith" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Tuesday, September 30, 2003 11:32 AM > Subject: [PHP-DEV] file_exists and array_merge_clobber > > > > Hi, > >

Re: [PHP-DEV] file_exists and array_merge_clobber

2003-09-30 Thread Wez Furlong
2003 11:32 AM Subject: [PHP-DEV] file_exists and array_merge_clobber > Hi, > > We have a new intern who got right to work to improve file_exists() to > also be able to check the include_path similar to how fopen() can. -- PHP Internals - PHP Runtime Development Mailing List To

[PHP-DEV] file_exists and array_merge_clobber

2003-09-30 Thread Lukas Smith
Hi, We have a new intern who got right to work to improve file_exists() to also be able to check the include_path similar to how fopen() can. We have a patch here. Due to some issues on the CVS version of ext/standard/filestat.c in HEAD we commented out some code in the file in order to be able t