Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:7427 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 55464 invoked by uid 1010); 30 Jan 2004 17:03:56 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 55436 invoked from network); 30 Jan 2004 17:03:56 -0000 Received: from unknown (HELO colo.lerdorf.com) (66.198.51.121) by pb1.pair.com with SMTP; 30 Jan 2004 17:03:56 -0000 Received: from rasmus2.corp.yahoo.com (rasmus2.corp.yahoo.com [207.126.233.18]) by colo.lerdorf.com (8.12.11/8.12.11/Debian-1) with ESMTP id i0UH3ker000421; Fri, 30 Jan 2004 09:03:46 -0800 Date: Fri, 30 Jan 2004 09:03:41 -0800 (PST) X-X-Sender: rasmus@thinkpad.lerdorf.com To: Ilia Alshanetsky cc: internals@lists.php.net In-Reply-To: <200401300959.41785.ilia@prohost.org> Message-ID: References: <200401300959.41785.ilia@prohost.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Status: No, hits=-4.8 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on colo Subject: Re: [PHP-DEV] Warnings in include files suddenly treated as fatal From: rasmus@php.net (Rasmus Lerdorf) On Fri, 30 Jan 2004, Ilia Alshanetsky wrote: > It seems like the only way to distinguish between a parse error and a > non-existant file for regular include() is by doing a zend_stream_open() upon > failure to determine if the file is avaliable. If it is, then we return a > parse error and if it does not we continue execution. This does add a small > overhead for failed includes, but IMHO if a non-existant files are being > included performance is not a big consideration. Granted, I haven't looked closely at the code, but PHP knows that failure to open an include file is an E_WARNING not an E_ERROR. An E_WARNING should never cause script execution to terminate. If we already know it is non-fatal, why is the extra check needed? -Rasmus