Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:15090 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 30896 invoked by uid 1010); 18 Feb 2005 12:18:18 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 30871 invoked by uid 1007); 18 Feb 2005 12:18:18 -0000 Message-ID: <20050218121817.30870.qmail@lists.php.net> To: internals@lists.php.net Date: Fri, 18 Feb 2005 13:17:12 +0100 References: <005801c5156b$ae0711b0$0201a8c0@gabriel> <855185390.20050218092558@marcus-boerger.de> <008701c515a7$4fec38d0$0201a8c0@gabriel> Lines: 67 User-Agent: KNode/0.8.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8Bit X-Posted-By: 84.154.13.109 Subject: Re: [PHP-DEV] function proposal - php_check_syntax_string From: johannes@php.net (Johannes Schlueter) Hi Fred, this patch doesn't just check wether the string has the right syntax but also compiles it and registers it's functions and classes in the relevant tables. $ sapi/cli/php -r "php_check_syntax_string('class foo {}'); var_dump(class_exists('foo'));" bool(true) johannes Unknown Sender wrote: > Hello Marcus, > > Based on 5.0.3 source distribution, inspired of parsekit_compile_string > > fred > ----- Original Message ----- > From: "Marcus Boerger" > To: "Frédéric LECOINTRE" > Cc: > Sent: Friday, February 18, 2005 9:25 AM > Subject: Re: [PHP-DEV] function proposal - php_check_syntax_string > > > | Hello Frédéric, > | > | do you have some c code you can post here as a .txt attachment or as a > link? > | > | regards > | marcus > | > | Friday, February 18, 2005, 4:41:06 AM, you wrote: > | > | > hi all, > | > | > to check syntax of pieces of code and to avoid wild regular > | > expressions, > i > | > wrote this: > | > | > proto bool php_check_syntax_string(string string [, &$error_message]) > | > | > like php_check_syntax but on string > | > it will be useful for applications who have to store valid code like > smarty, > | > ... > | > is it possible to add it? > | > | > regards > | > | > fred > | > | > | > | > | -- > | Best regards, > | Marcus mailto:helly@php.net > | -- Johannes Schlüter Mayflower GmbH / ThinkPHP http://thinkphp.de http://blog.thinkphp.de