View Single Post
Old 07-14-2008, 03:26 PM   #12 (permalink)
CMellor
The Acquainted
Upcoming Programmer 
 
CMellor's Avatar
 
Join Date: Sep 2007
Location: Leeds, UK
Posts: 141
Thanks: 6
CMellor is on a distinguished road
Default

Quote:
Originally Posted by Tanax View Post
Why are you using self::$localhost and self:: all over the place?
If you're using PHP5, then you have use a static variable, and you aren't, so.. you need to use $this->localhost etc.
Quote:
Originally Posted by xenon View Post
Because you can't access class constants and/or static properties using the $this keyword.
Urm, yeah, what he said ^

I'd always used define and remembered once I saw a different way of doing that with OOP, ala const so seeing as I love being different, I did it that way :P
__________________
Not quite a n00b...
CMellor is offline  
Reply With Quote