php - is it possible to define properties for methods?
I would like to define some properties in a method that are contained within that method i.e not the the entire class. But want to do this from the instance of the object. Is that possible? The code below does not work. class foo{ var $x; function __construct(){ } function abc(){ echo $y; } } $new = new foo(); $new->abc->y = "bar";
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.