I wanted to use static PHP functions as follows:
class A {
static function a1() {
echo "A1";
return A;
}
static function a2() {
echo "A2";
return A;
}
}
A::a1()::a2();
It works but shows this error:
A1
NOTICE Use of undefined constant A - assumed 'A' on line number 4
A2
NOTICE Use of undefined constant A - assumed 'A' on line number 8
What is assumed 'A'
?
Should I return the class in another way, or create a constant with the value of class A? In case, how?
Is it correct to say that these functions follow the Builder pattern even not being constructors?