php에서 $self 와 $this 접근의 차이 이해

class Person { private $name; public function __construct($name) { $this->name = $name; } public function getName() { return $this->name; } public function getTitle() { return $this->getName()." the person"; } public function sayHello() { echo "Hello, I'm ".$this->getTitle()."<br/>"; } public function sayGoodbye() { echo "Goodbye from ".self::getTitle()."<br/>"; } } class Geek extends Person { public function […]

PHP Class, Method 이름 배열로 반환 방법

※ string get_class ([ object $object ] ) ① 주어진 object 의 클래스명을 얻습니다. ② 반환값 : object 인스턴스의 클래스명을 반환합니다. object 가 객체가 아니면 FALSE를 반환합니다. ③ 변경점 : 5.0.0부터 클래스명을 원 문자대로 반환하고, 객체 메쏘드에서 호출할 때, object 인수는 선택적입니다. ④ 참고주소 : http://docs.php.net/manual/kr/function.get-class.php ※ array get_class_methods ( mixed $class_name ) ① 클래스 […]