php-developer-list | 2000111
Date: 11/03/00
- Next message: enrik <email protected>: "[PHP-DEV] Bug #7614: functions/recode.c fails to compile as extension module"
- Previous message: tkruthoff <email protected>: "[PHP-DEV] PHP 4.0 Bug #7613: ~E_NOTICE error reporting no longer works properly"
- In reply to: Andi Gutmans: "[PHP-DEV] 4.0.4"
- Next in thread: Andi Gutmans: "Re: [PHP-DEV] 4.0.4"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Did anybody have a look at my ctype extensions?
(http://www.zugeschaut-und-mitgebaut.de/php/php-ctype.tar.gz)
(As this got out immediately before the list and cvs
server stopped responding i'm not sure it got public)
I'd like to add isalpha() and friends into ext/standard,
i think C-Coders are so used to them that they deserve
to live there. On the other hand we already have some
is*() functions that serve a very different purpose so
it might be ok to keep them as an extension of their own
or at least in a different namespace like ctype_alhpa()?
The second thing included in the ctype extension is a
sample implementation of a deprecate/experimental
tagging feature for functions i'd like to introduce into
the mainstream code immediately _after_ 4.0.4 release.
Any comments on that?
(i already got a suggestion to have the error level for
'experimental' and 'deprecate' warnings configurable,
this will get in but for now i haven't changed the
standalone extension)
----- Original message ----------------------
Subject: Re: is_a2z would be nice...
Date: Mon, 23 Oct 2000 12:51:22 +0200
From: Hartmut Holzgraefe <hartmut <email protected>>
To: Stanislav Malyshev <stas <email protected>>
CC: maxim <email protected>, php-dev <email protected>
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 <email protected> http://www.six.de +49-711-99091-77Besuchen Sie uns auf der Systems in München , Halle C2, Stand 126
-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: enrik <email protected>: "[PHP-DEV] Bug #7614: functions/recode.c fails to compile as extension module"
- Previous message: tkruthoff <email protected>: "[PHP-DEV] PHP 4.0 Bug #7613: ~E_NOTICE error reporting no longer works properly"
- In reply to: Andi Gutmans: "[PHP-DEV] 4.0.4"
- Next in thread: Andi Gutmans: "Re: [PHP-DEV] 4.0.4"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

