카테고리 없음
[PHP] PHP의 확장 클래스에서 네임 스페이스 사용 덮어 쓰기
필살기쓰세요
2021. 1. 16. 14:02
다음 과 같이 클래스 extended::main()
내에서 정의해야합니다 extended
.
use two\hey;
class extended extends saysomething
{
public static function main()
{
hey::say(); // will call two/hey::say method
}
}
네임 스페이스는 여기서 도움이되지 않습니다.
출처
https://stackoverflow.com/questions/39915954