note 86423 added to language.oop5.decon
| From: | spleen at osu1 dot php dot net | Date: | Fri, 17 Oct 2008 23:35:15 +0000 |
| Subject: | note 86423 added to language.oop5.decon | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-145462@lists.php.net to get a copy of this message | ||
It's always the easy things that get you -
Being new to OOP, it took me quite a while to figure out that there are TWO underscores in front of
the word __construct.
It is __construct
Not _construct
Extremely obvious once you figure it out, but it can be sooo frustrating until you do.
I spent quite a bit of needless time debugging working code.
I even thought about it a few times, thinking it looked a little long in the examples, but at the
time that just seemed silly(always thinking "oh somebody would have made that clear if it
weren't just a regular underscore...")
All the manuals I looked at, all the tuturials I read, all the examples I browsed through - not
once did anybody mention this!
(please don't tell me it's explained somewhere on this page and I just missed it,
you'll only add to my pain.)
I hope this helps somebody else!
----
Server IP: 208.69.120.35
Probable Submitter: 68.186.254.149
----
Manual Page -- http://www.php.net/manual/en/language.oop5.decon.php
Edit -- https://master.php.net/note/edit/86423
Del: integrated -- https://master.php.net/note/delete/86423/integrated
Del: useless -- https://master.php.net/note/delete/86423/useless
Del: bad code -- https://master.php.net/note/delete/86423/bad+code
Del: spam -- https://master.php.net/note/delete/86423/spam
Del: non-english -- https://master.php.net/note/delete/86423/non-english
Del: in docs -- https://master.php.net/note/delete/86423/in+docs
Del: other reasons-- https://master.php.net/note/delete/86423
Reject -- https://master.php.net/note/reject/86423
Search -- https://master.php.net/manage/user-notes.php