That means it should be called like:
$timer = (new VTimer)->get($options['magic']);
The difference between static
and non-static
is that the first one doesn't need initialization so you can call the classname
then append ::
to it and call the method immediately.
Like so:
ClassName::method();
and if the method is not static you need to initialize it like so:
$var = new ClassName();
$var->method();
However, in PHP 5.4 you can use this syntax instead as a shorthand:
(new ClassName)->method();
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…