Home > Article > Backend Development > How to access member functions of another class in PHP
Write a static method in the category to return the $ A instance, call
Class Instance {
Private Static $ A; $a=new a(); }
class b{
function itb(){
// Obtain the single instance of a here, and there will be no multiple instantiations
$a=instance::getA();
$a->ita();
}