On 7/12/07, Tijnema <[EMAIL PROTECTED]> wrote:
On 7/12/07, David Coallier <[EMAIL PROTECTED]> wrote:
> On 7/11/07, Tijnema <[EMAIL PROTECTED]> wrote:
> > On 7/11/07, Jeff Griffiths <[EMAIL PROTECTED]> wrote:
> > > chris# wrote:
> > > > On Tue, 10 Jul 2007 19:30:26 -0500, Larry Garfield <[EMAIL PROTECTED]>
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()
> > PHP 4 >= 4.3.0, PHP 5
> >
> > > - 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?
> > >
> > > JeffG
> >
> > 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.
> >
>
> file_put_contents (Probably the one you meant Jeff)
any problems with fopen(), fwrite(), fclose()? It is exactly 2 lines more ;)
> http_build_query
foreach($array as $k => $v) {
if(!isset($string)) {
$string = "?".$k."=".$v;
} else {
$string .= "&".$k."=".$v;
} }
Wow yeah great example! :)
now look at the docs http://php.net/http_build_query , and search for
"Example 2517. http_build_query() with complex arrays"
Make me the code for it, I want separators, and urlencoding of the
values, and complex arrays.
That's 5 lines more ;)
Let's see :)
> xslt* (yeah.. not xslt2.. still ;-) )
PHP 4 >= 4.0.3 ;)
Ok I guess you really haven't use XSLTProcessor then ;-)
http://www.php.net/manual/en/ref.xsl.php
> streams (good ones)
I've only wanted to use stream_get_contents a few times, but it wasn't
available for PHP4 (My shared host), so I went back to fsockopen(),
fread(),fclose() ;)
>
> There are so many functions that have changed... here:
> http://cvs.php.net/viewvc.cgi/pear/PHP_Compat/Compat/Function/
I know ;) But viewing it through the eye of an regular developer that
doesn't use OO, PHP5 doesn't seem better than PHP4.
But, This is NOT my opinion, I would love to go for PHP6 already :)
I have PHP6 on my dev server at home, but if I write something for it,
it won't run on my prod server running PHP4 (upgrading is planned in a
month or so :) )
Change hosting company! :O
I have PHP5 a my dev server now, and that does already cause a lot of
trouble when I try to move it to my prod server. (The reason for my
other mail)
>
>
>
> To reply to chris above there... yes you could have used any kind of
> DOM in whatever browser and javascript, however, if you wanted to do
> dom manipulation with php, you had to use the domxml pecl extension
> (http://pecl.php.net/package/domxml) which was outdated from it's
> first day (No offence to you chregu :P the extension was useful but
> ugly and slow as a$$)
>
> What else.. I mean... seriously guys.. what the deuce ? Get over
> php4.. yeah made us all win money.. but now make real applications..
> if you need to make simple func scripts, go ahead, you even have more
> functions than ever..
>
>
>
>
> > 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
> >
> >
>
>
> --
> David Coallier,
> Founder & Software Architect,
> Agora Production (http://agoraproduction.com)
> 51.42.06.70.18
>
--
Vote for PHP Color Coding in Gmail! -> http://gpcc.tijnema.info
And not it's not a personal attack Tij :) Just my last refutation of
this thread. And now i'm letting you guys discuss it.. clearly, people
in charge have taken the decision about the date of RIP php4 so maybe
we should be celebrating ?
--
David Coallier,
Founder & Software Architect,
Agora Production (http://agoraproduction.com)
51.42.06.70.18
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php