Johannes Schlüter wrote:
Hi Lukas,

On Mon, 2007-07-16 at 08:48 +0200, Lukas Kahwe Smith wrote:
can you gives us a clarification on the question on if ctype will infact be deprecated in PHP6?

ctype is not UTF-16 aware and therefore won't work with PHP 6 unicode
strings. Instead of ctype there are functions offered by ICU which will
be available for PHP 6.

So even if it ould be shipped with PHP 6 it, most likely, won't be
useful. And I doubt it makes sense to use ctype functions wrapping ICU,
but this might be done using PEAR's PHP_Compat or something.

Just for completness, Stephan Walk offered the following explanation on the pear mailinglist:

A pretty major change that makes perfect sense. When PHP6 is there,
there are char_is_*-functions using ICU (the unicode library). Those
functions do everything that ctype does in a more coherent way,
example:

[EMAIL PROTECTED]:~/programming/php/php6> ./php-unicode -r
'var_dump(ctype_digit(123));'
bool(false)
[EMAIL PROTECTED]:~/programming/php/php6> ./php-unicode -r
'var_dump(char_is_digit(123));'
bool(true)

So you don't have to explicitely cast to string anymore when you want
to check that a value you got is either an integer or a string
containing only an integer, which is more like string/int juggling
works in the rest of php ... to summarize, you have new functions
offering the same functionality and more, and have a cleaner API ...
so the rational thing to do is deprecate the old functionality. It
won't be gone, but folks should be made aware that better things are
available.

regards,
Lukas

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

Reply via email to