I am writing some PHP. I have several classes that do not declare any properties, public or otherwise. I have a custom mySQL class that fetches objects from mySQL and sets property values for the newly init'd PHP object like so...
while ($row = mysql_fetch_assoc($result))
{
foreach($row as $key => $value)
{
$this->{$key} = $value;
}
}
This seems to work fine as I can then call said properties anywhere I please ... $this->my_auto_property
etc. I cannot find any PHP docs that describe this as a way to overload a class object's properties.
Is this okay? I want to make sure it's not some sort of backwards compatibility that will evaporate in future releases of PHP.