>> 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... > Function/Class declaration is part and parcel to the current ZE parser. A global *could* be added to restrict adding functions/classes to EG(function_table)/EG(class_table), something like CG(register_functions) = 0 and CG(register_classes) = 0 or something. It'd only be one extra if statement per declaration so it certainly doesn't *seem* all that bad. It's up to the Zend folks though. As mentioned earlier, parsekit has a hackish workaround by comparing the hash tables before/after compilation and to my knowledge it hasn't had any major issues, so it's not a *necessary* thing.
-Sara -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php