편집을 취소할 수 있습니다. 이 편집을 되돌리려면 아래의 바뀐 내용을 확인한 후 게시해주세요.
최신판 | 당신의 편집 | ||
1번째 줄: | 1번째 줄: | ||
[[category:class]] | [[category:class]] | ||
;extends | ;extends | ||
==PHP== | ==PHP== | ||
[[분류: PHP]] | [[분류: PHP]] | ||
< | <source lang='PHP'> | ||
class Animal { | class Animal { | ||
public $name; | public $name; | ||
} | } | ||
class Dog extends Animal { | class Dog extends Animal { | ||
} | } | ||
$myDog = new Dog(); | $myDog = new Dog(); | ||
$myDog->name = "snoopy"; | $myDog->name = "snoopy"; | ||
</ | </source> | ||
==같이 보기== | ==같이 보기== | ||
*[[class]] | |||
*[[property_exists]] | *[[property_exists]] | ||
*[[method_exists]] | *[[method_exists]] | ||
*[[상속]] | *[[상속]] |