<?php
class Foo
{
public static function createSelf()
{
return new self;
}
public static function createStatic()
{
return new static;
}
}
class Bar {}
var_dump(Bar::createSelf(), Bar::createStatic());
Fatal error: Uncaught Error: Call to undefined method Bar::createSelf() in /in/BXEQK:20
Stack trace:
#0 {main}
thrown in /in/BXEQK on line 20
Process exited with code 255.