반응형

2017/01/12 3

php property_exists — 객체나 클래스가 프로퍼티를 가졌는지 확인

property_exists — 객체나 클래스가 프로퍼티를 가졌는지 확인 설명 :bool property_exists ( mixed $class , string $property )주어진 property가 지정한 클래스에 존재하는지 확인합니다. Note:isset()과 다르게, property_exists()는 프로퍼티가 NULL 값을 가지고 있어도 TRUE를 반환합니다. 인수 :class확인할 클래스명이나 클래스의 객체 property프로퍼티명 반환값 :프로퍼티가 존재하면 TRUE, 존재하지 않으면 FALSE, 오류시엔 NULL을 반환합니다. 예제 : Example #1 property_exists() 예제

IT/php 2017.01.12

php is_subclass_of — 이 클래스가 부모 클래스의 자식인지 확인

is_subclass_of — 이 클래스가 부모 클래스의 자식인지 확인 설명 :bool is_subclass_of ( mixed $object , string $class_name )주어진 object의 부모 중에 class_name 클래스가 존재하는지 확인합니다. 인수 :object클래스명이나 객체 인스턴스 class_name클래스명 반환값 :object가 class_name의 자식 클래스면 TRUE, 아니면 FALSE를 반환합니다. Example #1 is_subclass_of() 예제 위 예제의 출력: yes, $WFC is a subclass of WidgetFactoryno, $WF is not a subclass of WidgetFactoryyes, WidgetFactory_Child is a..

IT/php 2017.01.12
반응형