Re: validate_file() and strip_file()

From: Date: Wed, 19 Nov 2003 19:40:50 +0000
Subject: Re: validate_file() and strip_file()
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-5581@lists.php.net to get a copy of this message
On Wed, Nov 19, 2003 at 11:24:56AM -0500, Ilia Alshanetsky wrote : > Attached file, implements validate_file(), which implements a php space syntax > check for PHP scripts. It returns a boolean true/false value indicating > whether the script has parse errors or not. Essentially a "php -l" from > within PHP. As someone else already suggested, providing the error message would be a good (=foreseeing) idea. Maybe it's possible to have something like: bool php_check_syntax($filename [, &$error_message]); which returns the error message as the second parameter. As a sidenote, would streams be supported (http, ftp) ? Or are there some kind of limitating factors? - Markus

« previous php.internals (#5581) next »