Rookietime : mySQL Query class
View Single Post
12-04-2007, 08:20 PM
Join Date: Nov 2007
> Good point. Yes, you need to declare all object vars in PHP 4 just as you would with v5, and you're correct, you'd use the '
' keyword. I'd have to go back to the manual to check, but it may be possible that v4 is so weakly typed (esp. when it comes to class declarations) that you may not even be required to declare the variable beforehand, it may simply be assumed that if it's not in the local scope (i.e. the method scope) that it's an object variable. I always declare variables up front so I've not tested this.
It's also possible we've only seen an abbreviated section of the actual code.
The Following User Says Thank You to SOCK For This Useful Post:
View Public Profile
Send a private message to SOCK
Find More Posts by SOCK