In a certain project I'm having an error trying to create a variable as a function, for example:
namespace Classes;
class Teste
{
public static function abc() { return 'teste'; }
}
Calling the function usually works:
\Classes\Teste::abc();
But when I try:
$class = "\Classes\Teste::abc";
$class();
It returns an error:
Fatal error: Call to undefined function \Classes\Teste::abc()