<?php
namespace wfm;
trait TSingleton
{
private static ?self $instance = null;
private function __constructor()
{
}
public static function getInstance(): static
{
return static::$instance ?? static::$instance = new static();
}
}
syntax error, unexpected 'static' (T_STATIC)
public static function getInstance(): static