Replaces & with &
string
ampentity
(string $String)
array_change_key_case_recursive (line
93)
Recursively changes the case of all array keys
array
array_change_key_case_recursive
(array $arr, [integer $case = CASE_LOWER])
Returns a string representation of the result of a boolean evaluation of a variable.
string
bool
(mixed $in)
Returns the logical AND of two booleans
string
boolean_and
(boolean $b1, boolean $b2)
Returns the logical OR of two booleans
string
boolean_or
(boolean $b1, boolean $b2)
Fixes a string to a certain maximum length.
string
caplength
(string $string, integer $length)
-
string
$string
-
integer
$length
Concatinates two strings
string
concatinate
(string $str1, string $str2)
-
string
$str1
-
string
$str2
Encodes a string as specified by $Encoding
void
encode
(string $String, integer $Encoding)
-
string
$String
-
integer
$Encoding
encoding_convert_encoding (line
200)
Converts string from one encoding to another
string
encoding_convert_encoding
(string $str, string $to_encoding, [string $from_encoding = 'UTF-8'])
-
string
$str
-
string
$to_encoding
-
string
$from_encoding
encoding_strlen (line
241)
Finds length of multi-byte strings
integer
encoding_strlen
(string $str, [string $encoding = 'UTF-8'])
-
string
$str
-
string
$encoding
encoding_strpos (line
276)
Returns position of $needle as integer or false if $needle is not present in $haystack
mixed
encoding_strpos
(string $haystack, string $needle, [integer $offset = 0], [string $encoding = 'UTF-8'])
-
string
$haystack
-
string
$needle
-
integer
$offset
-
string
$encoding
encoding_strrpos (line
310)
Same as strpos, except finds position from end of $haystack
mixed
encoding_strrpos
(string $haystack, string $needle, [integer $offset = 0], [string $encoding = 'UTF-8'])
-
string
$haystack
-
string
$needle
-
integer
$offset
-
string
$encoding
encoding_strtolower (line
376)
Returns lowercase representation of string
string
encoding_strtolower
(string $str, [string $encoding = 'UTF-8'])
-
string
$str
-
string
$encoding
encoding_strtoupper (line
404)
Returns uppercase representation of string
string
encoding_strtoupper
(string $str, [string $encoding = 'UTF-8'])
-
string
$str
-
string
$encoding
encoding_substr (line
344)
Returns substring based on $start position and $length
mixed
encoding_substr
(string $string, integer $start, [integer $length = NULL], [string $encoding = 'UTF-8'])
-
string
$string
-
integer
$start
-
integer
$length
-
string
$encoding
encoding_substr_count (line
433)
Returns number of times $needle appears in $haystack
integer
encoding_substr_count
(string $haystack, string $needle, [string $encoding = 'UTF-8'])
-
string
$haystack
-
string
$needle
-
string
$encoding
encoding_substr_replace (line
464)
Returns $string with substring replaced with $replacement
string
encoding_substr_replace
(string $string, string $replacement, integer $start, [integer $length = NULL], [string $encoding = 'UTF-8'])
-
string
$string
-
string
$replacement
-
integer
$start
-
integer
$length
-
string
$encoding
file_get_contents_array (line
501)
Loads an array of files from one file.
This function adds a layer of abstraction when opening files in PHP. If the file passed is a supported multi-file archive, every file in that archive will be loaded into the array. If the file is a compressed file, the file will be decompressed and loaded into the array.
Even if only one file is loaded, it will be put into an array, so any code calling this function should expect an array on success.
Currently supported formats:
array
file_get_contents_array
(string $Filename)
Fixes a string to a certain length using 's.
Similar to strpad, except the length is strict (i.e. if the string is longer than length, it will be truncated.)
string
fixlength
(string $string, integer $length)
-
string
$string
-
integer
$length
Formats a floating point number to only hold the needed number of decimal points
float
formatNumber
(float $number)
Returns a nicely formatted string representation of a filesize.
string
formatsize
(integer $size)
Returns a nicely formatted string representation of a time.
string
formattime
(integer $time)
getCSVFromString (line
713)
Parses CSV into two-dimensional array
string[][]
getCSVFromString
(string $string)
get_enabled_compression_extensions (line
780)
Returns an array of enabled compression file extensions
string[]
get_enabled_compression_extensions
()
highlightcolor (line
817)
Returns a hex color for highlighting
string
highlightcolor
(integer $number)
Implodes $pieces while including keys in returned string
string
implode_keys
([string $glue = NULL], array $pieces, [string $keyvalglue = NULL])
-
string
$glue
-
array
$pieces
-
string
$keyvalglue
Functions like array_map, but works also on objects and all child objects.
Note: In the case of a recursive objects (i.e. a doubly-linked list) you must pass the name of the recursive property to $ignoredproperties or your webserver will crash! $ignoredproperties should contain a comma-delimited list of object properties to ignore.
mixed
map_recursive
(callback $function, mixed $var, [string $ignoredproperties = 'Collection,Collections,Parent,PrimaryCreator'])
-
callback
$function
-
mixed
$var
-
string
$ignoredproperties
Functions exactly as natcasesort, but sorts by key value
boolean
natcaseksort
(array &$array)
Returns next bitmask of type $strBitmask. Useful when total number of required bitmasks is unknown
integer
nextbitmask
(string $strBitmask)
Attempts to pluralize a string
string
pluralize
(string $word)
Converts line breaks to <p></p>
string
ptag
(string $string)
Attempts to singularize a string
string
singularize
(string $word)
unextendcharacters (line
1088)
Replates extended characters with their non-extended equivalents.
string
unextendcharacters
(string $string)