Re: RIP PHP 4?
| From: | Tijnema | Date: | Wed, 11 Jul 2007 21:40:25 +0000 |
| Subject: | Re: RIP PHP 4? | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-30794@lists.php.net to get a copy of this message | ||
On 7/11/07, Jeff Griffiths <jeffg@activestate.com> wrote:
chris# wrote: On Tue, 10 Jul 2007 19:30:26 -0500, Larry Garfield <larry@garfieldtech.com> wrote: ...True. But then again, what's the point of using 5 if you're not inclined, or have the need to write OO apps? It is simply alot of wasted language/ space and resources, as a whole. Hey! I don't need OO and I've already got PHP4 installed. Why bother with 5 at all? There are a number of nice features in PHP5 that have nothing to do with actually creating your own classes or extending built-ins, such as (off the top of my head): - file_get_contents() PHP 4 >= 4.3.0, PHP 5The claim that is still repeated that one "has to" rewrite everything to be OO in order to port to PHP 5 is, quite simply, FUD.
- simplexml / DOM parsing / libxml2 - json_encode|decode JSON PECL extension can be installed for PHP >= 4.3.0
- stable APC - SPL - PDO ( although you can get it for 4.4, you can't depend on it being there ) - backwards compatibility with lots of procedural PHP4 code =) If you're writing an app that does a lot of json or xml parsing or output, *even if you don't use the class keyword anywhere in your own code* PHP5 is a better language than PHP4. Drupal is a great example of this because even though Drupal doesn't use classes, many Drupal devs want to use PHP5 features in Drupal core. Right Larry? JeffGExcept 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. Tijnema -- Vote for PHP Color Coding in Gmail! -> http://gpcc.tijnema.info