call another method in class php code example
Example: php call method from another class
$classA = new ClassA();
$name = $classA->getName();
echo $name; //Prints John
$classA = new ClassA();
$name = $classA->getName();
echo $name; //Prints John