Re: is_a2z would be nice...

From: Date: Mon, 23 Oct 2000 10:51:22 +0000
Subject: Re: is_a2z would be nice...
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-35863@lists.php.net to get a copy of this message
Stanislav Malyshev wrote: > isalpha, isdigit, isspace, isxdigit, isalnum... Anyone? i'll put up a package called 'ctype' as a standalone extension to http://www.zugeschaut-und-mitgebaut.de/php/php-ctype.tar.gz in a minute it will contain the complete set of C's is...() functions as defined in ctype.h when passing an integer as argument theese will behave like their C counterparts when passing a string they'll only return true if all the characters in the string are of the requested type the reason for setting up a standalone extension is that this one also serves as a testing environment for the proposed 'deprecate' and 'experimental' features the solution i have come up with involves some Preprocessor magic so i don't want to put into the CVS until i've got some feedback on it i have defined two macros PHP_EXPERIMENTAL(version,comment) and PHP_DEPRECATE(version,comment) that work by calling a function that will produce a warning message (controlable by php.ini settings) and return an integer that is assigned to a dummy variable introduced by the macros this way it is possible to have PHP_DEPRECATE or PHP_EXPERIMENTAL at the very top of a function body, making it more obvious for the human reader and some yet-to-come mechanism to enroll this additional info into the manual automatically the dummy variable and the call to the warning function add some slight overhead to the execution of experimental and deprecate functions, but as they are not supposed to be used extensively in production environments anyway this shouldn't harm to much for those who really care anbout performance issues i have prepared the possibility to have the whole new code disabled at configure time so that it won't be compiled in, leaving the produced code as it is now ... -- Hartmut Holzgraefe hartmut@six.de http://www.six.de +49-711-99091-77 Besuchen Sie uns auf der Buchmesse in Frankfurt, Halle 4.0, Stand D 1117 und auf der Systems in München , Halle C2, Stand 126

« previous php.dev (#35863) next »