"PHP property exists()"의 두 판 사이의 차이

(새 문서: ==개요== ;PHP property_exists() <source lang='PHP'> class Dog { public $name; } $myDog = new Dog(); if(property_exists($myDog, "name")) echo "name exists"; // name exists </sourc...)
 
잔글 (봇: 자동으로 텍스트 교체 (-source +syntaxhighlight))
 
(사용자 2명의 중간 판 3개는 보이지 않습니다)
2번째 줄: 2번째 줄:
;PHP property_exists()
;PHP property_exists()


<source lang='PHP'>
<syntaxhighlight lang='PHP'>
class Dog {
class Dog {
   public $name;
   public $name;
9번째 줄: 9번째 줄:
if(property_exists($myDog, "name")) echo "name exists";
if(property_exists($myDog, "name")) echo "name exists";
// name exists
// name exists
</source>
</syntaxhighlight>


==같이 보기==
==같이 보기==
* [[PHP array_key_exists()]]
* [[함수 property_exists()]]
* [[함수 property_exists()]]
==참고==
* http://php.net/manual/kr/function.property-exists.php


[[분류: PHP]]
[[분류: PHP]]

2020년 11월 2일 (월) 02:35 기준 최신판

1 개요[ | ]

PHP property_exists()
class Dog {
  public $name;
}
$myDog = new Dog();
if(property_exists($myDog, "name")) echo "name exists";
// name exists

2 같이 보기[ | ]

3 참고[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}