Re: Warnings in include files suddenly treated as fatal

From: Date: Fri, 30 Jan 2004 17:03:41 +0000
Subject: Re: Warnings in include files suddenly treated as fatal
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-7427@lists.php.net to get a copy of this message
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

« previous php.internals (#7427) next »