See @Ivan's answer among others for the correct syntax of what it looks like, as you are trying to do.
However, there is another alternative - use the static method as an alternative constructor:
class myclass { function __construct() { } public static function AlternativeConstructor() { $obj = new myclass;
(note: you definitely cannot use $this in a static method)
source share