Re: file_exists and array_merge_clobber

From: Date: Wed, 01 Oct 2003 12:46:40 +0000
Subject: Re: file_exists and array_merge_clobber
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-4644@lists.php.net to get a copy of this message
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 will avoid any confusion with file_exists and more clearly define the purpose. In addition, it would allow people whose hosts have put ini_get() and get_include_path() in php.ini's disabled_functions setting to still test for inclusion potential, and safely. Regards, Greg

« previous php.internals (#4644) next »