On November 20, 2003 02:22 am, Andi Gutmans wrote:>
> 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...)
> Looks much better now. Please make sure you test it well because it's quite
> sensitive APIs you are using.

Indeed, so far they pass all tests without crashes or leaks and valgrind gives 
it an all clear, so I am pretty happy with it's operation at this point. 
That said, if all the people who gave the functions a +1 would be willing to 
try them just to see if they can make them break (hopefully fail ;) ) that 
would be great.

> 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.

Originally I thought the same thing, but comments by  Markus Fischer (in this 
thread) have convinced me that it would be clearer from user perspective to 
return the error by reference. We still get quite a few bug reports about 
functions that should be checked with === true/false, so I am a little weary 
of adding another such function.

Ilia

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to