執行 ❯
獲取您
自己的 PHP
伺服器
×
更改方向
更改主題,深色/淺色
前往 Spaces
<!DOCTYPE html> <html> <body> <h1>The !== Operator</h1> <p>Compare two variables and write a message if they are NOT identical.</p> <p>The not identical operator (!==) checks the value and the data type, unlike the not equal operator (!=) that checks only the value.</p> <?php $x = 100; $y = 50; if ($x !== $y) { echo "$x is not identical to $y"; } ?> </body> </html>
!== 運算子
比較兩個變數,如果它們不完全相同,則輸出一條訊息。
不全等運算子 (!==) 會同時檢查值和資料型別,而不同於僅檢查值的“不等於”運算子 (!=)。
100 不全等於 50