SyntaxFix
Write A Post
Hire A Developer
Questions
Drop the public $bar; declaration and it should work as expected.
public $bar;