This is probably really easy but I can\'t seem to figure out how to print/echo a class so I can find out some details about it.
I know this doesn\'t work, but this i
You could try adding a toString method to your class. You can then echo some useful information, or call a render method to generate HTML or something!
The __toString method is called when you do something like the following:
echo $class;
or
$str = (string)$class;
The example linked is as follows:
foo = $foo;
}
public function __toString() {
return $this->foo;
}
}
$class = new TestClass('Hello');
echo $class;
?>