<?php
class Yea
{
public static function withStatic()
{
return new static;
}
public static function withCalledClass()
{
$class = get_called_class();
return new $class;
}
}
PD9waHAKCmNsYXNzIFllYQp7CglwdWJsaWMgc3RhdGljIGZ1bmN0aW9uIHdpdGhTdGF0aWMoKQoJewoJCXJldHVybiBuZXcgc3RhdGljOwoJfQoJCglwdWJsaWMgc3RhdGljIGZ1bmN0aW9uIHdpdGhDYWxsZWRDbGFzcygpCgl7CgkJJGNsYXNzID0gZ2V0X2NhbGxlZF9jbGFzcygpOwoJCXJldHVybiBuZXcgJGNsYXNzOwoJfQp9CgoKdmFyX2R1bXAoWWVhOjp3aXRoU3RhdGljKCkpOwp2YXJfZHVtcChZZWE6OndpdGhDYWxsZWRDbGFzcygpKTsKCQ==