Re: function proposal - php_check_syntax_string
| From: | Johannes Schlueter | Date: | Fri, 18 Feb 2005 23:16:33 +0000 |
| Subject: | Re: function proposal - php_check_syntax_string | ||
| References: | 1 2 3 4 5 6 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-15103@lists.php.net to get a copy of this message | ||
Hi,
Frédéric LECOINTRE wrote:
> oups ... well.
>
> php_check_syntax works fine with zend_compile_file. so what's the
No, it doesn't work fine, too :-)
http://bugs.php.net/bug.php?id=27406
But I didn't know the problem either when reading your patch where I
stumbled over the compile_string() call.
> difference? i read parse_kit extension and after compiling, attempt to
> remove class and function with "php_parsekit_common".
>
> Is there possibilty to run syntax check only with compil_string in
> zend_language_scanner.c (or something else) instead of removing the
> introduced code?
No. At least I don't know a how (but I don't know everything about the
engine) The only thing I currently can think of is using the scanner to
tokenize the string (using zend_prepare_string_for_scanning() and
lex_scan()) but such a solution would only reject totally bogus code and
wouldn't tell you wether the code was valid...
johannes
--
Johannes Schlüter Mayflower GmbH / ThinkPHP
http://thinkphp.de http://blog.thinkphp.de