View Single Post
Old 12-04-2007, 08:20 PM   #4 (permalink)
SOCK
The Acquainted
 
Join Date: Nov 2007
Posts: 154
Thanks: 31
SOCK is on a distinguished road
Default

Tanax> 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 'var' 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.
SOCK is offline  
Reply With Quote
The Following User Says Thank You to SOCK For This Useful Post:
ReSpawN (12-05-2007)