Re: file_exists and array_merge_clobber

From: Date: Wed, 01 Oct 2003 13:40:39 +0000
Subject: Re: file_exists and array_merge_clobber
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-4646@lists.php.net to get a copy of this message
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")) {
     include "somefile.php";
}
this would also be confusing as it would behave different like is_readable() etc. esp. for is_executable() it would not be clear wheter it behaves like is_readable() (checking just relative to the current work dir.) or like is_includeable() (checking for existance in $_ENV[PATH]) -- Hartmut Holzgraefe <hartmut@php.net>

« previous php.internals (#4646) next »