Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:5581 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 49884 invoked by uid 1010); 19 Nov 2003 19:58:44 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 49782 invoked from network); 19 Nov 2003 19:58:44 -0000 Received: from unknown (HELO sunshine.home) (62.178.227.34) by pb1.pair.com with SMTP; 19 Nov 2003 19:58:44 -0000 Received: from mfischer by sunshine.home with local (Exim 4.22) id 1AMYC2-0002ND-Gc for internals@lists.php.net; Wed, 19 Nov 2003 20:40:50 +0100 Date: Wed, 19 Nov 2003 20:40:50 +0100 To: internals@lists.php.net Message-ID: <20031119194049.GA9090@gjat.josefine.at> Mail-Followup-To: Markus Fischer , internals@lists.php.net References: <200311191124.56176.ilia@prohost.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200311191124.56176.ilia@prohost.org> X-Editor: Vim http://www.vim.org/ X-PGP-Key: 0xC2272BD0 at wwwkeys.eu.pgp.net X-PGP-Fingerprint: D3B0 DD4F E12B F911 3CE1 C2B5 D674 B445 C227 2BD0 User-Agent: Microsoft Outlook Express 5.50.4807.1700.314 X-Spamfilter: Fighting it with http://www.spamassassin.org/ and http://razor.sourceforge.net/ Subject: Re: [PHP-DEV] validate_file() and strip_file() From: mfischer@gjat.josefine.at (Markus Fischer) 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