Page 1 of 1

Have a read

Posted: Sat Aug 19, 2006 4:19 pm
by Oren

Posted: Sat Aug 19, 2006 4:22 pm
by Jenk
Last revised 28 Feb 2005
When did php5 get released?

Posted: Sat Aug 19, 2006 4:24 pm
by feyd
A hell of a lot in PHP has changed since the time it was last updated, so uhm.. what are we supposed to be looking at specifically?

Posted: Sat Aug 19, 2006 4:32 pm
by Oren
Jenk wrote:
Last revised 28 Feb 2005
When did php5 get released?
July 2004.

feyd: I disagree with you, I didn't refer to this article as resource for technical information, but more as something to read and think about - therefore I posted it on the Theory and Design forum.

Posted: Sat Aug 19, 2006 4:37 pm
by feyd
Oren wrote:I disagree with you, I didn't refer to this article as resource for technical information, but more as something to read and think about
You want to disagree with me on the amount of changes that have taken place since Feburary 2005? Uh huh.

Posted: Sat Aug 19, 2006 4:39 pm
by Oren
No :P Read my previous post again.

Posted: Sat Aug 19, 2006 4:46 pm
by feyd
I've read it several times. Same result.

I do not see much technical merit in the linked article.

Posted: Sat Aug 19, 2006 4:47 pm
by alex.barylski
Edit: I think the following also still stands true (using count or sizeof):

Code: Select all

for ($j=0; $j<sizeof($arr); $j++) 
    echo $arr[$j]."<br>";

// This can be substantially speeded up by changing the code to:

for ($j=0, $max = sizeof($arr), $s = ''; $j<$max; $j++)
  $s .= $arr[$j]."<br>";

echo $s;
Ok well I just gave it a quick once over...

Some of what is said in there is likely still valid, so I think Oren was just saying, fundamentally...there are still good practices in there...

Obviously some of it may become antiquated as PHP gets better, like references...I think PHP 5 automatically passes all paramters by reference doesn't it?

In that case, yes it's pointless, but there are sitll some interesting points worth mentioning or looking into...
For processing XML, parsing with regular expressions is significantly faster than using DOM or SAX.
Really? I had no idea...I would think the opposite...but again...maybe this informaiton may also be antiquated???

Posted: Sat Aug 19, 2006 4:56 pm
by feyd
Hockey wrote:I think PHP 5 automatically passes all paramters by reference doesn't it?
Only objects are passed by reference. All other types are copies.



Ignoring all the code in the article, some of the concepts will nearly always be true. And that's where it breaks down: they're nearly all basic concepts.

Posted: Sat Aug 19, 2006 5:30 pm
by Oren
feyd wrote:Ignoring all the code in the article, some of the concepts will nearly always be true. And that's where it breaks down: they're nearly all basic concepts.
That's what I was trying to say :P

Posted: Sat Aug 19, 2006 5:38 pm
by feyd
Oren wrote:That's what I was trying to say :P
Well then, you should have said that. Image

Posted: Sat Aug 19, 2006 5:40 pm
by Oren
feyd wrote:Well then, you should have said that. Image
I thought I did :oops: