Re: Making sure an include file works
| From: | Jim Lucas | Date: | Fri, 29 Feb 2008 04:53:05 +0000 |
| Subject: | Re: Making sure an include file works | ||
| References: | 1 2 3 4 5 6 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-270707@lists.php.net to get a copy of this message | ||
Robert Cummings wrote:
On Thu, 2008-02-28 at 20:46 -0800, Jim Lucas wrote:It isn't my words. Look at the versions the function is available for. PHP 5 <= 5.0.4Robert Cummings wrote:I'm trying to figure out a way to make sure an included PHP file has no syntax errors before actually including it as a part of project. Is this even possible? I'm running into brick walls.On Thu, 2008-02-28 at 20:17 -0800, Casey wrote:On Thu, Feb 28, 2008 at 7:50 PM, Robert Cummings <robert@interjinn.com> wrote:On Thu, 2008-02-28 at 18:58 -0800, Richard S. Crawford wrote:That's funny given the thread so far :D Cheers, Rob.Point to be noted. Check the first note. Note: For technical reasons, this function is deprecated and removed from PHP. Instead, use php -l somefile.php from the commandline.Doh! Time for me to start trawling the PHP site again to acquaint myself with all the new functions :) I probably would have found it though if searching the site's functions for syntax didn't take me directly to the documentation for soundex(). Cheers, Rob.I don't believe there is a function to do this. What can be done though is to call the cli binary with the -l flag and have the file syntax checked that way.http://us.php.net/manual/en/function.php-check-syntax.phpphp -l /path/to/the/sourceIt wouldn't be very fast though as a solution.