Re: function proposal - php_check_syntax_string
| From: | Marcus Boerger | Date: | Sun, 20 Feb 2005 04:32:57 +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-15120@lists.php.net to get a copy of this message | ||
Hello Frédéric,
what happend to defines (when redefining) and what happens to
__autoload()? I guess the latter would result ina crash becuase
the engine would register __autoload() and the next class to
load results in call to a non existing function. If at all you
should try with Alan's idea of swapping the globals completley.
regards
marcus
Saturday, February 19, 2005, 3:11:33 PM, you wrote:
> Hello all,
> With Val Khokhlov's help:
> sapi/cli/php -r "php_check_syntax_string('class foo {}');
> var_dump(class_exists('foo'));"
> bool(false)
> thanks :-)
> The original purpose is to valid small code like
> $foo->bar($foo->bar($blah,$foo,44,"foo",$foo[0].bar))
> and avoid regexp ( good example in Smarty_Compiler.class.php#144-164 with
> limitations)
> fred
> ----- Original Message -----
> From: "Johannes Schlueter" <johannes@php.net>
> To: <internals@lists.php.net>
> Sent: Friday, February 18, 2005 1:17 PM
> Subject: Re: [PHP-DEV] function proposal - php_check_syntax_string
> | 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
> |
--
Best regards,
Marcus mailto:helly@php.net