I have class sample and first call static method and return to call other public method:
class foo{
public static $var;
public static function first()
{
self::$var = 1;
return self::class;
}
public function second()
{
return self::$var;
}
}
and I need call public method after static method sample here:
foo::first()->second();