[wp-hackers] New on the list, want to clean up code...

Helgi Hrafn Gunnarsson helgi at binary.is
Wed Dec 10 15:52:04 GMT 2008


Thanks for the article, but I still think upgrading to PHP 5 is proper. The
arguments for sticking to PHP 4 seem severely overblown to me, particularly
the notion that upgrading either apps or PHP installations to PHP 5 is
somehow difficult. It's not. It's not too much to ask of ISPs to upgrade at
*some* point. Especially now that the PHP team has even stopped issuing new
*security fixes*, that really settles it in my mind.

Now, I don't want to turn this into a version war, especially because I'm
new. I think I know what to do instead.

Really, the one thing I want from PHP 5 to speed up WordPress is the
__autoload() function, which can be written without breaking PHP 4
compliance, it just won't work. So I'll check for PHP's version, and if it's
<5, I'll load all the classes (with the accompanying, unnecessary slowdown
of parsing massive amounts of code), but if it's 5+, I'll use the
__autoload() function. This should give PHP 5 users the benefit of the
__autoload() function while still retaining PHP 4 compatibility.

That said, put me on the list that supports upgrading to 5.x. There are real
benefits to PHP 5, it's not just some childish "newest is best" attitude. I
could have agreed back when PHP 4 was actually still in development, but it
isn't. It's outdated, obsolete, deprecated, gone. It's a certain security
threat in the long run. These backwards-compliance arguments are always used
against upgrading anything and they're valid for a while, but surely
upgrading becomes proper at *some* point. It's not exactly radical to
upgrade from a product that's not even maintained anymore. If upgrading now
is not proper, I wonder when.

I consider the issue settled though, and I won't bother y'all more with
this. Thanks for the responses and don't take any of this personally. :) I
mean no disrespect to anyone, and I'll keep my changes 4.3-compliant for
now.

Peace.
Helgi Hrafn Gunnarsson
helgi at binary.is

On Wed, Dec 10, 2008 at 3:05 PM, Chris <gaarai at gaarai.com> wrote:

> I fully agree with you Helgi. I much prefer developing for PHP 5 rather
> than PHP 4, and I definitely prefer developing for PHP 5 rather than both
> PHP 4 and PHP 5. That said, even I agree that it burdens too many end users
> of the software if it only supported PHP 5 as there are many, many hosts
> that still only offer PHP 4 and many more hosts that only support PHP 5 if
> you know how to switch to it or request for it.
>
> Supporting both PHP 4 and PHP 5 is the most reasonable course of action to
> take as it 1) drastically reduces the amount of frustration of end users, 2)
> removes the need to support people who don't know why their WordPress
> install isn't working due to running PHP 4, and 3) makes it easier for an IT
> novice to get up and running with WordPress. Sure, supporting only PHP 5
> would make it easier on the developers, but it would do so at the cost of
> the end users. I don't think it's a stretch to assume that the number of end
> users outweighs the number of developers (themers and plugin devs included).
> In the end, everything we do with WordPress is to make it easier for the end
> user, and that's the benchmark by which all such decisions should be
> weighed.
>
> For Matt's take on the subject, you can check out his On PHP <
> http://ma.tt/2007/07/on-php/> essay.
>
> Chris Jean
> http://gaarai.com/
> http://wp-roadmap.com/
>
>
>
>
> Helgi Hrafn Gunnarsson wrote:
>
>> Alright, thanks for the response. I'll stick to 4.3 features then.
>>
>> Are there any plans for changing that? PHP 5 not only contains things
>> useful
>> for developers, but a few things that can drastically help with
>> optimization, most notably the __autoload() function, which can be used to
>> load only classes which are necessary when they are needed, as opposed to
>> loading all of them, even if 99% of them are never used during the
>> execution
>> of the page.
>>
>> Furthermore and perhaps more importantly, PHP 4.x development has been
>> discontinued altogether. Personally, I find this to be enough of a reason
>> to
>> seriously contemplate going for PHP 5.
>>
>> I don't like to nag, these are just points for consideration. I do
>> understand the points for sticking to PHP 4.x as per the reference you
>> gave.
>>
>> Peace.
>> Helgi Hrafn Gunnarsson
>> helgi at binary.is
>>
>> On Wed, Dec 10, 2008 at 2:32 PM, Austin Matzko <if.website at gmail.com>
>> wrote:
>>
>>
>>
>>> On Wed, Dec 10, 2008 at 9:28 AM, Helgi Hrafn Gunnarsson <helgi at binary.is
>>> >
>>> wrote:
>>>
>>>
>>>> 3. Is it okay to use PHP 5.x code?
>>>>
>>>>
>>> For the time being, WordPress must support PHP back to 4.3:
>>> http://wordpress.org/about/requirements/
>>> _______________________________________________
>>> wp-hackers mailing list
>>> wp-hackers at lists.automattic.com
>>> http://lists.automattic.com/mailman/listinfo/wp-hackers
>>>
>>>
>>>
>> _______________________________________________
>> wp-hackers mailing list
>> wp-hackers at lists.automattic.com
>> http://lists.automattic.com/mailman/listinfo/wp-hackers
>>
>>
>>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>


More information about the wp-hackers mailing list