A constructors job is to setup internal properties which can be later accessed or echoed. Or to throw exceptions and prevent construction if certain requirements are not met. It SHOULD NOT echo something. Echoing is done later.
class example {
public $time = null;
function __construct() {
$this->time = time();
}
}
$ex = new example();
echo strftime('%Y-%m-%d %H:%M:%S', $ex->time);
I don't get it why responders encourage bad practices here (echoing in constructor). Teach the poster the right way. If you need echoing, use a damn function. Why construct an object if you just need some output after you process something? The whole purpose of the object is to hold properties later usable or multiple methods that work together and access those properties. And there are other reasons but way too advanced for the current context.
newthis typically means that the call evaluates to a newly-allocated area of memory, therefore a return value would be pointless. Why do you want to return something from a constructor?