• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/89

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

89 Cards in this Set

  • Front
  • Back
string addcslashes ( string $str , string $charlist )
Returns a string with backslashes before characters that are listed in charlist parameter.
string addslashes ( string $str )
Returns a string with backslashes before characters that need to be quoted in database queries etc. These characters are single quote ('), double quote ("), backslash (\) and NUL (the NULL byte).
string bin2hex ( string $str )
Returns an ASCII string containing the hexadecimal representation of str . The conversion is done byte-wise with the high-nibble first.
string chr ( int $ascii )
Returns a one-character string containing the character specified by ascii .
string chunk_split ( string $body [, int $chunklen [, string $end ]] )
Can be used to split a string into smaller chunks which is useful for e.g. converting base64_encode() output to match RFC 2045 semantics. It inserts end every chunklen characters.
string convert_cyr_string ( string $str , string $from , string $to )
Converts from one Cyrillic character set to another.
string convert_uudecode ( string $data )
convert_uudecode() decodes a uuencoded string.
string convert_uuencode ( string $data )
convert_uuencode() encodes a string using the uuencode algorithm.

Uuencode translates all strings (including binary's ones) into printable characters, making them safe for network transmissions. Uuencoded data is about 35% larger than the original.
mixed count_chars ( string $string [, int $mode ] )
Counts the number of occurrences of every byte-value (0..255) in string and returns it in various ways.
int crc32 ( string $str )
Generates the cyclic redundancy checksum polynomial of 32-bit lengths of the str . This is usually used to validate the integrity of data being transmitted.

Because PHP's integer type is signed, and many crc32 checksums will result in negative integers, you need to use the "%u" formatter of sprintf() or printf() to get the string representation of the unsigned crc32 checksum.
string crypt ( string $str [, string $salt ] )
crypt() will return an encrypted string using the standard Unix DES-based encryption algorithm or alternative algorithms that may be available on the system.
void echo ( string $arg1 [, string $... ] )
Outputs all parameters.

echo() is not actually a function (it is a language construct), so you are not required to use parentheses with it. echo() (unlike some other language constructs) does not behave like a function, so it cannot always be used in the context of a function. Additionally, if you want to pass more than one parameter to echo(), the parameters must not be enclosed within parentheses.
array explode ( string $delimiter , string $string [, int $limit ] )
Returns an array of strings, each of which is a substring of string formed by splitting it on boundaries formed by the string delimiter .
int fprintf ( resource $handle , string $format [, mixed $args [, mixed $... ]] )
Write a string produced according to format to the stream resource specified by handle .
array get_html_translation_table ([ int $table [, int $quote_style ]] )
get_html_translation_table() will return the translation table that is used internally for htmlspecialchars() and htmlentities().
string html_entity_decode ( string $string [, int $quote_style [, string $charset ]] )
html_entity_decode() is the opposite of htmlentities() in that it converts all HTML entities to their applicable characters from string .
string htmlentities ( string $string [, int $quote_style [, string $charset [, bool $double_encode ]]] )
This function is identical to htmlspecialchars() in all ways, except with htmlentities(), all characters which have HTML character entity equivalents are translated into these entities.

If you're wanting to decode instead (the reverse) you can use html_entity_decode().
string htmlspecialchars_decode ( string $string [, int $quote_style ] )
This function is the opposite of htmlspecialchars(). It converts special HTML entities back to characters.

The converted entities are: &, " (when ENT_NOQUOTES is not set), ' (when ENT_QUOTES is set), < and >.
string htmlspecialchars ( string $string [, int $quote_style [, string $charset [, bool $double_encode ]]] )
Certain characters have special significance in HTML, and should be represented by HTML entities if they are to preserve their meanings. This function returns a string with some of these conversions made; the translations made are those most useful for everyday web programming. If you require all HTML character entities to be translated, use htmlentities() instead.
string implode ( string $glue , array $pieces )
Join array elements with a glue string.
int levenshtein ( string $str1 , string $str2 [, int $cost_ins ], int $cost_rep , int $cost_del )
This function returns the Levenshtein-Distance between the two argument strings or -1, if one of the argument strings is longer than the limit of 255 characters.

The Levenshtein distance is defined as the minimal number of characters you have to replace, insert or delete to transform str1 into str2 . The complexity of the algorithm is O(m*n), where n and m are the length of str1 and str2 (rather good when compared to similar_text(), which is O(max(n,m)**3), but still expensive).
array localeconv ( void )
Returns an associative array containing localized numeric and monetary formatting information.
string ltrim ( string $str [, string $charlist ] )
Strip whitespace (or other characters) from the beginning of a string.
string md5_file ( string $filename [, bool $raw_output ] )
Calculates the MD5 hash of the file specified by the filename parameter using the » RSA Data Security, Inc. MD5 Message-Digest Algorithm, and returns that hash. The hash is a 32-character hexadecimal number.
string md5 ( string $str [, bool $raw_output ] )
Calculates the MD5 hash of str using the » RSA Data Security, Inc. MD5 Message-Digest Algorithm, and returns that hash.
string metaphone ( string $str [, int $phones ] )
Calculates the metaphone key of str .

Similar to soundex() metaphone creates the same key for similar sounding words. It's more accurate than soundex() as it knows the basic rules of English pronunciation. The metaphone generated keys are of variable length.

Metaphone was developed by Lawrence Philips <lphilips at verity dot com>. It is described in ["Practical Algorithms for Programmers", Binstock & Rex, Addison Wesley, 1995].
string money_format ( string $format , float $number )
money_format() returns a formatted version of number . This function wraps the C library function strfmon(), with the difference that this implementation converts only one number at a time.
string nl_langinfo ( int $item )
nl_langinfo() is used to access individual elements of the locale categories. Unlike localeconv(), which returns all of the elements, nl_langinfo() allows you to select any specific element.
string nl2br ( string $string )
Returns string with '<br />' inserted before all newlines.
string number_format ( float $number [, int $decimals [, string $dec_point ]], string $thousands_sep )
number_format() returns a formatted version of number . This function accepts either one, two or four parameters (not three):

If only one parameter is given, number will be formatted without decimals, but with a comma (",") between every group of thousands.

If two parameters are given, number will be formatted with decimals decimals with a dot (".") in front, and a comma (",") between every group of thousands.

If all four parameters are given, number will be formatted with decimals decimals, dec_point instead of a dot (".") before the decimals and thousands_sep instead of a comma (",") between every group of thousands.

Only the first character of thousands_sep is used. For example, if you use bar as thousands_sep on the number 1000, number_format() will return 1b000.
int ord ( string $string )
Returns the ASCII value of the first character of string .

This function complements chr().
void parse_str ( string $str [, array &$arr ] )
Parses str as if it were the query string passed via a URL and sets variables in the current scope.
int print ( string $arg )
Outputs arg .

print() is not actually a real function (it is a language construct) so you are not required to use parentheses with its argument list.
int printf ( string $format [, mixed $args [, mixed $... ]] )
Produces output according to format .
string quoted_printable_decode ( string $str )
This function returns an 8-bit binary string corresponding to the decoded quoted printable string (according to » RFC2045, section 6.7, not » RFC2821, section 4.5.2, so additional periods are not stripped from the beginning of line).

This function is similar to imap_qprint(), except this one does not require the IMAP module to work.
string quotemeta ( string $str )
Returns a version of str with a backslash character (\) before every character that is among these:

. \ + * ? [ ^ ] ( $ )
string rtrim ( string $str [, string $charlist ] )
This function returns a string with whitespace stripped from the end of str .
string setlocale ( int $category , string $locale [, string $... ] )
Sets locale information.
string sha1_file ( string $filename [, bool $raw_output ] )
Calculates the sha1 hash of filename using the » US Secure Hash Algorithm 1, and returns that hash. The hash is a 40-character hexadecimal number.
string sha1 ( string $str [, bool $raw_output ] )
Calculates the sha1 hash of str using the » US Secure Hash Algorithm 1,
int similar_text ( string $first , string $second [, float &$percent ] )
This calculates the similarity between two strings as described in Oliver [1993]. Note that this implementation does not use a stack as in Oliver's pseudo code, but recursive calls which may or may not speed up the whole process. Note also that the complexity of this algorithm is O(N**3) where N is the length of the longest string.
string soundex ( string $str )
Calculates the soundex key of str .

Soundex keys have the property that words pronounced similarly produce the same soundex key, and can thus be used to simplify searches in databases where you know the pronunciation but not the spelling. This soundex function returns a string 4 characters long, starting with a letter.

This particular soundex function is one described by Donald Knuth in "The Art Of Computer Programming, vol. 3: Sorting And Searching", Addison-Wesley (1973), pp. 391-392.
string sprintf ( string $format [, mixed $args [, mixed $... ]] )
Returns a string produced according to the formatting string format .
mixed sscanf ( string $str , string $format [, mixed &$... ] )
The function sscanf() is the input analog of printf(). sscanf() reads from the string str and interprets it according to the specified format , which is described in the documentation for sprintf(). If only two parameters were passed to this function, the values parsed will be returned as an array. Otherwise, if optional parameters are passed, the function will return the number of assigned values. The optional parameters must be passed by reference.

Any whitespace in the format string matches any whitespace in the input string. This means that even a tab \t in the format string can match a single space character in the input string.
mixed str_ireplace ( mixed $search , mixed $replace , mixed $subject [, int &$count ] )
This function returns a string or an array with all occurrences of search in subject (ignoring case) replaced with the given replace value. If you don't need fancy replacing rules, you should generally use this function instead of eregi_replace() or preg_replace() with the i modifier.
string str_pad ( string $input , int $pad_length [, string $pad_string [, int $pad_type ]] )
This functions returns the input string padded on the left, the right, or both sides to the specified padding length. If the optional argument pad_string is not supplied, the input is padded with spaces, otherwise it is padded with characters from pad_string up to the limit.
string str_repeat ( string $input , int $multiplier )
Returns input repeated multiplier times.
mixed str_replace ( mixed $search , mixed $replace , mixed $subject [, int &$count ] )
This function returns a string or an array with all occurrences of search in subject replaced with the given replace value.

If you don't need fancy replacing rules (like regular expressions), you should always use this function instead of ereg_replace() or preg_replace().
string str_rot13 ( string $str )
Performs the ROT13 encoding on the str argument and returns the resulting string.

The ROT13 encoding simply shifts every letter by 13 places in the alphabet while leaving non-alpha characters untouched. Encoding and decoding are done by the same function, passing an encoded string as argument will return the original version.
string str_shuffle ( string $str )
str_shuffle() shuffles a string. One permutation of all possible is created.
array str_split ( string $string [, int $split_length ] )
Converts a string to an array.
mixed str_word_count ( string $string [, int $format [, string $charlist ]] )
Counts the number of words inside string . If the optional format is not specified, then the return value will be an integer representing the number of words found. In the event the format is specified, the return value will be an array, content of which is dependent on the format . The possible value for the format and the resultant outputs are listed below.

For the purpose of this function, 'word' is defined as a locale dependent string containing alphabetic characters, which also may contain, but not start with "'" and "-" characters.
int strcasecmp ( string $str1 , string $str2 )
Binary safe case-insensitive string comparison.
int strcmp ( string $str1 , string $str2 )
Note that this comparison is case sensitive.
int strcoll ( string $str1 , string $str2 )
Note that this comparison is case sensitive, and unlike strcmp() this function is not binary safe.

strcoll() uses the current locale for doing the comparisons. If the current locale is C or POSIX, this function is equivalent to strcmp().
int strcspn ( string $str1 , string $str2 [, int $start [, int $length ]] )
Returns the length of the initial segment of str1 which does not contain any of the characters in str2 .
string strip_tags ( string $str [, string $allowable_tags ] )
This function tries to return a string with all HTML and PHP tags stripped from a given str . It uses the same tag stripping state machine as the fgetss() function.
string stripcslashes ( string $str )
Returns a string with backslashes stripped off. Recognizes C-like \n, \r ..., octal and hexadecimal representation.
int stripos ( string $haystack , string $needle [, int $offset ] )
Returns the numeric position of the first occurrence of needle in the haystack string.

Unlike strpos(), stripos() is case-insensitive.
string stripslashes ( string $str )
Un-quotes a quoted string.
string stristr ( string $haystack , string $needle , bool $before_needle )
Returns all of haystack from the first occurrence of needle to the end.
int strlen ( string $string )
Returns the length of the given string .
int strnatcasecmp ( string $str1 , string $str2 )
This function implements a comparison algorithm that orders alphanumeric strings in the way a human being would. The behaviour of this function is similar to strnatcmp(), except that the comparison is not case sensitive. For more information see: Martin Pool's » Natural Order String Comparison page.
int strnatcmp ( string $str1 , string $str2 )
This function implements a comparison algorithm that orders alphanumeric strings in the way a human being would, this is described as a "natural ordering". Note that this comparison is case sensitive.
int strncasecmp ( string $str1 , string $str2 , int $len )
This function is similar to strcasecmp(), with the difference that you can specify the (upper limit of the) number of characters from each string to be used in the comparison.
int strncmp ( string $str1 , string $str2 , int $len )
This function is similar to strcmp(), with the difference that you can specify the (upper limit of the) number of characters from each string to be used in the comparison.

Note that this comparison is case sensitive.
string strpbrk ( string $haystack , string $char_list )
strpbrk() searches the haystack string for a char_list .
int strpos ( string $haystack , mixed $needle [, int $offset ] )
Returns the numeric position of the first occurrence of needle in the haystack string. Unlike the strrpos() before PHP 5, this function can take a full string as the needle parameter and the entire string will be used.
string strrchr ( string $haystack , string $needle )
This function returns the portion of haystack which starts at the last occurrence of needle and goes until the end of haystack .
string strrev ( string $string )
Returns string , reversed.
int strripos ( string $haystack , string $needle [, int $offset ] )
Find position of last occurrence of a case-insensitive string in a string. Unlike strrpos(), strripos() is case-insensitive.
int strrpos ( string $haystack , string $needle [, int $offset ] )
Returns the numeric position of the last occurrence of needle in the haystack string. Note that the needle in this case can only be a single character in PHP 4. If a string is passed as the needle, then only the first character of that string will be used.

If needle is not found, returns FALSE.

It is easy to mistake the return values for "character found at position 0" and "character not found". Here's how to detect the difference:
int strspn ( string $str1 , string $str2 [, int $start [, int $length ]] )
Finds the length of the initial segment matching mask.
string strstr ( string $haystack , string $needle , bool $before_needle )
Returns part of haystack string from the first occurrence of needle to the end of haystack .
string strtok ( string $str , string $token )
strtok() splits a string (str ) into smaller strings (tokens), with each token being delimited by any character from token . That is, if you have a string like "This is an example string" you could tokenize this string into its individual words by using the space character as the token.
string strtolower ( string $str )
Returns string with all alphabetic characters converted to lowercase.

Note that 'alphabetic' is determined by the current locale. This means that in i.e. the default "C" locale, characters such as umlaut-A (Ä) will not be converted.
string strtoupper ( string $string )
Returns string with all alphabetic characters converted to uppercase.

Note that 'alphabetic' is determined by the current locale. For instance, in the default "C" locale characters such as umlaut-a (ä) will not be converted.
string strtr ( string $str , string $from , string $to )
This function returns a copy of str , translating all occurrences of each character in from to the corresponding character in to .

If from and to are different lengths, the extra characters in the longer of the two are ignored.
int substr_compare ( string $main_str , string $str , int $offset [, int $length [, bool $case_insensitivity ]] )
substr_compare() compares main_str from position offset with str up to length characters.
int substr_count ( string $haystack , string $needle [, int $offset [, int $length ]] )
substr_count() returns the number of times the needle substring occurs in the haystack string. Please note that needle is case sensitive.
mixed substr_replace ( mixed $string , string $replacement , int $start [, int $length ] )
substr_replace() replaces a copy of string delimited by the start and (optionally) length parameters with the string given in replacement .
string substr ( string $string , int $start [, int $length ] )
Returns the portion of string specified by the start and length parameters.
string trim ( string $str [, string $charlist ] )
This function returns a string with whitespace stripped from the beginning and end of str . Without the second parameter, trim() will strip these characters:

* " " (ASCII 32 (0x20)), an ordinary space.
* "\t" (ASCII 9 (0x09)), a tab.
* "\n" (ASCII 10 (0x0A)), a new line (line feed).
* "\r" (ASCII 13 (0x0D)), a carriage return.
* "\0" (ASCII 0 (0x00)), the NUL-byte.
* "\x0B" (ASCII 11 (0x0B)), a vertical tab.
string ucfirst ( string $str )
Returns a string with the first character of str capitalized, if that character is alphabetic.

Note that 'alphabetic' is determined by the current locale. For instance, in the default "C" locale characters such as umlaut-a (ä) will not be converted.
string ucwords ( string $str )
Returns a string with the first character of each word in str capitalized, if that character is alphabetic.

The definition of a word is any string of characters that is immediately after a whitespace (These are: space, form-feed, newline, carriage return, horizontal tab, and vertical tab).
int vfprintf ( resource $handle , string $format , array $args )
Write a string produced according to format to the stream resource specified by handle .

Operates as fprintf() but accepts an array of arguments, rather than a variable number of arguments.
int vprintf ( string $format , array $args )
Display array values as a formatted string according to format (which is described in the documentation for sprintf()).

Operates as printf() but accepts an array of arguments, rather than a variable number of arguments.
string vsprintf ( string $format , array $args )
Operates as sprintf() but accepts an array of arguments, rather than a variable number of arguments.
string wordwrap ( string $str [, int $width [, string $break [, bool $cut ]]] )
Wraps a string to a given number of characters using a string break character.