"PHP ==, ==="의 두 판 사이의 차이

잔글 (봇: 자동으로 텍스트 교체 (-source +syntaxhighlight))
2번째 줄: 2번째 줄:


==예제 소스 코드==
==예제 소스 코드==
<source lang='php' run>
<syntaxhighlight lang='php' run>
echo ( 0 ) ? "yes": "no";
echo ( 0 ) ? "yes": "no";
</source>
</syntaxhighlight>
<source lang='php' run>
<syntaxhighlight lang='php' run>
echo ( 'abc' ) ? "yes" : "no";
echo ( 'abc' ) ? "yes" : "no";
</source>
</syntaxhighlight>
<source lang='php' run>
<syntaxhighlight lang='php' run>
echo ( 0 == 'abc' ) ? "yes" : "no";
echo ( 0 == 'abc' ) ? "yes" : "no";
</source>
</syntaxhighlight>
<source lang='php' run>
<syntaxhighlight lang='php' run>
echo ( '0' == 'abc' ) ? "yes" : "no";
echo ( '0' == 'abc' ) ? "yes" : "no";
</source>
</syntaxhighlight>
<source lang='php' run>
<syntaxhighlight lang='php' run>
echo ( 0 === 'abc' ) ? "yes" : "no";
echo ( 0 === 'abc' ) ? "yes" : "no";
</source>
</syntaxhighlight>
<source lang='php' run>
<syntaxhighlight lang='php' run>
echo ( '0' === 'abc' ) ? "yes" : "no";
echo ( '0' === 'abc' ) ? "yes" : "no";
</source>
</syntaxhighlight>


==같이 보기==
==같이 보기==

2020년 11월 2일 (월) 02:34 판

PHP ==

1 예제 소스 코드

echo ( 0 ) ? "yes": "no";
echo ( 'abc' ) ? "yes" : "no";
echo ( 0 == 'abc' ) ? "yes" : "no";
echo ( '0' == 'abc' ) ? "yes" : "no";
echo ( 0 === 'abc' ) ? "yes" : "no";
echo ( '0' === 'abc' ) ? "yes" : "no";

2 같이 보기

3 참고

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