On 7/12/07, Jeff Griffiths <[EMAIL PROTECTED]> wrote:
Tijnema wrote:
> On 7/11/07, Jeff Griffiths <[EMAIL PROTECTED]> wrote:
...
>> - file_get_contents()
> PHP 4 >= 4.3.0, PHP 5
D'oh! Thanks for the history lesson.
;)
>> - simplexml / DOM parsing / libxml2
>> - json_encode|decode
> JSON PECL extension can be installed for PHP >= 4.3.0
It *can* be, but it is compiled by default in PHP 5.2, which is the
version recommended by we in the 'go php5 go!' crowd. It's critical for
projects like Drupal to consider what the base features are and develop
for that.
There are also PHP based versions of the json_encode/decode functions,
and they could be used too if json isn't available, it works on every
php version AFAIK.
So, if you need it in PHP4, it is there, but of course it's better to
know for sure that the functions built in can be used safely without
having to worry if the user will have them ;)
...
> Except for the OO, I don't see anything that can't be done in PHP4,
> while it can be done in PHP5. Some workarounds are maybe needed, but
> it mostly doesn't require more than 10 lines of PHP code extra.
Most of what I mentioned could be implemented on top of PHP 4, but
that's not the same as being implemented *in* PHP 5.2 and compiled by
default.
JeffG
Yes, that's what I meant to say, they can be implemented on top of,
just like the above mentioned json, it is implemented on top of too.
But, that means that a regular PHP programmer doesn't need PHP5 for
his scripts (except for OO if they want). Do you think it matters to
them if their scripts run on PHP4 or PHP5?
And so, most will stuck on, "If it isn't broken, don't fix it". Since
PHP4 isn't really broken, a lot people won't "fix it".
Tijnema
--
Vote for PHP Color Coding in Gmail! -> http://gpcc.tijnema.info
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php