Re: RIP PHP 4?

From: Date: Wed, 11 Jul 2007 21:30:30 +0000
Subject: Re: RIP PHP 4?
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-30792@lists.php.net to get a copy of this message
On Wed, 11 Jul 2007 13:12:35 -0700, Jeff Griffiths <jeffg@activestate.com> wrote: > chris# wrote: >> On Tue, 10 Jul 2007 19:30:26 -0500, Larry Garfield > <larry@garfieldtech.com> wrote: > ... >>> The 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. > >> 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() > - simplexml / DOM parsing / libxml2 As memory serves; DOM is already available to developers whether you use PHP or not. I seem to remember messing around with it back in the mid-90's When JavaScript and DHTML were all the rage, and Netscape and Sun Microsystems were touting their version of JavaScript and a bunch of DEV tools to go along with it. Of course I am using DOM all the time now - especially since it's readily accessible in XHTML and CSS-2.x. :) > - json_encode|decode JSON may indeed be available in PHP5 but PHP5 is not a prerequisite to using JSON at all. As a matter of fact, I'm enjoying JSON in the web based mail reader I'm using right now - which is running of a PHP4 base install. :) > - 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 =) Just a hunch; but I can't help but wonder if more backward compatibility had been included in 5, 5 would have been more highly favored/chosen. Just a hunch tho. > > 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? Technically speaking; I'm not sure you can call OO a feature if you're (for what ever reason) ever inclined to use it. Point being; if you're not using it, if can only be considered /overhead/. But I won't argue the fact that OO can indeed be considered a feature. On that note; would it have made any sense at all to provide OO in the form of a module? Is that even possible? Does runkit lend itself to accomplishing this? Could something like this be the /big/ feature /advancement/ that 6 offers - along with the enhanced UTF support, of course. :) Thanks for taking the time to respond. > > JeffG ///////////////////////////////////////////////////// Service provided by hitOmeter.NET internet messaging! .

« previous php.internals (#30792) next »