Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:4629 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 16426 invoked by uid 1010); 1 Oct 2003 08:00:13 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 16402 invoked from network); 1 Oct 2003 08:00:13 -0000 Received: from unknown (HELO moutng.kundenserver.de) (212.227.126.171) by pb1.pair.com with SMTP; 1 Oct 2003 08:00:13 -0000 Received: from [212.227.126.206] (helo=mrelayng.kundenserver.de) by moutng.kundenserver.de with esmtp (Exim 3.35 #1) id 1A4bu5-0008R8-00; Wed, 01 Oct 2003 10:00:09 +0200 Received: from [217.160.91.103] (helo=php.net) by mrelayng.kundenserver.de with asmtp (Exim 3.35 #1) id 1A4bu5-0002CA-00; Wed, 01 Oct 2003 10:00:09 +0200 Message-ID: <3F7A8997.5010703@php.net> Date: Wed, 01 Oct 2003 10:00:23 +0200 Reply-To: hartmut@php-groupies.de User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030617 X-Accept-Language: en, de MIME-Version: 1.0 To: Justin Hannus CC: internals@lists.php.net References: <005801c3873e$38c71880$4d00a8c0@vandal> <021801c38741$b34407f0$0702a8c0@titan> <20030930181433.30748.qmail@pb1.pair.com> In-Reply-To: <20030930181433.30748.qmail@pb1.pair.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] file_exists and array_merge_clobber From: hartmut@php.net (Hartmut Holzgraefe) Justin Hannus wrote: > 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 directory but is > in your include path, not what you expected. Besides, you can easily > implement this functionality in php. its going to be optional, not mandatory ... but that has already been answered 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() -- Hartmut Holzgraefe