addcslashes()
Quote string with slashes in a C style
example
——–--–—–--–—–--–—–
addslashes()
Quote string with slashes
example
——–--–—–--–—–--–—–
bin2hex()
Convert binary data into hexadecimal representation
example
——–--–—–--–—–--–—–
chop()
Alias of rtrim
example
——–--–—–--–—–--–—–
chr()
Return a specific character
example
——–--–—–--–—–--–—–
chunk_split()
Split a string into smaller chunks
example
——–--–—–--–—–--–—–
convert_cyr_string()
Convert from one Cyrillic character set to another
example
——–--–—–--–—–--–—–
convert_uudecode()
Decode a uuencoded string
example
——–--–—–--–—–--–—–
convert_uuencode()
Uuencode a string
example
——–--–—–--–—–--–—–
count_chars()
Return information about characters used in a string
example
——–--–—–--–—–--–—–
crc32()
Calculates the crc32 polynomial of a string
example
——–--–—–--–—–--–—–
crypt()
One-way string hashing
example
——–--–—–--–—–--–—–
echo()
Output one or more strings
■
http://cdv.lt/Hm
——–--–—–--–—–--–—–
explode()
Split a string by string
example
——–--–—–--–—–--–—–
fprintf()
Write a formatted string to a stream
example
——–--–—–--–—–--–—–
get_html_translation_table()
Returns the translation table used by htmlspecialchars and htmlentities
example
——–--–—–--–—–--–—–
hebrev()
Convert logical Hebrew text to visual text
example
——–--–—–--–—–--–—–
hebrevc()
Convert logical Hebrew text to visual text with newline conversion
example
——–--–—–--–—–--–—–
hex2bin()
Decodes a hexadecimally encoded binary string
example
——–--–—–--–—–--–—–
html_entity_decode()
Convert all HTML entities to their applicable characters
example
——–--–—–--–—–--–—–
htmlentities()
Convert all applicable characters to HTML entities
example
——–--–—–--–—–--–—–
htmlspecialchars_decode()
Convert special HTML entities back to characters
example
——–--–—–--–—–--–—–
htmlspecialchars()
Convert special characters to HTML entities
example
——–--–—–--–—–--–—–
implode()
Join array elements with a string
example
——–--–—–--–—–--–—–
join()
Alias of implode
example
——–--–—–--–—–--–—–
lcfirst()
Make a string’s first character lowercase
example
——–--–—–--–—–--–—–
levenshtein()
Calculate Levenshtein distance between two strings
example
——–--–—–--–—–--–—–
localeconv()
Get numeric formatting information
example
——–--–—–--–—–--–—–
ltrim()
Strip whitespace (or other characters) from the beginning of a string
example
——–--–—–--–—–--–—–
md5_file()
Calculates the md5 hash of a given file
example
——–--–—–--–—–--–—–
md5()
Calculate the md5 hash of a string
example
——–--–—–--–—–--–—–
metaphone()
Calculate the metaphone key of a string
example
——–--–—–--–—–--–—–
money_format()
Formats a number as a currency string
example
——–--–—–--–—–--–—–
nl_langinfo()
Query language and locale information
example
——–--–—–--–—–--–—–
nl2br()
Inserts HTML line breaks before all newlines in a string
example
——–--–—–--–—–--–—–
number_format()
Format a number with grouped thousands
example
——–--–—–--–—–--–—–
ord()
Return ASCII value of character
example
——–--–—–--–—–--–—–
parse_str()
Parses the string into variables
example
——–--–—–--–—–--–—–
print()
Output a string
example
——–--–—–--–—–--–—–
printf()
Output a formatted string
example
——–--–—–--–—–--–—–
quoted_printable_decode()
Convert a quoted-printable string to an 8 bit string
example
——–--–—–--–—–--–—–
quoted_printable_encode()
Convert a 8 bit string to a quoted-printable string
example
——–--–—–--–—–--–—–
quotemeta()
Quote meta characters
example
——–--–—–--–—–--–—–
rtrim()
Strip whitespace (or other characters) from the end of a string
example
——–--–—–--–—–--–—–
setlocale()
Set locale information
example
——–--–—–--–—–--–—–
sha1_file()
Calculate the sha1 hash of a file
example
——–--–—–--–—–--–—–
sha1()
Calculate the sha1 hash of a string
example
——–--–—–--–—–--–—–
similar_text()
Calculate the similarity between two strings
example
——–--–—–--–—–--–—–
soundex()
Calculate the soundex key of a string
example
——–--–—–--–—–--–—–
sprintf()
Return a formatted string
example
——–--–—–--–—–--–—–
sscanf()
Parses input from a string according to a format
example
——–--–—–--–—–--–—–
str_getcsv()
Parse a CSV string into an array
example
——–--–—–--–—–--–—–
str_ireplace()
Case-insensitive version of str_replace.
example
——–--–—–--–—–--–—–
str_pad()
Pad a string to a certain length with another string
example
——–--–—–--–—–--–—–
str_repeat()
Repeat a string
example
——–--–—–--–—–--–—–
str_replace()
Replace all occurrences of the search string with the replacement string
example
——–--–—–--–—–--–—–
str_rot13()
Perform the rot13 transform on a string
example
——–--–—–--–—–--–—–
str_shuffle()
Randomly shuffles a string
example
——–--–—–--–—–--–—–
str_split()
Convert a string to an array
example
——–--–—–--–—–--–—–
str_word_count()
Return information about words used in a string
example
——–--–—–--–—–--–—–
strcasecmp()
Binary safe case-insensitive string comparison
example
——–--–—–--–—–--–—–
strchr()
Alias of strstr
example
——–--–—–--–—–--–—–
strcmp()
Binary safe string comparison
example
——–--–—–--–—–--–—–
strcoll()
Locale based string comparison
example
——–--–—–--–—–--–—–
strcspn()
Find length of initial segment not matching mask
example
——–--–—–--–—–--–—–
strip_tags()
Strip HTML and PHP tags from a string
example
——–--–—–--–—–--–—–
stripcslashes()
Un-quote string quoted with addcslashes
example
——–--–—–--–—–--–—–
stripos()
Find the position of the first occurrence of a case-insensitive substring in a string
example
——–--–—–--–—–--–—–
stripslashes()
Un-quotes a quoted string
example
——–--–—–--–—–--–—–
stristr()
Case-insensitive strstr
example
——–--–—–--–—–--–—–
strlen()
Get string length
example
——–--–—–--–—–--–—–
strnatcasecmp()
Case insensitive string comparisons using a «natural order» algorithm
example
——–--–—–--–—–--–—–
strnatcmp()
String comparisons using a «natural order» algorithm
example
——–--–—–--–—–--–—–
strncasecmp()
Binary safe case-insensitive string comparison of the first n characters
example
——–--–—–--–—–--–—–
strncmp()
Binary safe string comparison of the first n characters
example
——–--–—–--–—–--–—–
strpbrk()
Search a string for any of a set of characters
example
——–--–—–--–—–--–—–
strpos()
Find the position of the first occurrence of a substring in a string
example
——–--–—–--–—–--–—–
strrchr()
Find the last occurrence of a character in a string
example
——–--–—–--–—–--–—–
strrev()
Reverse a string
example
——–--–—–--–—–--–—–
strripos()
Find the position of the last occurrence of a case-insensitive substring in a string
example
——–--–—–--–—–--–—–
strrpos()
Find the position of the last occurrence of a substring in a string
example
——–--–—–--–—–--–—–
strspn()
Finds the length of the initial segment of a string consisting entirely of characters contained within a given mask.
example
——–--–—–--–—–--–—–
strstr()
Find the first occurrence of a string
example
——–--–—–--–—–--–—–
strtok()
Tokenize string
example
——–--–—–--–—–--–—–
strtolower()
Make a string lowercase
example
——–--–—–--–—–--–—–
strtoupper()
Make a string uppercase
example
——–--–—–--–—–--–—–
strtr()
Translate characters or replace substrings
example
——–--–—–--–—–--–—–
substr_compare()
Binary safe comparison of two strings from an offset, up to length characters
example
——–--–—–--–—–--–—–
substr_count()
Count the number of substring occurrences
example
——–--–—–--–—–--–—–
substr_replace()
Replace text within a portion of a string
example
——–--–—–--–—–--–—–
substr()
Return part of a string
example
——–--–—–--–—–--–—–
trim()
Strip whitespace (or other characters) from the beginning and end of a string
example
——–--–—–--–—–--–—–
ucfirst()
Make a string’s first character uppercase
example
——–--–—–--–—–--–—–
ucwords()
Uppercase the first character of each word in a string
example
——–--–—–--–—–--–—–
vfprintf()
Write a formatted string to a stream
example
——–--–—–--–—–--–—–
vprintf()
Output a formatted string
example
——–--–—–--–—–--–—–
vsprintf()
Return a formatted string
example
——–--–—–--–—–--–—–
wordwrap()
Wraps a string to a given number of characters
example
——–--–—–--–—–--–—–
——–--–—–--–—–--–—–
STRING CONSTANTS
——–--–—–--–—–--–—–
CRYPT_SALT_LENGTH
Contains the length of the default encryption method for the system. For standard DES encryption, the length is 2
——–--–—–--–—–--–—–
CRYPT_STD_DES
Set to 1 if the standard DES-based encryption with a 2 character salt is supported, 0 otherwise
——–--–—–--–—–--–—–
CRYPT_EXT_DES
Set to 1 if the extended DES-based encryption with a 9 character salt is supported, 0 otherwise
——–--–—–--–—–--–—–
CRYPT_MD5
Set to 1 if the MD5 encryption with a 12 character salt starting with $1$ is supported, 0 otherwise
——–--–—–--–—–--–—–
CRYPT_BLOWFISH
Set to 1 if the Blowfish encryption with a 16 character salt starting with $2$ or $2a$ is supported, 0 otherwise0
——–--–—–--–—–--–—–
HTML_SPECIALCHARS
HTML_ENTITIES
ENT_COMPAT
ENT_QUOTES
ENT_NOQUOTES
CHAR_MAX
LC_CTYPE
LC_NUMERIC
LC_TIME
LC_COLLATE
LC_MONETARY
LC_ALL
LC_MESSAGES
STR_PAD_LEFT
STR_PAD_RIGHT
STR_PAD_BOTH
Cheatographer
Metadata
Favourited By
and 14 more …
Comments
Thank you!
thanks so much!
Add a Comment
Related Cheat Sheets