Created
April 23, 2017 15:51
-
-
Save geekcom/0ab5afb74917670c7987f22c8841bf6f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// considere os valores a esquerda sendo $a e os valores a direita $b | |
echo 1 == 1; | |
echo 1 != 2; | |
echo 1 <> 2; | |
echo 1 === 1; | |
echo 1 !== 2; | |
echo 2 > 1; | |
echo 1 < 2; | |
echo 2 >= 2; | |
echo 1 <= 2; | |
// operador spaceship | |
echo 1 <=> 2; // $a < $b então o resultado é -1 | |
echo 1 <=> 1; // $a == $b então o resultado é 0 (zero) | |
echo 2 <=> 1; // $a é maior que $b então o resultado é 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment