Last active
June 14, 2017 13:06
-
-
Save xabikip/57d27208d654737d1167 to your computer and use it in GitHub Desktop.
Testu baten karaktere denak banan-banan berain ascii kodea jakiteko.
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 | |
$testua = "Hau izango zan testua"; | |
for ($i=0; $i < strlen($testua); $i++) { | |
print("\n karakterea: ");var_dump($testua[$i]); | |
print(" - htmlspecialchars: ");var_dump(htmlspecialchars($testua[$i])); | |
print(" - htmlentities: ");var_dump(htmlentities($testua[$i])); | |
print(" - htmlspecialchars_decode: ");var_dump(htmlspecialchars_decode($testua[$i])); | |
print(" - utf8_decode: ");var_dump(utf8_decode($testua[$i])); | |
print(" - utf8_encode: ");var_dump(utf8_encode($testua[$i])); | |
print(" - ascii kodian: ");var_dump(ord($testua[$i])); | |
print(" - ascii chr: ");var_dump(chr(ord($testua[$i]))); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment