You could use the __toString magic method to get __construct to echo out or you could just getmetod without using __toString magic method. There are many ways just pick one of them.
foo = $foo;
}
public function __toString()
{
return $this->foo;
}
}
$class = new TestClass('Hello');
echo $class;
?>
__toString()