Is there any good reason to declare variables used by the class outside the constructor function first?
class foo {
var bar;
public function __construct() {
$this->foo = 'foobar';
}
}
I have seen this often, but I'm not sure what he is doing, as it seems that he works great to leave them.
source
share