This is a follow-up to what I wrote in the utf8_encode()/utf8_decode() discussion earlier:

Andrea Faulds wrote:
I would propose something else: remove them from the XML extension, and
move them somewhere more fitting, like ext/intl, ext/mbstring or maybe
ext/standard. These are generic functions which work on any text, not
just XML, and their inclusion is mutually superfluous with respect to
XML: if you're decoding XML, you don't necessarily need to convert text
to/from UTF-8, and if you're converting text to/from UTF-8, you don't
necessarily need to deal with XML. Plus, given the names alone, you'd
have no idea they're part of the XML extension.

Since these functions are generic string functions that have no dependency on libxml, I've written a patch to move them to ext/standard, and simplified their code a little bit.

Pull request here: https://github.com/php/php-src/pull/2160

This doesn't currently do any function renaming or aliasing, but I should probably do that next. Plus, the manual still needs updating.

Are there any objections to this move? There'd be no backwards-compatibility break.


Andrea Faulds

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

Reply via email to