On Wednesday 18 July 2007, Rasmus Lerdorf wrote:

> Second, from the user space PHP developers' perspective.  There are two
> groups of those out there.  There is the group that builds apps for
> controlled environments.  Yahoo, Facebook, and the hundreds, if not
> thousands of smaller companies out there that will define a certain PHP
> configuration and code against that.  To them such a switch isn't a big
> deal except when it comes to re-using external code.  Which bring us to
> the second group which is the group that strives to build portable apps
> designed to run on as many unknown PHP configs as possible.  This is the
> group that will get hit by this, and here is where we need to figure out
> how to cause them the least amount of pain.  They are going to feel some
> pain in order to get their heads around Unicode no matter how we handle
> this.  For the portion of these folks who don't want to worry about
> Unicode at all and they actually have code that does stuff on binary
> strings that will break, their stuff just won't work no matter what we
> do.  The difference comes down to whether it gets marked as PHP5-only or
> it gets marked as non-Unicode-only.  And the other camp who do want to
> make sure their stuff supports Unicode will need to write the Unicode
> and non-Unicode versions and check to see if the system they are running
> on supports Unicode or not.  Whether they check the PHP version number,
> or the Unicode switch, or probe directly for the features they need, it
> ends up being about the same amount of pain.

Disclaimer again: PHP commit karma of 0, PHP development karma of some 
positive integer, PHP support karma of "depends if you like gophp5.org or 
not". :-)

Permit me to offer a concrete example.  I am a Drupal developer; that is, I 
work on the Drupal CMS core and also get paid to build sites with Drupal 
professionally.  Drupal has made a huge push for internationalization in the 
past year and a half or so.  It's currently UTF-8 through and through, 
complete with user-space UTF-8-safe implementations of various string 
manipulation functions.  Native Unicode support would be awesome.

Drupal is used by a huge number of people on dedicated boxes where they 
control the environment.  It's also used by an even huger number of people on 
shared hosts where they get almost no control over the environment.  Right 
now it handles both quite well, under PHP 4.3.6-5.2.3.  (PHP 4 to be dropped 
in version 7.)  

Now, when PHP 6 is released we are going to want to be able to run in PHP 6, 
and likely at some point in the future switch to PHP 6 only just as we're now 
(finally) moving to PHP 5 only.  That means that, for a time, we'll have to 
be able to run with the same code base on PHP 5 and PHP 6.  

A great many people will want to run it on a PHP 6 unicode=on server, so they 
can leverage native Unicode support.  A great many people will want to run it 
on shared hosts, which means either PHP 5 or PHP 6 unicode=off (because I 
don't expect shared hosts to default to unicode=on any more readily than they 
accepted the default of register_globals=off).  And unlike register_globals, 
it won't be something we can change in the 

So there will be a prolonged period where we will have to be able to run on 
PHP 5.2, PHP 6 unicode=off, and PHP 6 unicode=on, even if we don't explicitly 
use PHP 6-only features yet.  Simply excluding one of those three completely 
will not be a viable option.  Maintaining two or three separate trees is also 
not an option.  We simply don't have anywhere close to the resources to do 
that.  (Plus Drupal is a plugin-based system, and asking plugin authors to do 
that is completely unreasonable.)

So, just how much hair should we plan to pull out in order to make that 
happen?  That's the million dollar question for me, and for, I suspect, most 
of the open source application developers out there.  How can we minimize 
that hair loss?  

Right now I really don't know what the answer is.  That's why I'm asking the 
question, because as C is really not a comfortable language for me anymore I 
have little ability to affect it directly.

-- 
Larry Garfield                  AIM: LOLG42
[EMAIL PROTECTED]               ICQ: 6817012

"If nature has made any one thing less susceptible than all others of 
exclusive property, it is the action of the thinking power called an idea, 
which an individual may exclusively possess as long as he keeps it to 
himself; but the moment it is divulged, it forces itself into the possession 
of every one, and the receiver cannot dispossess himself of it."  -- Thomas 
Jefferson

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

Reply via email to