Re: PHP4 vs PHP5 Performance?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Saturday 25 August 2007, Robert Cummings wrote:

> Rewriting? You're assuming developers of PHP4 are using all of the
> features in PHP5 but written using PHP4 code. That's not a very valid
> assumption. You're also assuming they didn't already have code written
> in PHP4 that was then duplicated b internal code in PHP5. Hell, many
> PHP4 AND PHP5 developers don't even use OOP. Tell me what is compelling
> in PHP5 that doesn't rely on you being an OOP developer? Exceptions
> don't count since that's an individual bent. C has no exceptions and it
> gets on fine (PHP is written in it :)
>
> Cheers,
> Rob.

There is no way to respond to the above request, because you're automatically 
discounting features as "an individual bent".  That makes your position 
non-falsifiable (cannot be proven or disproven), and therefore irrelevant.

What does PHP 5 offer?

- Exceptions.  No you don't have to use them, but they are a useful tool.

- Real OOP.  No, you don't have to use it, but it is a useful tool.

- Prepared statements in MySQL (mysqli) or cross-database (PDO).  You really 
should be using them!

- filter extension.  No you don't have to use it, but it's a useful tool for 
security.

- SPL.  You can leverage SPL without having a fully-OOP architecture.  In 
fact, I find it most useful to be able to "have my procedural cake and OOP 
icing, too".  No, you don't have to use it, but it's a useful tool.

- SimpleXML and the DOM extension.  XML handling that doesn't suck ass.  No 
you don't have to use them, but if you're doing anything with XML processing 
you will thank the gods that you did.

- A few dozen new utility functions.  Sure they could be/have been 
reimplemented in PHP 4 user-space, but they're not as fast as when 
implemented in C.

That's just off the top of my head.  PHP 5 offers a ton of extra tools that 
can be useful in many situations.  

If you're on a PHP 4 server, you have no choice but to not use them.  

If you're on a PHP 5 server, you can pick and choose which to use based on 
your use case and preferences.

The GoPHP5 project is not about forcing people to use OOP.  It's about 
ensuring that developers have a full tool box available to them when writing 
code.  If you're still using PHP 4 now, then your tool box is only half-full.  
Get on PHP 5 to get the other half.  

The other factor is that those writing code that goes on servers they don't 
have absolute control over (I dare say most of us) are bound by *others'* 
refusal to upgrade to PHP 5.  If I'm on a shared host, I'm stuck with 
whatever that host is running, even if it's ancient.

Supporting PHP 4 hurts PHP 5 developers.  Supporting PHP 5 does not hurt PHP 4 
developers.  That's the problem.

For more info:

http://gophp5.org/faq

-- 
Larry Garfield			AIM: LOLG42
larry@xxxxxxxxxxxxxxxx		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 General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux