Wednesday, April 13, 2011

php5: To __construct() or to ClassName()?

Hey, I just started pondering this and figured I could use some input.

I've long been using '__construct()' for all my constructor needs in php5, even though the obviously better looking 'ClassName()' would work just as well. I remember switching to __construct because it would forcibly break on older php installations but I don't think that's a requirement anymore.

My question is: What are some good reasons to either stick with __construct() or go with ClassName()?

From stackoverflow

0 comments:

Post a Comment