Last active
April 19, 2023 12:08
-
-
Save Azer5C74/2ff16022089a9d39eb8a32e8b91457d2 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 | |
// Loose comparison | |
if (0 == false) { | |
echo "0 equals false"; | |
} else { | |
echo "0 does not equal false"; | |
} | |
// Output: "0 equals false" | |
// Type juggling | |
$x = "10"; | |
$y = $x + 5; | |
echo $y; | |
// Output: 15 | |
// Inconsistent function naming | |
$string = "Hello, world!"; | |
$reversed = strrev($string); | |
echo $reversed; | |
// Output: "!dlrow ,olleH" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment