Have a read

Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.

Moderator: General Moderators

Post Reply
User avatar
Oren
DevNet Resident
Posts: 1640
Joined: Fri Apr 07, 2006 5:13 am
Location: Israel

Have a read

Post by Oren »

User avatar
Jenk
DevNet Master
Posts: 3587
Joined: Mon Sep 19, 2005 6:24 am
Location: London

Post by Jenk »

Last revised 28 Feb 2005
When did php5 get released?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post 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?
User avatar
Oren
DevNet Resident
Posts: 1640
Joined: Fri Apr 07, 2006 5:13 am
Location: Israel

Post 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.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post 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.
User avatar
Oren
DevNet Resident
Posts: 1640
Joined: Fri Apr 07, 2006 5:13 am
Location: Israel

Post by Oren »

No :P Read my previous post again.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

I've read it several times. Same result.

I do not see much technical merit in the linked article.
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Post 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???
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post 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.
User avatar
Oren
DevNet Resident
Posts: 1640
Joined: Fri Apr 07, 2006 5:13 am
Location: Israel

Post 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
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Oren wrote:That's what I was trying to say :P
Well then, you should have said that. Image
User avatar
Oren
DevNet Resident
Posts: 1640
Joined: Fri Apr 07, 2006 5:13 am
Location: Israel

Post by Oren »

feyd wrote:Well then, you should have said that. Image
I thought I did :oops:
Post Reply