Re: validate_file() and strip_file()

From: Date: Thu, 20 Nov 2003 07:22:17 +0000
Subject: Re: validate_file() and strip_file()
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-5603@lists.php.net to get a copy of this message
Looks much better now. Please make sure you test it well because it's quite sensitive APIs you are using. About the return value, I think it should return the error message or true on success. Then people could use === to check what they got (I prefer that over Markus' idea). Then again I'm not completely sure about it so it depends on what you think is the easiest. Andi P.S.-If you think php_strip_whitespace() is misleading then see if you can find a better name. I think php_strip() is just too short and will be confused with strip() (which doesn't exist but still...) At 08:23 PM 11/19/2003 -0500, Ilia Alshanetsky wrote:
Here is the revised patch. It is now much cleaner (no more lexer stuff) and supports few additional features. By popular demand the functions have been renamed to php_check_syntax() & php_strip_whitespace(). php_check_syntax() can now handle remote scripts and if a 2nd (optional) argument is passe,d in the event of the parse error it'll contain the error message, file name & line number. php_strip_whitespace() can now handle remote scripts the rest of the functionality remains the same. Ilia -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php


« previous php.internals (#5603) next »