MENU
Conversion
strtolower($s) | returns a copy of $s with all alphabets converted to lowercase. |
strtoupper($s) | returns a copy of $s with all alphabets converted to uppercase. |
lcfirst($s) | returns a copy of $s with the first character lowercased, if that character is an alphabet. |
ucfirst($s) | returns a copy of $s with the first character capitalized, if that character is an alphabet. |
ucwords($s) | returns a copy of $s with the first character of each word capitalized, if that character is an alphabet. |
quotemeta($s) | returns a copy of $s with backslashes added before . \ + * ? [ ^ ] ( $ ). |
addslashes($s) | returns a copy of $s with backslashes added before single quotes(‘), double quotes (“), backslashes (\) and NULs (the NULL byte). |
addcslashes($s1,$s2) | returns a copy of $s1 with backslashes added before characters listed in $s2. |
stripslashes($s) | returns a copy of $s with backslashes stripped off. |
stripcslashes($s) | returns a copy of $s with backslashes stripped off. C-like \n, \r…… octal and hexadecimal representations are recognized. |
RESETRUNFULL
<!DOCTYPE html><html><head></head>
<body><?php
echo ord('A')."<br />";
echo chr(66)."<br />";
echo strrev('abcde')."<br />";
echo str_repeat('abc',3)."<br />";
echo str_pad('abc',10,'+-',STR_PAD_BOTH)."<br />";
echo str_shuffle('abcdef')."<br />";
echo trim(' .-.-.-.-abc.-.-.-.-. ',".- ")."<br /><br />";
echo wordwrap('I say it is quite fun to learn PHP. Do you agree?',13,"<br />")."<br /><br />";;
echo ucwords(strtolower('hElLo WolRd!'))."<br />";
echo quotemeta('(can you hear me?)')."<br />";
echo addcslashes('Hello World','A..Z')."<br />";
echo addcslashes('Hello World','HWc..f')."<br />";
echo stripcslashes('\" \' \101 \x41 \\\ \n \r \t');
?></body></html>