one underscore or 2?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
kbarrett2008
Forum Newbie
Posts: 9
Joined: Fri Mar 13, 2009 5:09 pm

one underscore or 2?

Post by kbarrett2008 »

I'm seeing references to

_construct

and

__construct

which is it?

is it the same for destructors and accessors (_get or __get .. )?

again the book shows it both ways.
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: one underscore or 2?

Post by Christopher »

(#10850)
kbarrett2008
Forum Newbie
Posts: 9
Joined: Fri Mar 13, 2009 5:09 pm

Re: one underscore or 2?

Post by kbarrett2008 »

"Magic" methods.... <chuckle>

interesting.

THANKS again!!
Ken
Post Reply