/sources/phpstub.php

Description
Functions
(line 628)

Output a message and terminate the current script.

void ([string $message = ''])
  • string $message: The message.
abs (line 35)

Absolute value.

  • return: The absolute value of number.
mixed abs (mixed $number)
  • mixed $number: The number to get the absolute value of.
acos (line 3804)

Arc cosine.

  • return: Angle.
float acos (float $arg)
  • float $arg: Argument.
addcslashes (line 4899)

Quote string with slashes in a C style.

  • return: Result.
string addcslashes (string $str, string $charlist)
  • string $str: Input string.
  • string $charlist: Chars to convert.
addslashes (line 3262)

Quote string for encapsulation in a written string data type.

  • return: Slashed string.
string addslashes (string $str)
  • string $str: Unslashed string.
array_count_values (line 46)

Counts all the values of an array.

  • return: An array using the values of the input array as keys and their frequency in input as values.
array array_count_values (array $input)
  • array $input: Input array.
array_diff (line 59)

Calculate the difference between arrays.

  • return: The difference.
array array_diff (array $array1, array $array2, [?array $array3 = NULL])
  • array $array1: First array.
  • array $array2: Second array.
  • ?array $array3: Third array (NULL: only 2).
array_filter (line 4911)

Filters elements of an array using a callback function.

  • return: Out.
array array_filter (array $input, [?mixed $callback = NULL])
  • array $input: In.
  • ?mixed $callback: The filter function callback (NULL: filter out false's).
array_flip (line 70)

Exchanges all keys with their associated values in an array.

  • return: An array in flip order.
array array_flip (array $trans)
  • array $trans: Array to flip.
array_intersect (line 107)

Calculate the intersection between arrays.

  • return: The intersection.
array array_intersect (array $array1, array $array2, [?array $array3 = NULL])
  • array $array1: First array.
  • array $array2: Second array.
  • ?array $array3: Third array (NULL: only 2).
array_keys (line 94)

Return all the keys of an array.

  • return: The keys of the array.
array array_keys (array $input, [?mixed $search_value = NULL])
  • array $input: Input array.
  • ?mixed $search_value: Only find keys with this value (NULL: no such filter).
array_key_exists (line 82)

Checks if the given key or index exists in the array.

  • return: Whether the key is set in the search array.
boolean array_key_exists (mixed $key, array $search)
  • mixed $key: Key.
  • array $search: Search array.
array_map (line 4923)

Applies the callback to the elements of the given array.

  • return: Out.
array array_map (mixed $callback, array $array)
  • mixed $callback: Callback map function.
  • array $array: In.
array_merge (line 120)

Merge two or more arrays.

  • return: Merged array.
array array_merge (array $array1, array $array2, [?array $array3 = NULL])
  • array $array1: First array.
  • array $array2: Second array.
  • ?array $array3: Third array (NULL: only 2).
array_merge_recursive (line 4949)

Merges the elements of one or more arrays together so that the values of one are appended to the end of the previous one. It returns the resulting array.

If the input arrays have the same string keys, then the values for these keys are merged together into an array, and this is done recursively, so that if one of the values is an array itself, the function will merge it with a corresponding entry in another array too. If, however, the arrays have the same numeric key, the later value will not overwrite the original value, but will be appended.

  • return: Result.
array array_merge_recursive (array $array1, array $array2, [?array $array3 = NULL], [?array $array4 = NULL])
  • array $array1: First array to merge.
  • array $array2: Second array to merge.
  • ?array $array3: Third array to merge (NULL: not this one).
  • ?array $array4: Fourth array to merge (NULL: not this one).
array_pad (line 4974)

Pad array to the specified length with a value.

  • return: Output.
array array_pad (array $input, integer $pad_size, mixed $pad_value)
  • array $input: Input.
  • integer $pad_size: Pad size.
  • mixed $pad_value: Pad value.
array_pop (line 131)

Pop the element off the end of array.

  • return: The value (NULL: no value).
?mixed array_pop (array &$array)
  • array &$array: The array.
array_push (line 143)

Push one or more elements onto the end of array.

  • return: The new number of elements in the array.
integer array_push (array &$array, mixed $var)
  • array &$array: The array.
  • mixed $var: The value.
array_rand (line 3816)

Pick one or more random entries out of an array.

  • return: Random entry, or array of random entries if $num_req!=1.
mixed array_rand (array $input, [integer $num_req = 1])
  • array $input: Array to choose from.
  • integer $num_req: Number of entries required.
array_reduce (line 4987)

Iteratively reduce the array to a single value using a callback function.

  • return: Result (NULL: no initial given, and empty array given).
?integer array_reduce (array $input, mixed $callback, [?integer $initial = NULL])
  • array $input: Input.
  • mixed $callback: Process function.
  • ?integer $initial: Initial value (NULL: no initial).
array_reverse (line 155)

Return an array with elements in reverse order.

  • return: The reversed array.
array array_reverse (array $array, [boolean $preserve_keys = false])
  • array $array: The array to reverse.
  • boolean $preserve_keys: Whether to preserve keys.
array_search (line 167)

Searches the array for a given value and returns the corresponding key if successful.

  • return: The key (false: not found).
mixed array_search (mixed $needle, array $haystack)
  • mixed $needle: Needle.
  • array $haystack: Haystack.
array_shift (line 178)

Shift an element off the beginning of array.

  • return: Shifted element (NULL: empty array given).
?mixed array_shift (array &$array)
  • array &$array: The array.
array_slice (line 191)

Extract a slice of the array.

  • return: The slice.
array array_slice (array $array, integer $offset, [?integer $length = NULL])
  • array $array: The array.
  • integer $offset: The offset.
  • ?integer $length: The length (NULL: up to the end of the array).
array_splice (line 205)

Remove a portion of the array and replace it with something else.

  • return: The spliced result.
array array_splice (array $input, integer $offset, [?integer $length = NULL], [?array $replacement = NULL])
  • array $input: The array.
  • integer $offset: The offset.
  • ?integer $length: The length (NULL: up to the end of the array).
  • ?array $replacement: The replacement (NULL: nothing put in, just bit taken out).
array_sum (line 4934)

Add all the elements of an array.

  • return: The sum (float or integer).
mixed array_sum (array $array)
  • array $array: In.
array_unique (line 216)

Removes duplicate values from an array. Equivalence determined by string comparison.

  • return: Output array.
array array_unique (array $array)
  • array $array: Input array.
array_unshift (line 3827)

Prepend one or more elements to the beginning of array.

void array_unshift (array &$array, mixed $var)
  • array &$array: Array to prepend to.
  • mixed $var: Element to prepend.
array_values (line 227)

Return all the values of an array.

  • return: Output array.
array array_values (array $array)
  • array $array: Input array.
array_walk (line 4998)

Apply a user function to every member of an array .

  • return: Success status.
boolean array_walk (array &$array)
  • array &$array: Data.
arsort (line 238)

Sort an array in reverse order and maintain index association.

void arsort (array &$array, [integer $sort_flags = 0])
  • array &$array: Array.
  • integer $sort_flags: Sort flags.
asin (line 3837)

Arc sine.

  • return: Angle.
float asin (float $arg)
  • float $arg: Argument.
asort (line 248)

Sort an array and maintain index association.

void asort (array &$array, [integer $sort_flags = 0])
  • array &$array: Array.
  • integer $sort_flags: Sort flags.
atan (line 3869)

Arc tan.

  • return: Angle.
float atan (float $num)
  • float $num: Argument.
atan2 (line 5010)

Arc tangent of two variables.

  • return: Result.
float atan2 (float $x, float $y)
  • float $x: First.
  • float $y: Second.
base64_decode (line 258)

Decodes data encoded with MIME base64.

  • return: Decoded data (false: error).
~string base64_decode (string $encoded_data)
  • string $encoded_data: Encoded data.
base64_encode (line 269)

Encodes data with MIME base64.

  • return: Encoded data.
string base64_encode (string $data)
  • string $data: Data.
basename (line 3894)

Returns filename component of path.

  • return: File name component.
string basename (PATH $path, [string $ext = ''])
  • PATH $path: Path.
  • string $ext: File extension to cut off (blank: none).
base_convert (line 3882)

Convert a number between arbitrary bases (string representations).

  • return: New base representation.
string base_convert (string $number, integer $frombase, integer $tobase)
  • string $number: The string representation number to convert.
  • integer $frombase: From base.
  • integer $tobase: To base.
bindec (line 3916)

Binary (string representation) to decimal (integer).

  • return: Number.
integer bindec (string $binary_string)
  • string $binary_string: Binary in string form.
call_user_func (line 283)

Call a user function given by the first parameter.

  • return: Whatever the function returns.
mixed call_user_func (mixed $function, [?mixed $param_a = NULL], [?mixed $param_b = NULL], [?mixed $param_c = NULL])
  • mixed $function: Function callback.
  • ?mixed $param_a: Optional parameter (NULL: none).
  • ?mixed $param_b: Optional parameter (NULL: none).
  • ?mixed $param_c: Optional parameter (NULL: none).
call_user_func_array (line 3928)

Call a user function given with an array of parameters.

  • return: Whatever the function returned.
mixed call_user_func_array (mixed $callback, array $parameters)
  • mixed $callback: Callback.
  • array $parameters: Parameters.
ceil (line 294)

Round fractions up.

  • return: Rounded value.
float ceil (float $function)
  • float $function: Value to round up.
chdir (line 305)

Change directory.

  • return: Success status.
boolean chdir (PATH $directory)
  • PATH $directory: Path to change to.
checkdate (line 318)

Validate a gregorian date.

  • return: Whether the date is valid.
boolean checkdate (integer $month, integer $day, integer $year)
  • integer $month: The month.
  • integer $day: The day.
  • integer $year: The year.
chmod (line 330)

Changes file mode.

  • return: Success status.
boolean chmod (PATH $filename, integer $mode)
  • PATH $filename: The file to change the mode of.
  • integer $mode: The mode (e.g. 0777).
chr (line 341)

Return a specific character.

  • return: A string of length 1, where the first character is as requested.
string chr (integer $ascii)
  • integer $ascii: The ASCII code for the character required.
chunk_split (line 354)

Split a string into smaller chunks. 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 (defaults to "\r\n") every chunklen characters.

  • return: The chunked version of the input string.
string chunk_split (string $body, [integer $chunklen = 76], [string $splitter = "\r\n"])
  • string $body: The input string.
  • integer $chunklen: The maximum chunking length.
  • string $splitter: Split character.
class_exists (line 365)

Checks if the class has been defined.

  • return: Whether the class has been defined.
boolean class_exists (string $class_name)
  • string $class_name: The class identifier.
clearstatcache (line 373)

Clears file status cache.

void clearstatcache ()
closedir (line 382)

Close directory handle.

void closedir (resource $handle)
  • resource $handle: The directory handle to close.
constant (line 392)

Returns the value of a constant.

  • return: The value of the constant.
mixed constant (string $name)
  • string $name: The name of the constant.
copy (line 404)

Copies a file. {{creates-file}}

  • return: Success status.
boolean copy (PATH $source, PATH $dest)
  • PATH $source: The source path.
  • PATH $dest: The destination path.
cos (line 415)

Calculate the cosine of an angle.

  • return: The cosine.
float cos (float $angle)
  • float $angle: The angle in radians.
cosh (line 5465)

Hyperbolic cosine.

  • return: Result.
float cosh (float $arg)
  • float $arg: Argument.
count (line 426)

Count elements in a variable.

  • return: The count.
integer count (array $var)
  • array $var: Variable to count elements of.
count_chars (line 5478)

Return information about characters used in a string.

  • return: Result, depending on mode used.
mixed count_chars (string $string, [integer $mode = 0])
  • string $string: The string which to work within.
  • integer $mode: Operation mode.
crc32 (line 3959)

Calculates the crc32 polynomial of a string.

  • return: The CRC32.
integer crc32 (string $str)
  • string $str: The string to get the CRC32 of.
crypt (line 438)

One-way string hashing (not encryption, as not reversible).

  • return: The hash. The start of the hash determines parameters (encoding, salt).
string crypt (string $string, [?string $salt = NULL])
  • string $string: The string to hash.
  • ?string $salt: The salt (NULL: generate a random salt).
current (line 449)

Return the current element in an array.

  • return: The current element.
mixed current (array $array)
  • array $array: The array.
date (line 461)

Format a local time/date.

  • return: The string representation of the local time/date.
string date (string $format, [?TIME $timestamp = NULL])
  • string $format: The format string.
  • ?TIME $timestamp: The timestamp (NULL: current time).
dbx_connect (line 477)

Open a connection to a database Server.

  • return: The connection (false: error)
~object dbx_connect (string $module, string $server, string $database, string $username, string $password, [BINARY $persistent = 0])
  • string $module: Database type.
  • string $server: The server hostname/IP.
  • string $database: Database name.
  • string $username: The username to connect with.
  • string $password: The password to connect with.
  • BINARY $persistent: Whether to use a persitent connection.
dbx_escape_string (line 489)

Escapes a string for use in a dbx_query.

  • return: Escaped string.
string dbx_escape_string (object The $connection, string $unescaped_string)
  • object The $connection: connection we're escaping for.
  • string $unescaped_string: Unescaped string.
dbx_query (line 502)

Send a database query.

  • return: The result identifier (false: error).
~resource dbx_query (object The $connection, string $query, [integer $flags = 0])
  • object The $connection: connection we're querying over.
  • string $query: The query.
  • integer $flags: OR'd Flags (DBX_RESULT_INDEX, DBX_RESULT_INFO, DBX_RESULT_ASSOC).
decbin (line 3970)

Decimal (integer) to binary (string representation).

  • return: String representation of binary number.
string decbin (integer $number)
  • integer $number: Decimal.
dechex (line 513)

Integer to string representation of hexadecimal.

  • return: The string representation.
string dechex (integer $number)
  • integer $number: The integer ('decimal' form, although truly stored in binary).
decoct (line 524)

Integer to string representation of octal.

  • return: The string representation.
string decoct (integer $number)
  • integer $number: The integer ('decimal' form, although truly stored in binary).
define (line 536)

Defines a named constant.

  • return: Success status.
boolean define (string $name, mixed $value)
  • string $name: Identifier.
  • mixed $value: Value.
defined (line 547)

Checks whether a given named constant exists.

  • return: Whether the constant exists.
boolean defined (string $name)
  • string $name: The identifier of a constant.
deg2rad (line 580)

Converts the number in degrees to the radian equivalent.

  • return: Angle in radians.
float deg2rad (float $number)
  • float $number: Angle in degrees.
dirname (line 558)

Returns directory name component of path.

  • return: The directory name component.
PATH dirname (PATH $name)
  • PATH $name: The path.
disk_free_space (line 569)

Returns the amount of free space under a directory in a unix-style mount/quota-supporting filesystem.

  • return: The amount of space (technically a float, but integer is more conveniant). (false: error)
~integer disk_free_space (PATH $directory)
  • PATH $directory: The path.
disk_total_space (line 5489)

Returns the total size of a directory.

  • return: The size (false: error). (actually, a float)
~integer disk_total_space (PATH $directory)
  • PATH $directory: Where to look.
doubleval (line 5500)

Get float value of a variable.

  • return: Float value.
float doubleval (mixed $var)
  • mixed $var: Probably a string value.
each (line 3981)

Return the current key and value pair from an array and advance the array cursor.

  • return: (key, value) pair.
array each (array $array)
  • array $array: Array we're progressing through.
end (line 4003)

Set the internal pointer of an array to its last element.

  • return: Value of the last element.
mixed end (array $array)
  • array $array: The array.
error_log (line 594)

Send an error message somewhere.

  • return: Success status.
boolean error_log (string $message, [integer $message_type = 0], [string $destination = ''])
  • string $message: The message to log.
  • integer $message_type: The message type (0 is normal PHP logging system, 1 is e-mail address [non-Roadsend], 2 is debugger connection, 3 is file)
  • string $destination: The parameter that defines details of the message type (for type 0, meaningless).
error_reporting (line 605)

Sets which PHP errors are reported.

  • return: Current error reporting level
integer error_reporting ([?integer $level = NULL])
  • ?integer $level: OR'd combination of error type constants. (E_ERROR, E_WARNING, E_PARSE, E_NOTICE, E_CORE_ERROR, E_CORE_WARNING, E_COMPILE_ERROR, E_COMPILE_WARNING, E_USER_ERROR, E_USER_WARNING, E_USER_NOTICE, E_ALL) (NULL: find current level)
exec (line 618)

Execute an external program.

  • return: The stdout output of the program.
string exec (PATH $command, [?array $output = NULL], [?integer $return_val = NULL])
  • PATH $command: The path to the system program to execute.
  • ?array $output: Put output here (technically a reference, but syntax won't let me write it). (NULL: do not get it)
  • ?integer $return_val: Put return code here (technically a reference, but syntax won't let me write it). (NULL: do not get it)
exp (line 4854)

Calculates the exponent of e.

  • return: Result.
float exp (float $arg)
  • float $arg: Arg.
explode (line 640)

Split a string by string.

  • return: The split list.
array explode (string $separator, string $string, [?integer $limit = NULL])
  • string $separator: The separator.
  • string $string: The string to split.
  • ?integer $limit: The maximum number of splits (the last element containing the remainder) (NULL: no limit).
fclose (line 651)

Closes an open file pointer.

  • return: Success status.
boolean fclose (resource $handle)
  • resource $handle: The file pointer.
feof (line 662)

Tests for end-of-file on a file pointer.

  • return: Whether the end of the file has been reached.
boolean feof (resource $handle)
  • resource $handle: The file pointer.
fflush (line 4014)

Flushes the output to a file.

  • return: Success status.
boolean fflush (resource $handle)
  • resource $handle: The file handle to flush.
fgetc (line 5021)

Gets character from file pointer.

  • return: Character. (false: error)
~string fgetc (resource $handle)
  • resource $handle: Handle.
fgetcsv (line 5034)

Gets line from file pointer and parse for CSV fields.

  • return: Line. (false: error)
~array fgetcsv (resource $handle, integer $length, [string $delimiter = ','])
  • resource $handle: File handle.
  • integer $length: Maximum length of line.
  • string $delimiter: Delimiter.
fgets (line 674)

Gets line from file pointer.

  • return: The string read.
string fgets (resource $handle, integer $length)
  • resource $handle: The file pointer.
  • integer $length: The maximum length of the line.
fgetss (line 5047)

Gets line from file pointer and strip HTML tags.

  • return: Line. (false: error)
~string fgetss (resource $handle, integer $length, [string $allowable_tags = ''])
  • resource $handle: File handle.
  • integer $length: Maximum length of line.
  • string $allowable_tags: Allowable HTML tags separated by spaces.
file (line 685)

Reads entire file into an array.

  • return: The array (each line being an entry in the array, and newlines still attached). (false: error)
~array file (PATH $filename)
  • PATH $filename: The file name.
fileatime (line 4025)

Gets last access time of file.

  • return: Timestamp of last access (false: error).
~TIME fileatime (PATH $filename)
  • PATH $filename: The filename.
filectime (line 707)

Gets inode change time of file.

  • return: Timestamp of creation (negativity is blasphemy) (false: error).
~TIME filectime (PATH $filename)
  • PATH $filename: The filename.
filegroup (line 718)

Gets file group.

  • return: The posix group ID (false: error).
~integer filegroup (PATH $filename)
  • PATH $filename: The filename.
filemtime (line 729)

Gets file modification time.

  • return: Timestamp of modification (false: error).
~TIME filemtime (PATH $filename)
  • PATH $filename: The filename.
fileowner (line 740)

Gets file owner.

  • return: The posix user ID (false: error).
~integer fileowner (PATH $filename)
  • PATH $filename: The filename.
fileperms (line 751)

Gets file permissions.

  • return: The permissions (e.g. 0777) (false: error).
~integer fileperms (PATH $filename)
  • PATH $filename: The filename.
filesize (line 762)

Gets file size.

  • return: The file size (false: error).
~integer filesize (PATH $filename)
  • PATH $filename: The filename.
filetype (line 5058)

Gets file type.

  • return: Result (fifo, char, dir, block, link, file, and unknown). (false: error)
~string filetype (PATH $file)
  • PATH $file: Filename.
file_exists (line 696)

Checks whether a file or directory exists.

  • return: Whether it exists.
boolean file_exists (PATH $filename)
  • PATH $filename: The path.
floatval (line 773)

Get float value of a variable.

  • return: The float value.
float floatval (mixed $var)
  • mixed $var: The input.
flock (line 4037)

Portable advisory file locking.

  • return: Success status.
boolean flock (resource $handle, integer $operation)
  • resource $handle: File handle.
  • integer $operation: Operation (LOCK_SH, LOCK_EX, LOCK_UN).
floor (line 784)

Round fractions down.

  • return: The rounded value.
float floor (float $value)
  • float $value: The input.
flush (line 4045)

Flush the output buffer.

void flush ()
fopen (line 826)

Opens file or URL. {{creates-file}}

  • return: The file handle (false: could not be opened).
~resource fopen (PATH $filename, string $mode)
  • PATH $filename: Filename.
  • string $mode: Mode (e.g. at).
fpassthru (line 837)

Output all remaining data on a file pointer.

  • return: The number of characters that got read (false: error).
~integer fpassthru (resource $handle)
  • resource $handle: The file handle.
fread (line 849)

Binary-safe file read.

  • return: The read data.
string fread (resource $handle, integer $length)
  • resource $handle: The file handle.
  • integer $length: Maximum length to read.
fscanf (line 5070)

Parses input from a file according to a format.

  • return: Data.
array fscanf (resource $handle, string $format)
  • resource $handle: File handle.
  • string $format: Formatting string.
fseek (line 862)

Seeks on a file pointer.

  • return: Success status (-1 means error).
integer fseek (resource $handle, integer $offset, [integer $whence = SEEK_SET])
  • resource $handle: The file handle.
  • integer $offset: The offset (meaning depends on whence).
  • integer $whence: SEEK_SET, SEEK_CUR or SEEK_END.
fsockopen (line 877)

Open Internet or Unix domain socket connection.

  • return: The handle (false: error).
~resource fsockopen (string $target, integer $port, integer &$errno, string &$errstr, [?float $timeout = NULL])
  • string $target: The target domain/IP to open.
  • integer $port: The target port to open.
  • integer &$errno: Where any error number will be put.
  • string &$errstr: Whether any error string will be put.
  • ?float $timeout: How long to wait until timeout (NULL: no timeout).
fstat (line 5081)

Gets information about a file using an open file pointer.

  • return: Map of status information.
array fstat (resource $handle)
  • resource $handle: File handle.
ftell (line 888)

Gets file pointer read/write position.

  • return: The offset (false: error)
~integer ftell (resource $handle)
  • resource $handle: The file handle.
ftp_cdup (line 5092)

Changes to the parent directory.

  • return: Success status.
boolean ftp_cdup (resource $ftp_stream)
  • resource $ftp_stream: FTP handle.
ftp_chdir (line 900)

Changes directories on a FTP server.

  • return: Success status.
boolean ftp_chdir (resource $ftp_stream, PATH $dir)
  • resource $ftp_stream: The FTP connection.
  • PATH $dir: The directory to change to.
ftp_close (line 911)

Close an FTP connection.

  • return: Success status.
boolean ftp_close (resource $ftp_stream)
  • resource $ftp_stream: The FTP connection.
ftp_connect (line 924)

Make an FTP connection.

  • return: The FTP connection (false: error).
~resource ftp_connect (string $host, [integer $port = 21], [integer $timeout = 90])
  • string $host: The FTP server to connect to.
  • integer $port: The port on the FTP server that holds the FTP server application.
  • integer $timeout: The timeout after which we give up with an error.
ftp_delete (line 936)

Deletes a file on the FTP server.

  • return: Success status.
boolean ftp_delete (resource $ftp_stream, PATH $filename)
  • resource $ftp_stream: The FTP connection.
  • PATH $filename: The filename.
ftp_fget (line 5106)

Downloads a file from the FTP server and saves to an open file.

  • return: Success status.
boolean ftp_fget (resource $ftp_stream, resource $file_handle, PATH $remote_file, integer $mode)
  • resource $ftp_stream: FTP handle.
  • resource $file_handle: File handle.
  • PATH $remote_file: Remote file.
  • integer $mode: Transfer mode (FTP_ASCII or FTP_BINARY).
ftp_fput (line 950)

Uploads from an open file to the FTP server.

  • return: Success status.
boolean ftp_fput (resource $ftp_stream, PATH $remote_file, resource $handle, integer $mode)
  • resource $ftp_stream: The FTP connection.
  • PATH $remote_file: The remote filename.
  • resource $handle: The open file handle.
  • integer $mode: The file mode for the remote file (e.g. 0777).
ftp_get (line 5120)

Downloads a file from the FTP server.

  • return: Success status.
boolean ftp_get (resource $ftp_stream, PATH $local_file, PATH $remote_file, integer $mode)
  • resource $ftp_stream: FTP handle.
  • PATH $local_file: Local file.
  • PATH $remote_file: Remote file.
  • integer $mode: Transfer mode (FTP_ASCII or FTP_BINARY).
ftp_login (line 963)

Logs in to an FTP connection.

  • return: Success status.
boolean ftp_login (resource $ftp_stream, string $username, string $password)
  • resource $ftp_stream: The FTP connection.
  • string $username: The username.
  • string $password: The password.
ftp_mkdir (line 975)

Creates a directory.

  • return: The directory name (false: error).
~string ftp_mkdir (resource $ftp_stream, PATH $directory)
  • resource $ftp_stream: The FTP connection.
  • PATH $directory: The directory to create.
ftp_nlist (line 987)

Returns a list of files in the given directory.

  • return: The list of files (false: error).
~array ftp_nlist (resource $ftp_stream, PATH $directory)
  • resource $ftp_stream: The FTP connection.
  • PATH $directory: The directory.
ftp_pasv (line 5132)

Turns passive mode on or off.

  • return: Success status.
boolean ftp_pasv (resource $ftp_stream, boolean $pasv)
  • resource $ftp_stream: The link identifier of the FTP connection.
  • boolean $pasv: If TRUE, the passive mode is turned on, else it's turned off.
ftp_put (line 1001)

Uploads a file to the FTP server.

  • return: Success status.
boolean ftp_put (resource $ftp_stream, PATH $remote_file, PATH $local_file, integer $mode)
  • resource $ftp_stream: The FTP connection.
  • PATH $remote_file: The remote filename.
  • PATH $local_file: The local filename.
  • integer $mode: The file mode for the remote file (e.g. 0777).
ftp_pwd (line 5143)

Returns the current directory name.

  • return: Current directory name. (false: error)
~string ftp_pwd (resource $ftp_stream)
  • resource $ftp_stream: The link identifier of the FTP connection.
ftp_rawlist (line 5155)

Returns a detailed list of files in the given directory.

  • return: Each element corresponds to one line of text. (false: error)
~array ftp_rawlist (resource $ftp_stream, PATH $directory)
  • resource $ftp_stream: The link identifier of the FTP connection.
  • PATH $directory: The directory path.
ftp_rename (line 1014)

Renames a file on the FTP server.

  • return: Success status.
boolean ftp_rename (resource $ftp_stream, PATH $from, PATH $to)
  • resource $ftp_stream: The FTP connection.
  • PATH $from: Original path.
  • PATH $to: New path.
ftp_rmdir (line 1026)

Removes a directory on the FTP server.

  • return: Success status.
boolean ftp_rmdir (resource $ftp_stream, PATH $directory)
  • resource $ftp_stream: The FTP connection.
  • PATH $directory: The directory to remove.
ftp_site (line 1038)

Sends a SITE command to the FTP server.

  • return: Success status.
boolean ftp_site (resource $ftp_stream, string $cmd)
  • resource $ftp_stream: The FTP connection.
  • string $cmd: The SITE command.
ftp_size (line 1050)

Find the file size of a file on the FTP server.

  • return: The file size (false: error).
~integer ftp_size (resource $ftp_stream, PATH $cmd)
  • resource $ftp_stream: The FTP connection.
  • PATH $cmd: The file's path.
ftp_systype (line 5166)

Returns the system type identifier of the remote FTP server.

  • return: System type. (false: error)
~string ftp_systype (resource $ftp_stream)
  • resource $ftp_stream: The link identifier of the FTP connection.
ftruncate (line 5178)

Truncates a file to a given length.

  • return: Success status (< PHP4.3, this is a BINARY).
boolean ftruncate (resource $file, integer $size)
  • resource $file: File handle.
  • integer $size: Cut off size.
function_exists (line 1061)

Find whether the function of the given function name has been defined.

  • return: Whether it is defined.
boolean function_exists (string $function_name)
  • string $function_name: The name of the function.
func_get_arg (line 5189)

Return an item from the argument list.

  • return: Argument.
mixed func_get_arg (integer $arg_num)
  • integer $arg_num: Argument number.
func_get_args (line 5199)

Returns an array comprising a function's argument list.

  • return: List of arguments.
array func_get_args ()
func_num_args (line 5209)

Returns the number of arguments passed to the function.

  • return: Number of arguments.
integer func_num_args ()
fwrite (line 1074)

Binary-safe file write.

  • return: The number of bytes written (false: error).
~integer fwrite (resource $handle, string $string, [?integer $length = NULL])
  • resource $handle: The file handle.
  • string $string: The string to write to the file.
  • ?integer $length: The length of data to write (NULL: all of $string).
gd_info (line 1084)

Retrieve information about the currently installed GD library.

  • return: Array of information.
array gd_info ()
getcwd (line 1127)

Gets the current working directory.

  • return: The cwd.
PATH getcwd ()
getdate (line 1138)

Get date/time information.

  • return: The information.
array getdate ([?TIME $timestamp = NULL])
  • ?TIME $timestamp: Timestamp to get information for (NULL: now).
getenv (line 1149)

Gets the value of an environment variable.

  • return: The value (false: error).
~string getenv (string $string)
  • string $string: The environment name to get (e.g. PATH).
gethostbyaddr (line 4065)

Get the Internet host name corresponding to a given IP address.

  • return: Host name OR IP address if failed to look up.
string gethostbyaddr (string $ip_address)
  • string $ip_address: IP address.
gethostbyname (line 4076)

Get the IP address corresponding to a given Internet host name.

  • return: IP address OR host name if failed to look up.
string gethostbyname (string $hostname)
  • string $hostname: Host name.
gethostbynamel (line 5511)

Get a list of IP addresses corresponding to a given Internet host name.

  • return: List of IP addresses (false: could not resolve).
~array gethostbynamel (string $hostname)
  • string $hostname: Hostname.
getimagesize (line 5523)

Get the size of an image.

  • return: List of details: $width, $height, $type, $attr. (false: error)
~array getimagesize (PATH $filename, [?array $image_info = NULL])
  • PATH $filename: Filename.
  • ?array $image_info: Extra details will be put here (NULL: return-only). Note that this is actually passed by reference, but is also optional.
getmypid (line 5543)

Gets PHP's process ID.

  • return: Process ID. (false: error)
~integer getmypid ()
getmyuid (line 5553)

Gets PHP's user ID.

  • return: User ID. (false: error)
~integer getmyuid ()
getrandmax (line 4086)

Get largest possible random value.

  • return: Largest possible random value.
integer getrandmax ()
gettimeofday (line 5563)

Get current time.

  • return: Map of time details.
array gettimeofday ()
gettype (line 4523)

Get the type of a variable.

  • return: The type.
string gettype (mixed $var)
  • mixed $var: The variable.
get_class (line 1095)

Returns the name of the class of an object.

  • return: The class name.
string get_class (object The $obj)
  • object The $obj: object.
get_current_user (line 4054)

Gets the name of the owner of the current PHP script.

  • return: Name.
string get_current_user ()
get_declared_classes (line 804)

Get an array of all declared classes.

  • return: All declared classes.
array get_declared_classes ()
get_defined_functions (line 814)

Get an array of all defined functions.

  • return: All defined functions.
array get_defined_functions ()
get_defined_vars (line 794)

Get an array of all defined variables.

  • return: All defined variables.
array get_defined_vars ()
get_html_translation_table (line 1107)

Returns the translation table used by htmlspecialchars and htmlentities.

  • return: The translation table.
array get_html_translation_table (integer $table, [integer $quote_style = ENT_COMPAT])
  • integer $table: The table to select (HTML_ENTITIES or HTML_SPECIALCHARS).
  • integer $quote_style: The quote style (ENT_QUOTES or ENT_NOQUOTES or ENT_COMPAT).
get_included_files (line 5616)

Returns an array with the names of included or required files.

  • return: Included files.
array get_included_files ()
get_magic_quotes_gpc (line 1117)

Gets the current active configuration setting of magic quotes gpc. (Note: it actually returns a BINARY, but lets make it cleaner, it won't hurt)

  • return: Whether magic quotes gpc is on.
boolean get_magic_quotes_gpc ()
get_magic_quotes_runtime (line 5584)

Gets the current active configuration setting of magic_quotes_runtime.

  • return: Current value (Actually BINARY, but boolean will work).
boolean get_magic_quotes_runtime ()
get_parent_class (line 5606)

Retrieves the parent class name for object or class.

  • return: Classname.
string get_parent_class (object Object $object)
  • object Object $object: to check.
get_resource_type (line 5627)

Returns the resource type.

  • return: The resource type.
string get_resource_type (resource $handle)
  • resource $handle: Resource to check.
gmdate (line 1161)

Format a GMT/UTC date/time (uses different format to 'date' function).

  • return: The formatted string.
string gmdate (string $format, [?TIME $timestamp = NULL])
  • string $format: The 'gm' format string.
  • ?TIME $timestamp: Timestamp to use (NULL: now).
gmmktime (line 4103)

Get UNIX timestamp for a GMT date.

  • return: The timestamp.
integer gmmktime (integer $hour, integer $minute, integer $second, integer $month, integer $day, integer $year, [integer $is_dst = -1])
  • integer $hour: The hour.
  • integer $minute: The minute.
  • integer $second: The second.
  • integer $month: The month.
  • integer $day: The day.
  • integer $year: The year.
  • integer $is_dst: Whether date is in DST (-1 meaning unknown/guess, 0 meaning no, 1 meaning yes).
gmstrftime (line 4115)

Format a GMT/UTC time/date according to locale settings.

  • return: The formatted string.
string gmstrftime (string $format, [?TIME $timestamp = NULL])
  • string $format: The formatting string.
  • ?TIME $timestamp: The timestamp (NULL: now).
gzclose (line 1172)

Close an open gz-file pointer.

  • return: Success status.
boolean gzclose (resource $handle)
  • resource $handle: The handle.
gzcompress (line 5639)

Compress a string.

  • return: Compressed data.
string gzcompress (string $data, integer $level)
  • string $data: Data to compress.
  • integer $level: Compression level.
gzdeflate (line 5651)

Deflate a string.

  • return: Uncompressed data. (false: error)
~string gzdeflate (string $data, integer $level)
  • string $data: Compressed data.
  • integer $level: Compression level.
gzencode (line 5662)

Create a gzip compressed string.

  • return: Out.
string gzencode (string $data)
  • string $data: In.
gzfile (line 5673)

Read entire gz-file into an array.

  • return: An array containing the file, one line per cell. (false: error)
~array gzfile (PATH $filename)
  • PATH $filename: The filename.
gzinflate (line 5685)

Inflate a deflated string.

  • return: Inflated (uncompressed) data.
string gzinflate (string $data, integer $length)
  • string $data: The data compressed by gzdeflate().
  • integer $length: Maximum length to read in.
gzopen (line 1184)

Open gz-file. {{creates-file}}

  • return: The handle (false: error).
~resource gzopen (PATH $filename, string $mode)
  • PATH $filename: The filename.
  • string $mode: The mode (e.g. b).
gzuncompress (line 5697)

Uncompress a compressed string.

  • return: Uncompressed data.
string gzuncompress (string $data, integer $length)
  • string $data: The data compressed by gzcompress().
  • integer $length: Maximum length to read in.
gzwrite (line 1197)

Binary-safe gz-file write.

  • return: The number of bytes written (false: error).
~integer gzwrite (resource $handle, string $string, [?integer $length = NULL])
  • resource $handle: The file handle.
  • string $string: The string to write to the file.
  • ?integer $length: The length of data to write (NULL: full length of input string).
header (line 1208)

Send a raw HTTP header.

void header (string $string, [boolean $replace_last = true])
  • string $string: The header to send.
  • boolean $replace_last: Whether to replace a previous call to set the same header (if you choose to not replace, it will send two different values for the same header).
headers_sent (line 1217)

Checks if or where headers have been sent.

  • return: The answer.
boolean headers_sent ()
hexdec (line 1228)

String representation of hexadecimal to decimal.

  • return: The integer ('decimal' form, although truly stored in binary).
integer hexdec (string $hex_string)
  • string $hex_string: The string representation.
htmlentities (line 1250)

Convert all applicable characters to HTML entities.

  • return: The encoded string.
string htmlentities (string $string, [integer $quote_style = ENT_COMPAT], [string $charset = ''])
  • string $string: The string to encode.
  • integer $quote_style: The quote style (ENT_COMPAT, ENT_QUOTES, ENT_NOQUOTES).
  • string $charset: The character set to use.
hypot (line 5742)

Calculate the length of the hypotenuse of a right-angle triangle.

  • return: Result.
float hypot (float $x, float $y)
  • float $x: X.
  • float $y: Y.
ignore_user_abort (line 5753)

Set whether a client disconnect should abort script execution.

  • return: Previous setting.
boolean ignore_user_abort (boolean $setting)
  • boolean $setting: Setting.
imagealphablending (line 1262)

Set the blending mode for an image.

  • return: Success status.
boolean imagealphablending (resource $image, boolean $blendmode)
  • resource $image: The image handle.
  • boolean $blendmode: Whether to alpha blend.
imagearc (line 1623)

Draw a partial ellipse.

  • return: Success status.
boolean imagearc (resource $image, integer $cx, integer $cy, integer $w, integer $h, integer $s, integer $e, integer $color)
  • resource $image: The image involved.
  • integer $cx: X@top-left.
  • integer $cy: Y@top-left.
  • integer $w: width.
  • integer $h: height.
  • integer $s: start degrees (0 degrees = 3 o clock).
  • integer $e: end degrees (0 degrees = 3 o clock).
  • integer $color: Colour code.
imagechar (line 1720)

Draw a character horizontally.

void imagechar (resource $image, integer $font, integer $x, integer $y, string $c, integer $color)
  • resource $image: The image involved.
  • integer $font: Font number.
  • integer $x: X.
  • integer $y: Y.
  • string $c: What to write.
  • integer $color: Colour number.
imagecharup (line 1900)

Draw a character vertically.

void imagecharup (resource $image, integer $font, integer $x, integer $y, string $c, integer $color)
  • resource $image: The image involved.
  • integer $font: Font number.
  • integer $x: X.
  • integer $y: Y.
  • string $c: What to write.
  • integer $color: Colour number.
imagecolorallocate (line 1276)

Allocate a color for an image.

  • return: Combined colour identifier.
integer imagecolorallocate (resource $image, integer $red, integer $green, integer $blue)
  • resource $image: The image handle.
  • integer $red: Red component (0-255).
  • integer $green: Green component (0-255).
  • integer $blue: Blue component (0-255).
imagecolorat (line 1412)

Get the index of the color of a pixel.

  • return: The colour.
integer imagecolorat (resource $image, integer $x, integer $y)
  • resource $image: The image handle.
  • integer $x: X ordinate.
  • integer $y: Y ordinate.
imagecolorclosest (line 1913)

Get the index of the closest color to the specified color.

  • return: Colour number.
integer imagecolorclosest (resource $image, integer $red, integer $green, integer $blue)
  • resource $image: The image involved.
  • integer $red: Red.
  • integer $green: Green.
  • integer $blue: Blue.
imagecolorclosestalpha (line 1928)

Get the index of the closest color to the specified color + alpha.

  • return: Colour number.
integer imagecolorclosestalpha (resource $image, integer $red, integer $green, integer $blue, integer $alpha)
  • resource $image: The image involved.
  • integer $red: Red.
  • integer $green: Green.
  • integer $blue: Blue.
  • integer $alpha: Alpha.
imagecolorclosesthwb (line 1942)

Get the index of the color which has the hue, white and blackness nearest to the given color .

  • return: Colour number.
integer imagecolorclosesthwb (resource $image, integer $red, integer $green, integer $blue)
  • resource $image: The image involved.
  • integer $red: Red.
  • integer $green: Green.
  • integer $blue: Blue.
imagecolordeallocate (line 1954)

De-allocate a color for an image.

  • return: Success status.
boolean imagecolordeallocate (resource $image, integer $colour)
  • resource $image: The image involved.
  • integer $colour: Colour number.
imagecolorexact (line 1968)

Get the index of the specified color.

  • return: Colour number.
integer imagecolorexact (resource $image, integer $red, integer $green, integer $blue)
  • resource $image: The image involved.
  • integer $red: Red.
  • integer $green: Green.
  • integer $blue: Blue.
imagecolorexactalpha (line 1983)

Get the index of the specified color + alpha.

  • return: Colour number (false: error).
~integer imagecolorexactalpha (resource $image, integer $red, integer $green, integer $blue, integer $alpha)
  • resource $image: The image involved.
  • integer $red: Red.
  • integer $green: Green.
  • integer $blue: Blue.
  • integer $alpha: Alpha.
imagecolorresolve (line 1997)

Get the index of the specified color or its closest possible alternative.

  • return: Colour number.
integer imagecolorresolve (resource $image, integer $red, integer $green, integer $blue)
  • resource $image: The image involved.
  • integer $red: Red.
  • integer $green: Green.
  • integer $blue: Blue.
imagecolorresolvealpha (line 2012)

Get the index of the specified color + alpha or its closest possible alternative.

  • return: Colour number (false: error).
~integer imagecolorresolvealpha (resource $image, integer $red, integer $green, integer $blue, integer $alpha)
  • resource $image: The image involved.
  • integer $red: Red.
  • integer $green: Green.
  • integer $blue: Blue.
  • integer $alpha: Alpha.
imagecolorset (line 2025)

Set the color for the specified palette index.

void imagecolorset (resource $image, integer $red, integer $green, integer $blue)
  • resource $image: The image involved.
  • integer $red: Red.
  • integer $green: Green.
  • integer $blue: Blue.
imagecolorsforindex (line 1424)

Get the colors for an index.

  • return: Map of components.
array imagecolorsforindex (resource $image, integer $color)
  • resource $image: The image handle.
  • integer $color: The colour.
imagecolorstotal (line 2035)

Find out the number of colors in an image's palette.

  • return: Total number of colours.
integer imagecolorstotal (resource $image)
  • resource $image: The image involved.
imagecolortransparent (line 1288)

Define a color as transparent.

  • return: Transparency colour identifier.
integer imagecolortransparent (resource $image, [?integer $color = NULL])
  • resource $image: The image handle.
  • ?integer $color: Transparency colour identifier (NULL: get it, don't set it).
imagecopy (line 1305)

Copy part of an image.

void imagecopy (resource $dst_im, resource $src_im, integer $dst_x, integer $dst_y, integer $src_x, integer $src_y, integer $src_w, integer $src_h)
  • resource $dst_im: Destination image handle.
  • resource $src_im: Source image handle.
  • integer $dst_x: Destination X-ordinate.
  • integer $dst_y: Destination Y-ordinate.
  • integer $src_x: Source X-ordinate.
  • integer $src_y: Source Y-ordinate.
  • integer $src_w: Width to copy.
  • integer $src_h: Height to copy.
imagecopymerge (line 2053)

Copy and merge part of an image.

void imagecopymerge (resource $dst_im, resource $src_im, integer $dst_x, integer $dst_y, integer $src_x, integer $src_y, integer $src_w, integer $src_h, integer $pct)
  • resource $dst_im: Destination image handle.
  • resource $src_im: Source image handle.
  • integer $dst_x: Destination X-ordinate.
  • integer $dst_y: Destination Y-ordinate.
  • integer $src_x: Source X-ordinate.
  • integer $src_y: Source Y-ordinate.
  • integer $src_w: Width to copy.
  • integer $src_h: Height to copy.
  • integer $pct: Opacity value.
imagecopymergegray (line 1660)

Copy and merge part of an image with gray scale.

void imagecopymergegray (resource $dst_im, resource $src_im, integer $dst_x, integer $dst_y, integer $src_x, integer $src_y, integer $src_w, integer $src_h, integer $pct)
  • resource $dst_im: Destination image handle.
  • resource $src_im: Source image handle.
  • integer $dst_x: Destination X-ordinate.
  • integer $dst_y: Destination Y-ordinate.
  • integer $src_x: Source X-ordinate.
  • integer $src_y: Source Y-ordinate.
  • integer $src_w: Width to copy.
  • integer $src_h: Height to copy.
  • integer $pct: Opacity value.
imagecopyresampled (line 1324)

Copy and resize part of an image with resampling.

  • return: Success status.
boolean imagecopyresampled (resource $dst_im, resource $src_im, integer $dst_x, integer $dst_y, integer $src_x, integer $src_y, integer $dst_w, integer $dst_h, integer $src_w, integer $src_h)
  • resource $dst_im: Destination image handle.
  • resource $src_im: Source image handle.
  • integer $dst_x: Destination X-ordinate.
  • integer $dst_y: Destination Y-ordinate.
  • integer $src_x: Source X-ordinate.
  • integer $src_y: Source Y-ordinate.
  • integer $dst_w: Destination width.
  • integer $dst_h: Destination height.
  • integer $src_w: Source width.
  • integer $src_h: Source height.
imagecopyresized (line 1343)

Copy and resize part of an image.

void imagecopyresized (resource $dst_im, resource $src_im, integer $dst_x, integer $dst_y, integer $src_x, integer $src_y, integer $dst_w, integer $dst_h, integer $src_w, integer $src_h)
  • resource $dst_im: Destination image handle.
  • resource $src_im: Source image handle.
  • integer $dst_x: Destination X-ordinate.
  • integer $dst_y: Destination Y-ordinate.
  • integer $src_x: Source X-ordinate.
  • integer $src_y: Source Y-ordinate.
  • integer $dst_w: Destination width.
  • integer $dst_h: Destination height.
  • integer $src_w: Source width.
  • integer $src_h: Source height.
imagecreate (line 1354)

Create a new palette based image.

  • return: The image handle.
resource imagecreate (integer $width, integer $height)
  • integer $width: Width.
  • integer $height: Height.
imagecreatefromjpeg (line 1387)

Create a new image from a JPEG file on disk.

  • return: The image handle (false: error).
~resource imagecreatefromjpeg (PATH $path)
  • PATH $path: The JPEG file.
imagecreatefrompng (line 1376)

Create a new image from a PNG file on disk.

  • return: The image handle (false: error).
~resource imagecreatefrompng (PATH $path)
  • PATH $path: The PNG file.
imagecreatefromstring (line 1365)

Create a new image from the image stream in the string.

  • return: The image handle (false: error).
~resource imagecreatefromstring (string $image)
  • string $image: The image.
imagecreatetruecolor (line 1399)

Create a new true color image.

  • return: The image handle.
resource imagecreatetruecolor (integer $x, integer $y)
  • integer $x: Width.
  • integer $y: Height.
imagedestroy (line 1434)

Destroy an image resource.

void imagedestroy (resource $image)
  • resource $image: The image handle.
imageellipse (line 1689)

Draw an ellipse.

  • return: Success status.
boolean imageellipse (resource $image, integer $cx, integer $cy, integer $w, integer $h, integer $color)
  • resource $image: The image involved.
  • integer $cx: Centre-X.
  • integer $cy: Centre-Y.
  • integer $w: Width.
  • integer $h: Height.
  • integer $color: Colour.
imagefill (line 1446)

Flood fill.

void imagefill (resource $image, integer $x, integer $y, integer $colour)
  • resource $image: The image handle.
  • integer $x: Start from X.
  • integer $y: Start from Y.
  • integer $colour: The colour code to use.
imagefilledarc (line 1642)

Draw a partial ellipse and fill it.

  • return: Success status.
boolean imagefilledarc (resource $image, integer $cx, integer $cy, integer $w, integer $h, integer $s, integer $e, integer $color, integer $style)
  • resource $image: The image involved.
  • integer $cx: X@top-left.
  • integer $cy: Y@top-left.
  • integer $w: width.
  • integer $h: height.
  • integer $s: start degrees (0 degrees = 3 o clock).
  • integer $e: end degrees (0 degrees = 3 o clock).
  • integer $color: Style, bitwise of IMG_ARC_PIE, IMG_ARC_CHORD, IMG_ARC_NOFILL, IMG_ARC_EDGED.
  • integer $style: Colour code.
imagefilledellipse (line 1705)

Draw a filled ellipse.

  • return: Success status.
boolean imagefilledellipse (resource $image, integer $cx, integer $cy, integer $w, integer $h, integer $color)
  • resource $image: The image involved.
  • integer $cx: Centre-X.
  • integer $cy: Centre-Y.
  • integer $w: Width.
  • integer $h: Height.
  • integer $color: Colour.
imagefilledpolygon (line 1732)

Draw a filled polygon.

void imagefilledpolygon (resource $image, array $points, integer $num_points, integer $colour)
  • resource $image: The image involved.
  • array $points: Array of pairs.
  • integer $num_points: Number of points in array.
  • integer $colour: Colour number.
imagefilledrectangle (line 1758)

Draw a filled rectangle.

void imagefilledrectangle (resource $image, integer $x1, integer $y1, integer $x2, integer $y2, integer $col)
  • resource $image: The image involved.
  • integer $x1: First-X.
  • integer $y1: First-Y.
  • integer $x2: Second-X.
  • integer $y2: Second-Y.
  • integer $col: Colour number.
imagefilltoborder (line 1785)

Flood fill to specific color.

void imagefilltoborder (resource $image, integer $x, integer $y, integer $border, integer $color)
  • resource $image: The image involved.
  • integer $x: Origin X.
  • integer $y: Origin Y.
  • integer $border: Border colour number.
  • integer $color: Fill colour number.
imagefontheight (line 1456)

Get font height.

  • return: Height.
integer imagefontheight (integer $font)
  • integer $font: Font code.
imagefontwidth (line 1467)

Get font width.

  • return: Width.
integer imagefontwidth (integer $font)
  • integer $font: Font code.
imagegammacorrect (line 1796)

Apply a gamma correction to a GD image.

void imagegammacorrect (resource $image, float $in, float $out)
  • resource $image: The image involved.
  • float $in: Input gamma.
  • float $out: Output gamma.
imageinterlace (line 1807)

Enable or disable interlace / progressive-save.

  • return: Whether interlace is set.
boolean imageinterlace (resource $image, BINARY $interlace)
  • resource $image: The image involved.
  • BINARY $interlace: On/Off.
imagejpeg (line 1479)

Output image to browser or file as JPEG.

  • return: Success status.
boolean imagejpeg (resource $image, [?string $filename = NULL])
  • resource $image: The image handle.
  • ?string $filename: The filename (NULL: output to browser).
imageline (line 1674)

Draw a line.

void imageline (resource $image, integer $x1, integer $y1, integer $x2, integer $y2, integer $color)
  • resource $image: The image involved.
  • integer $x1: Start-X.
  • integer $y1: Start-Y.
  • integer $x2: End-X.
  • integer $y2: End-Y.
  • integer $color: The colour.
imageloadfont (line 1818)

Load a new font.

  • return: Font code (false: error).
~integer imageloadfont (PATH $file)
  • PATH $file: File.
imagepalettecopy (line 1829)

Copy the palette from one image to another.

void imagepalettecopy (resource $destination, resource $source)
  • resource $destination: The image the palette is from.
  • resource $source: The image the palette is to.
imagepng (line 1491)

Output image to browser or file as PNG.

  • return: Success status.
boolean imagepng (resource $image, [?string $filename = NULL])
  • resource $image: The image handle.
  • ?string $filename: The filename (NULL: output to browser).
imagepolygon (line 1744)

Draw a polygon.

void imagepolygon (resource $image, array $points, integer $num_points, integer $colour)
  • resource $image: The image involved.
  • array $points: Array of pairs.
  • integer $num_points: Number of points in array.
  • integer $colour: Colour number.
imagerectangle (line 1772)

Draw a rectangle.

void imagerectangle (resource $image, integer $x1, integer $y1, integer $x2, integer $y2, integer $col)
  • resource $image: The image involved.
  • integer $x1: First-X.
  • integer $y1: First-Y.
  • integer $x2: Second-X.
  • integer $y2: Second-Y.
  • integer $col: Colour number.
imagesavealpha (line 1502)

Set the flag to save full alpha channel information (as opposed to single-color transparency) when saving PNG images.

void imagesavealpha (resource $image, boolean $saveflag)
  • resource $image: The image handle.
  • boolean $saveflag: Whether to save alpha channel information.
imagesetbrush (line 1840)

Set the brush image for line drawing.

  • return: Success status.
boolean imagesetbrush (resource $image, resource $brush)
  • resource $image: The image involved.
  • resource $brush: The brush image.
imagesetpixel (line 1514)

Set a single pixel.

void imagesetpixel (resource $image, integer $x, integer $y, integer $color)
  • resource $image: The image handle.
  • integer $x: X-ordinate.
  • integer $y: Y-ordinate.
  • integer $color: Colour code.
imagesetstyle (line 1851)

Set the style for line drawing.

void imagesetstyle (resource $image, integer $style)
  • resource $image: The image involved.
  • integer $style: Style number (IMG_COLOR_STYLED or IMG_COLOR_STYLEDBRUSHED).
imagesetthickness (line 1862)

Set the thickness for line drawing.

  • return: Success status.
boolean imagesetthickness (resource $image, integer $thickness)
  • resource $image: The image involved.
  • integer $thickness: Thickness in pixels.
imagesettile (line 1874)

Set the tile image for filling.

  • return: Success status.
boolean imagesettile (resource $image, resource $tile)
  • resource $image: The image involved.
  • resource $tile: The tile image.
imagestring (line 1528)

Draw a string horizontally.

void imagestring (resource $image, integer $font, integer $x, integer $y, string $s, integer $col)
  • resource $image: The image handle.
  • integer $font: Font code.
  • integer $x: X-ordinate.
  • integer $y: Y-ordinate.
  • string $s: Text to draw.
  • integer $col: Colour code.
imagestringup (line 1564)

Give the bounding box of a text using TrueType fonts.

void imagestringup (resource $image, integer $font, integer $x, integer $y, string $s, integer $col)
  • resource $image: The image handle.
  • integer $font: The loaded font.
  • integer $x: X-ordinate.
  • integer $y: Y-ordinate.
  • string $s: Text to draw.
  • integer $col: Colour code.
imagesx (line 1538)

Get image width.

  • return: The image width.
integer imagesx (resource $image)
  • resource $image: The image handle.
imagesy (line 1549)

Get image height.

  • return: The image height.
integer imagesy (resource $image)
  • resource $image: The image handle.
imagetruecolortopalette (line 1886)

Convert a true color image to a palette image.

void imagetruecolortopalette (resource $image, boolean $dither, integer $ncolors)
  • resource $image: The image involved.
  • boolean $dither: Whether to use dithering.
  • integer $ncolors: The maximum number of colors that should be retained in the palette.
imagettfbbox (line 1577)

Give the bounding box of a text using TrueType fonts.

  • return: Tuple: lower-left-X, lower-left-Y, lower-right-X, lower-right-Y, upper-right-X, upper-right-Y, upper-left-X, upper-left-Y. (false: error)
~array imagettfbbox (float $size, float $angle, string $fontfile, string $text)
  • float $size: The font size in pixels.
  • float $angle: Angle in degrees in which text will be measured.
  • string $fontfile: The name of the TrueType font file.
  • string $text: The string to be measured.
imagettftext (line 1595)

Give the bounding box of a text using TrueType fonts.

  • return: Tuple: lower-left-X, lower-left-Y, lower-right-X, lower-right-Y, upper-right-X, upper-right-Y, upper-left-X, upper-left-Y. (false: error)
~array imagettftext (resource $handle, float $size, float $angle, integer $x, integer $y, integer $colour, string $fontfile, string $text)
  • resource $handle: The image handle.
  • float $size: The font size in pixels.
  • float $angle: Angle in degrees in which text will be measured.
  • integer $x: X-ordinate.
  • integer $y: Y-ordinate.
  • integer $colour: Colour code.
  • string $fontfile: The name of the TrueType font file.
  • string $text: Text to draw.
imagetypes (line 1605)

Return the image types supported by this execution environment.

  • return: Bit field of constants: IMG_GIF | IMG_JPG | IMG_PNG | IMG_WBMP.
integer imagetypes ()
implode (line 2064)

Join array elements with a string.

  • return: The joined string.
string implode (string $glue, array $pieces)
  • string $glue: The glue component (becomes a deliminator).
  • array $pieces: The pieces to join.
ini_get (line 2109)

Gets the value of a configuration option. Note: On Phalanger any unknown config options will produce a warning if fetched.

  • return: Value of option. (empty: no such config option, or an empty value) (false: ditto)
mixed ini_get (string $varname)
  • string $varname: Config option.
ini_set (line 2121)

Sets the value of a configuration option.

  • return: Old value of option (false: error).
~string ini_set (string $var, string $value)
  • string $var: Config option.
  • string $value: New value of option.
intval (line 2133)

Get integer value of a variable.

  • return: The integer, extracted.
integer intval (mixed $var, [integer $base = 10])
  • mixed $var: Integer, but in some other form (usually string).
  • integer $base: The base.
in_array (line 2076)

Checks if a value exists in an array.

  • return: Whether the value exists in the array.
boolean in_array (mixed $needle, array $haystack)
  • mixed $needle: Needle.
  • array $haystack: Haystack.
ip2long (line 4126)

Converts a string containing an (IPv4) Internet Protocol dotted address into a proper address.

  • return: The long form (false: cannot perform conversion).
~integer ip2long (string $ip_address)
  • string $ip_address: The IP address.
is_a (line 2145)

Whether the object is of this class or has this class as one of its parents.

  • return: Whether it is.
boolean is_a (object The $object, string $class_name)
  • object The $object: object.
  • string $class_name: The class name.
is_array (line 2156)

Finds whether a variable is an array.

  • return: Whether it is.
boolean is_array (mixed $var)
  • mixed $var: What to check.
is_bool (line 2167)

Finds whether a variable is a boolean.

  • return: Whether it is.
boolean is_bool (mixed $var)
  • mixed $var: What to check.
is_callable (line 2233)

Finds whether a variable holds a callable function reference.

  • return: Whether it does.
boolean is_callable (mixed $var)
  • mixed $var: What to check.
is_dir (line 2178)

Finds whether a path is to a directory.

  • return: Whether it is.
boolean is_dir (PATH $path)
  • PATH $path: The path to check.
is_executable (line 5279)

Tells whether the filename is executable.

  • return: Whether it is.
boolean is_executable (PATH $filename)
  • PATH $filename: Filename.
is_file (line 2189)

Finds whether a path is to a file.

  • return: Whether it is.
boolean is_file (PATH $path)
  • PATH $path: The path to check.
is_float (line 2211)

Finds whether a variable is a float.

  • return: Whether it is.
boolean is_float (mixed $var)
  • mixed $var: What to check.
is_integer (line 2222)

Finds whether a variable is an integer.

  • return: Whether it is.
boolean is_integer (mixed $var)
  • mixed $var: What to check.
is_link (line 2200)

Finds whether a path is to a symbolic link.

  • return: Whether it is.
boolean is_link (PATH $path)
  • PATH $path: The path to check.
is_null (line 2244)

Finds whether a variable is null.

  • return: Whether it is.
boolean is_null (mixed $var)
  • mixed $var: What to check.
is_numeric (line 2255)

Finds whether a variable is numeric (e.g. a numeric string, or a pure integer).

  • return: Whether it is.
boolean is_numeric (mixed $var)
  • mixed $var: What to check.
is_object (line 2266)

Finds whether a variable is an object.

  • return: Whether it is.
boolean is_object (mixed $var)
  • mixed $var: What to check.
is_readable (line 2277)

Finds whether a path is to an actual readable file.

  • return: Whether it is.
boolean is_readable (PATH $path)
  • PATH $path: The path to check.
is_resource (line 2288)

Finds whether a variable is a resource.

  • return: Whether it is.
boolean is_resource (mixed $var)
  • mixed $var: What to check.
is_scalar (line 5290)

Finds whether a variable is a scalar (integer, float, string or boolean).

  • return: Whether it is.
boolean is_scalar (mixed $var)
  • mixed $var: Variable.
is_string (line 2299)

Finds whether a variable is a string.

  • return: Whether it is.
boolean is_string (mixed $var)
  • mixed $var: What to check.
is_subclass_of (line 5302)

Find whether the object has this class as one of its parents.

  • return: Whether it is.
boolean is_subclass_of (mixed $object, string $class_name)
  • mixed $object: Object to check whether is an instance.
  • string $class_name: Class name to check against.
is_uploaded_file (line 2310)

Finds whether a path is to an actual uploaded file.

  • return: Whether it is.
boolean is_uploaded_file (PATH $path)
  • PATH $path: The path to check.
is_writable (line 2321)

Finds whether a path is to an actual writeable file.

  • return: Whether it is.
boolean is_writable (PATH $path)
  • PATH $path: The path to check.
key (line 4137)

Fetch a key from an associative array.

  • return: The index element of the current array position.
mixed key (array $array)
  • array $array: The array.
krsort (line 2342)

Sort an array by key in reverse order.

void krsort (array &$array)
  • array &$array: The array to sort.
ksort (line 2351)

Sort an array by key.

void ksort (array &$array)
  • array &$array: The array to sort.
lcg_value (line 4875)

Combined linear congruential generator.

  • return: Random number.
float lcg_value ()
localtime (line 4887)

Get the local time.

  • return: Components.
array localtime (?TIME $timestamp, [boolean $associative = false])
  • ?TIME $timestamp: Timestamp (NULL: now).
  • boolean $associative: If set to FALSE or not supplied than the array is returned as a regular, numerically indexed array. If the argument is set to TRUE then localtime() is an associative array containing all the different elements of the structure returned by the C function call to localtime.
log (line 4160)

Natural logarithm.

  • return: Log of given number.
float log (float $arg)
  • float $arg: Number to find log of.
log10 (line 4171)

Base-10 logarithm.

  • return: Log of given number.
float log10 (float $arg)
  • float $arg: Number to find log of.
long2ip (line 4182)

Converts an (IPv4) Internet network address into a string in Internet standard dotted format.

  • return: The long form.
integer long2ip (string $proper_address)
  • string $proper_address: The IP address.
ltrim (line 2372)

Strip whitespace from the beginning of a string.

  • return: The trimmed string.
string ltrim (string $string, [string $characters = &quot; \t\n\r\0\x0B&quot;])
  • string $string: The string to trim from.
  • string $characters: Characters to trim.
mail (line 2387)

Send an e-mail.

  • return: Success status.
boolean mail (string $to, string $subject, string $message, [string $additional_headers = ''], [string $additional_flags = ''])
  • string $to: The TO address.
  • string $subject: The subject.
  • string $message: The message.
  • string $additional_headers: Additional headers.
  • string $additional_flags: Additional stuff to send to sendmail executable (if appropriate, only works when safe mode is off).
max (line 2407)

Find highest value between arguments.

  • return: The highest valued argument.
mixed max (mixed $arg1, [?mixed $arg2 = NULL], [?mixed $arg3 = NULL], [?mixed $arg4 = NULL], [?mixed $arg5 = NULL], [?mixed $arg6 = NULL], [?mixed $arg7 = NULL], [?mixed $arg8 = NULL], [?mixed $arg9 = NULL], [?mixed $arg10 = NULL])
  • mixed $arg1: First argument (if array, then each treated as a separate parameter).
  • ?mixed $arg2: Second argument (NULL: no second argument) (if array, then each treated as a separate parameter).
  • ?mixed $arg3: Third argument (NULL: no third argument) (if array, then each treated as a separate parameter).
  • ?mixed $arg4: Fourth argument (NULL: no fourth argument) (if array, then each treated as a separate parameter).
  • ?mixed $arg5: Fifth argument (NULL: no fith argument) (if array, then each treated as a separate parameter).
  • ?mixed $arg6: Sixth argument (NULL: no sixth argument) (if array, then each treated as a separate parameter).
  • ?mixed $arg7: Seventh argument (NULL: no seventh argument) (if array, then each treated as a separate parameter).
  • ?mixed $arg8: Eighth argument (NULL: no eighth argument) (if array, then each treated as a separate parameter).
  • ?mixed $arg9: Ninth argument (NULL: no ninth argument) (if array, then each treated as a separate parameter).
  • ?mixed $arg10: Tenth argument (NULL: no tenth argument) (if array, then each treated as a separate parameter).
md5 (line 2418)

Calculate the md5 hash of a string.

  • return: Hashed result.
string md5 (string $str)
  • string $str: String to hash.
method_exists (line 2430)

Checks if the class method exists.

  • return: Whether the class method exists.
boolean method_exists (object Object $object, string $method_name)
  • object Object $object: of the class we want to check.
  • string $method_name: The method name.
microtime (line 2441)

Return current UNIX timestamp with microseconds.

  • return: Micro-time.
string microtime (boolean $as_float)
  • boolean $as_float: Whether to return a float result. ALWAYS PASS THIS IN AS *FALSE* - FOR COMPATIBILITY WITH OLD VERSIONS OF PHP THAT DO NOT HAVE IT, WHILST PHP 6 DEFAULTS IT TO TRUE.
min (line 2462)

Find lowest value between arguments.

  • return: The lowest valued argument.
mixed min (mixed $arg1, [?mixed $arg2 = NULL], [?mixed $arg3 = NULL], [?mixed $arg4 = NULL], [?mixed $arg5 = NULL], [?mixed $arg6 = NULL], [?mixed $arg7 = NULL], [?mixed $arg8 = NULL], [?mixed $arg9 = NULL], [?mixed $arg10 = NULL])
  • mixed $arg1: First argument (if array, then each treated as a separate parameter).
  • ?mixed $arg2: Second argument (NULL: no second argument) (if array, then each treated as a separate parameter).
  • ?mixed $arg3: Third argument (NULL: no third argument) (if array, then each treated as a separate parameter).
  • ?mixed $arg4: Fourth argument (NULL: no fourth argument) (if array, then each treated as a separate parameter).
  • ?mixed $arg5: Fifth argument (NULL: no fith argument) (if array, then each treated as a separate parameter).
  • ?mixed $arg6: Sixth argument (NULL: no sixth argument) (if array, then each treated as a separate parameter).
  • ?mixed $arg7: Seventh argument (NULL: no seventh argument) (if array, then each treated as a separate parameter).
  • ?mixed $arg8: Eighth argument (NULL: no eighth argument) (if array, then each treated as a separate parameter).
  • ?mixed $arg9: Ninth argument (NULL: no ninth argument) (if array, then each treated as a separate parameter).
  • ?mixed $arg10: Tenth argument (NULL: no tenth argument) (if array, then each treated as a separate parameter).
mkdir (line 2474)

Makes a directory. {{creates-file}}

  • return: Success status.
boolean mkdir (PATH $path, integer $mode)
  • PATH $path: The path to the directory to make.
  • integer $mode: The mode (e.g. 0777).
mktime (line 2491)

Get UNIX timestamp for a componentialised date.

  • return: The timestamp.
TIME mktime (integer $hour, integer $minute, integer $second, [?integer $month = NULL], [?integer $day = NULL], [?integer $year = NULL], [integer $is_dst = -1])
  • integer $hour: The hour.
  • integer $minute: The minute.
  • integer $second: The second.
  • ?integer $month: The month (NULL: now).
  • ?integer $day: The day (NULL: now).
  • ?integer $year: The year (NULL: now).
  • integer $is_dst: Whether date is in DST (-1 meaning unknown/guess, 0 meaning no, 1 meaning yes).
move_uploaded_file (line 2503)

Moves an uploaded file to a new location. {{creates-file}}

  • return: The success status.
boolean move_uploaded_file (PATH $filename, PATH $destination)
  • PATH $filename: Filename to move (taken from tmpname element of $_FILES list entry).
  • PATH $destination: Path to move file to (preferably containing filename component).
mt_getrandmax (line 2513)

Get largest possible random value.

  • return: The value.
integer mt_getrandmax ()
mt_rand (line 2525)

Generate a better random value.

  • return: Random value.
integer mt_rand (integer $min, integer $max)
  • integer $min: Minimum value.
  • integer $max: Maximum value.
mt_srand (line 2535)

Seed the better random number generator.

void mt_srand (integer $seed)
  • integer $seed: The seed.
natcasesort (line 5325)

Sort an array using a case insensitive "natural order" algorithm .

  • return: Success status.
boolean natcasesort (array &$array)
  • array &$array: Array to sort.
natsort (line 5336)

Sort an array using a "natural order" algorithm.

  • return: Success status.
boolean natsort (array &$array)
  • array &$array: Array to sort.
next (line 4216)

Advance the internal array pointer of an array.

  • return: The array value we're now pointing at.
mixed next (array $array)
  • array $array: The array.
nl2br (line 5347)

Inserts HTML line breaks before all newlines in a string.

  • return: Out.
string nl2br (string $in)
  • string $in: In.
number_format (line 2548)

Format a number with grouped thousands.

  • return: The string formatted number.
string number_format (mixed $number, [integer $decimals = 0], [string $dec_point = '.'], [string $thousands_sep = ','])
  • mixed $number: The number to format [integer or float] (technically always float because it could be larger than an integer, but that's ugly).
  • integer $decimals: The number of decimal fraction digits to show.
  • string $dec_point: The string to use as a decimal point.
  • string $thousands_sep: The string to separate groups of 1000's with.
ob_end_clean (line 2558)

Clean (erase) the output buffer and turn off output buffering.

  • return: Success status (could fail if there is no buffer).
boolean ob_end_clean ()
ob_end_flush (line 2568)

Flush (output and erase) the output buffer and turn off output buffering.

  • return: Success status (could fail if there is no buffer).
boolean ob_end_flush ()
ob_get_contents (line 2578)

Return the contents of the output buffer .

  • return: The buffer contents (false: no buffer).
~string ob_get_contents ()
ob_get_length (line 5357)

Return the length of the output buffer.

  • return: Output buffer length. (false: error)
~integer ob_get_length ()
ob_gzhandler (line 5369)

ob_start callback function to gzip output buffer.

  • return: Filtered version.
string ob_gzhandler (string $buffer, integer $mode)
  • string $buffer: Input string.
  • integer $mode: Irrelevant (we don't use this function directly anyway).
ob_iconv_handler (line 5381)

Convert character encoding as output buffer handler.

  • return: Filtered version.
string ob_iconv_handler (string $buffer, integer $mode)
  • string $buffer: Input string.
  • integer $mode: Irrelevant (we don't use this function directly anyway).
ob_implicit_flush (line 5391)

Turn implicit flush on/off .

void ob_implicit_flush (integer $flag)
  • integer $flag: Flag (1 for on, 0 for off).
ob_start (line 2588)

Turn on output buffering.

  • return: Success status.
boolean ob_start ()
ocp_is_escaped (line 5921)

XSS detection helper function.

  • return: Whether string is escaped.
boolean ocp_is_escaped (string $var)
  • string $var: String to test for being escaped.
ocp_mark_as_escaped (line 5911)

XSS detection helper function.

void ocp_mark_as_escaped (string &$var)
  • string &$var: String to mark as escaped.
octdec (line 2610)

String representation of octal to decimal.

  • return: The integer ('decimal' form, although truly stored in binary).
integer octdec (string $octal_string)
  • string $octal_string: The string representation.
opendir (line 2621)

Open a directory for analysis.

  • return: The directory handle (false: error).
~resource opendir (PATH $path)
  • PATH $path: The path to the directory to open.
ord (line 2632)

Return ASCII value of character.

  • return: The ASCII value.
integer ord (string $string)
  • string $string: String of length 1, containing character to find ASCII value of.
pack (line 2673)

Pack data into binary string.

  • return: The binary string.
string pack (string $format, [?mixed $arg1 = NULL], [?mixed $arg2 = NULL], [?mixed $arg3 = NULL], [?mixed $arg4 = NULL], [?mixed $arg5 = NULL], [?mixed $arg6 = NULL], [?mixed $arg7 = NULL], [?mixed $arg8 = NULL], [?mixed $arg9 = NULL], [?mixed $arg10 = NULL], [?mixed $arg11 = NULL], [?mixed $arg12 = NULL], [?mixed $arg13 = NULL], [?mixed $arg14 = NULL], [?mixed $arg15 = NULL], [?mixed $arg16 = NULL], [?mixed $arg17 = NULL], [?mixed $arg18 = NULL], [?mixed $arg19 = NULL], [?mixed $arg20 = NULL], [?mixed $arg21 = NULL], [?mixed $arg22 = NULL], [?mixed $arg23 = NULL], [?mixed $arg24 = NULL], [?mixed $arg25 = NULL], [?mixed $arg26 = NULL], [?mixed $arg27 = NULL], [?mixed $arg28 = NULL], [?mixed $arg29 = NULL], [?mixed $arg30 = NULL])
  • string $format: The formatting string.
  • ?mixed $arg1: Argument that binds to the formatting string (NULL: none).
  • ?mixed $arg2: Argument that binds to the formatting string (NULL: none).
  • ?mixed $arg3: Argument that binds to the formatting string (NULL: none).
  • ?mixed $arg4: Argument that binds to the formatting string (NULL: none).
  • ?mixed $arg5: Argument that binds to the formatting string (NULL: none).
  • ?mixed $arg6: Argument that binds to the formatting string (NULL: none).
  • ?mixed $arg7: Argument that binds to the formatting string (NULL: none).
  • ?mixed $arg8: Argument that binds to the formatting string (NULL: none).
  • ?mixed $arg9: Argument that binds to the formatting string (NULL: none).
  • ?mixed $arg10: Argument that binds to the formatting string (NULL: none).
  • ?mixed $arg11: Argument that binds to the formatting string (NULL: none).
  • ?mixed $arg12: Argument that binds to the formatting string (NULL: none).
  • ?mixed $arg13: Argument that binds to the formatting string (NULL: none).
  • ?mixed $arg14: Argument that binds to the formatting string (NULL: none).
  • ?mixed $arg15: Argument that binds to the formatting string (NULL: none).
  • ?mixed $arg16: Argument that binds to the formatting string (NULL: none).
  • ?mixed $arg17: Argument that binds to the formatting string (NULL: none).
  • ?mixed $arg18: Argument that binds to the formatting string (NULL: none).
  • ?mixed $arg19: Argument that binds to the formatting string (NULL: none).
  • ?mixed $arg20: Argument that binds to the formatting string (NULL: none).
  • ?mixed $arg21: Argument that binds to the formatting string (NULL: none).
  • ?mixed $arg22: Argument that binds to the formatting string (NULL: none).
  • ?mixed $arg23: Argument that binds to the formatting string (NULL: none).
  • ?mixed $arg24: Argument that binds to the formatting string (NULL: none).
  • ?mixed $arg25: Argument that binds to the formatting string (NULL: none).
  • ?mixed $arg26: Argument that binds to the formatting string (NULL: none).
  • ?mixed $arg27: Argument that binds to the formatting string (NULL: none).
  • ?mixed $arg28: Argument that binds to the formatting string (NULL: none).
  • ?mixed $arg29: Argument that binds to the formatting string (NULL: none).
  • ?mixed $arg30: Argument that binds to the formatting string (NULL: none).
parse_ini_file (line 5221)

Parse a configuration file.

  • return: Map of Ini file data (2d if processed sections). (false: error)
~array parse_ini_file (PATH $filename, [boolean $process_sections = false])
  • PATH $filename: The file path.
  • boolean $process_sections: Whether to process sections.
parse_str (line 5232)

Parses the string into variables.

void parse_str (string $str, array &$arr)
  • string $str: Query string to parse.
  • array &$arr: Target for variable mappings.
parse_url (line 2684)

Parse a URL and return its components.

  • return: A map of details about the URL (false: URL cannot be parsed).
~array parse_url (string $url)
  • string $url: The URL to parse.
passthru (line 5242)

Execute an external program and display raw output.

void passthru (PATH $command, [?integer $return_var = NULL])
  • PATH $command: The command that will be executed.
  • ?integer $return_var: Command success status (NULL: don't collect). Note that this is actually passed by reference, but is also optional.
pathinfo (line 2695)

Returns information about a file path.

  • return: A map of details about the path. (false: error)
~array pathinfo (PATH $path)
  • PATH $path: The path to parse.
pclose (line 5252)

Closes process file pointer.

  • return: Termination status.
integer pclose (resource $handle)
  • resource $handle: Process handle.
phpinfo (line 2703)

Outputs lots of PHP information.

void phpinfo ()
phpversion (line 2712)

Gets the current PHP version.

  • return: The PHP version.
string phpversion ()
php_sapi_name (line 5400)

Returns the type of interface between web server and PHP.

  • return: SAPI name.
string php_sapi_name ()
pi (line 4226)

Get value of PI.

  • return: PI.
float pi ()
popen (line 5425)

Opens process file pointer.

  • return: Socket (false: error).
~resource popen (string $command, string $mode)
  • string $command: Command to execute.
  • string $mode: Access mode.
posix_getpwuid (line 2723)

Return info about a user by user id. Does not exist on Windows.

  • return: A map of details of the user. (false: failure)
~array posix_getpwuid (integer $uid)
  • integer $uid: The user ID.
posix_getuid (line 2733)

Return the real user ID of the current process. Does not exist on Windows.

  • return: User ID.
integer posix_getuid ()
pow (line 4238)

Exponential expression.

  • return: Result.
float pow (float $base, float $exp)
  • float $base: Base.
  • float $exp: Exponent.
preg_grep (line 2760)

Array entries that match the pattern.

  • return: Matches
array preg_grep (string $pattern, array $subject, [integer $flags = 0])
  • string $pattern: The pattern.
  • array $subject: The subject strings.
  • integer $flags: Either 0, or PREG_GREP_INVERT.
preg_match (line 2747)

Perform a regular expression match.

  • return: The number of matches (false: error).
~integer preg_match (string $pattern, string $subject, [?array $matches = NULL], [integer $flags = 0])
  • string $pattern: The pattern.
  • string $subject: The subject string.
  • ?array $matches: Where matches will be put (note that it is a list of maps, except the arrays are turned inside out). (NULL: do not store matches). Note that this is actually passed by reference, but is also optional.
  • integer $flags: Either 0, or PREG_OFFSET_CAPTURE.
preg_match_all (line 2774)

Perform a global regular expression match.

  • return: The number of matches (false: error).
~integer preg_match_all (string $pattern, string $subject, array &$matches, [integer $flags = 0])
  • string $pattern: The pattern.
  • string $subject: The subject string.
  • array &$matches: Where matches will be put (note that it is a list of maps, except the arrays are turned inside out). Note that this is actually passed by reference, but is also optional.
  • integer $flags: Either 0, or PREG_OFFSET_CAPTURE.
preg_quote (line 4249)

Quote regular expression characters.

  • return: The escape string.
string preg_quote (string $str)
  • string $str: The string to escape.
preg_replace (line 2788)

Perform a regular expression search and replace.

  • return: The string with replacements made (false: error).
~string preg_replace (mixed $pattern, mixed $replacement, string $subject, [?integer $limit = NULL])
  • mixed $pattern: The pattern (string or array).
  • mixed $replacement: The replacement string (string or array).
  • string $subject: The subject string.
  • ?integer $limit: The limit of replacements (NULL: no limit).
preg_replace_callback (line 2802)

Perform a regular expression search and replace using a callback.

  • return: The string with replacements made (false: error).
~string preg_replace_callback (string $pattern, mixed $callback, string $subject, [?integer $limit = NULL])
  • string $pattern: The pattern.
  • mixed $callback: The callback.
  • string $subject: The subject string.
  • ?integer $limit: The limit of replacements (NULL: no limit).
preg_split (line 2816)

Split string by a regular expression.

  • return: The array due to splitting.
array preg_split (string $pattern, string $subject, [?integer $max_splits = NULL], [?integer $mode = NULL])
  • string $pattern: The pattern.
  • string $subject: The subject.
  • ?integer $max_splits: The maximum number of splits to make (NULL: no limit).
  • ?integer $mode: The special mode (NULL: none).
prev (line 4260)

Rewind the internal array pointer.

  • return: The array value we're now pointing at.
mixed prev (array $array)
  • array $array: The array.
printf (line 5441)

Output a formatted string.

  • return: Assembled string.
string printf (string $format, [?mixed $arg1 = NULL], [?mixed $arg2 = NULL], [?mixed $arg3 = NULL], [?mixed $arg4 = NULL], [?mixed $arg5 = NULL])
  • string $format: Formatting string.
  • ?mixed $arg1: Argument (NULL: not given).
  • ?mixed $arg2: Argument (NULL: not given).
  • ?mixed $arg3: Argument (NULL: not given).
  • ?mixed $arg4: Argument (NULL: not given).
  • ?mixed $arg5: Argument (NULL: not given).
print_r (line 2826)

Prints human-readable information about a variable.

void print_r (mixed $data)
  • mixed $data: The variable.
putenv (line 2836)

Sets the value of an environment variable.

  • return: Success status.
boolean putenv (string $string)
  • string $string: The string to send over (e.g. PATH=foo).
quoted_printable_decode (line 4832)

Convert a quoted-printable string to an 8 bit string.

  • return: Out.
string quoted_printable_decode (string $in)
  • string $in: In.
quotemeta (line 4843)

Quote meta characters. Returns a version of str with a backslash character (\) before every character that is among these: . \ + * ? [ ^ ] ( $ ).

  • return: Out.
string quotemeta (string $in)
  • string $in: In.
rad2deg (line 4271)

Converts the radian number to the equivalent number in degrees.

  • return: The angle in degrees.
float rad2deg (float $number)
  • float $number: The angle in radians.
range (line 4284)

Create a sequence in an array.

  • return: The sequence.
array range (mixed $from, mixed $to, [integer $step = 1])
  • mixed $from: From (integer or character string).
  • mixed $to: To (integer or character string).
  • integer $step: Step.
rawurldecode (line 2847)

Decode URL-encoded strings.

  • return: Decoded string.
string rawurldecode (string $str)
  • string $str: The string to decode.
rawurlencode (line 2858)

Encode URL-encoded strings.

  • return: Encoded string.
string rawurlencode (string $str)
  • string $str: The string to encode.
readdir (line 2869)

Read entry from directory handle.

  • return: Next filename (false: reached end already).
~string readdir (resource $dir_handle)
  • resource $dir_handle: Handle.
readfile (line 4295)

Outputs a file.

  • return: The number of bytes read (false: error).
~integer readfile (PATH $filename)
  • PATH $filename: The filename.
readgzfile (line 4794)

Output a gz-file.

  • return: Number of uncompressed bytes handled. (false: error)
~integer readgzfile (PATH $filename)
  • PATH $filename: Path to read from.
realpath (line 2880)

Returns canonicalized absolute pathname.

  • return: Actual path.
PATH realpath (PATH $path)
  • PATH $path: (Possibly) perceived path.
register_shutdown_function (line 2901)

Register a function for execution on shutdown.

void register_shutdown_function (mixed $callback, [?mixed $parama = NULL], [?mixed $paramb = NULL], [?mixed $paramc = NULL], [?mixed $paramd = NULL], [?mixed $parame = NULL], [?mixed $paramf = NULL], [?mixed $paramg = NULL], [?mixed $paramh = NULL], [?mixed $parami = NULL], [?mixed $paramj = NULL], [?mixed $paramk = NULL])
  • mixed $callback: Callback.
  • ?mixed $parama: Parameter (NULL: not used).
  • ?mixed $paramb: Parameter (NULL: not used).
  • ?mixed $paramc: Parameter (NULL: not used).
  • ?mixed $paramd: Parameter (NULL: not used).
  • ?mixed $parame: Parameter (NULL: not used).
  • ?mixed $paramf: Parameter (NULL: not used).
  • ?mixed $paramg: Parameter (NULL: not used).
  • ?mixed $paramh: Parameter (NULL: not used).
  • ?mixed $parami: Parameter (NULL: not used).
  • ?mixed $paramj: Parameter (NULL: not used).
  • ?mixed $paramk: Parameter (NULL: not used).
rename (line 2912)

Renames a file.

  • return: Success status.
boolean rename (PATH $oldname, PATH $newname)
  • PATH $oldname: Old name.
  • PATH $newname: New name.
reset (line 2945)

Set the internal pointer of an array to its first element.

  • return: The value of the first element.
mixed reset (array $array)
  • array $array: The array.
restore_error_handler (line 4802)

Restores the previous error handler function.

void restore_error_handler ()
rewind (line 4812)

Rewind the position of a file pointer.

  • return: Success status.
boolean rewind (resource $handle)
  • resource $handle: File handle.
rewinddir (line 4822)

Rewind directory handle.

void rewinddir (resource $handle)
  • resource $handle: Directory handle.
rmdir (line 2956)

Removes directory.

  • return: Success status.
boolean rmdir (PATH $dirname)
  • PATH $dirname: Directory path.
round (line 2968)

Rounds a float.

  • return: Rounded value.
float round (float $val, [integer $precision = 0])
  • float $val: Value to round.
  • integer $precision: Number of decimal points of precision required (-ve allowed).
rsort (line 2978)

Sort an array in reverse order.

void rsort (array &$array)
  • array &$array: The array to sort.
rtrim (line 2989)

Strip whitespace from the end of a string.

  • return: Trimmed string.
string rtrim (string $str, [string $characters = &quot; \t\n\r\0\x0B&quot;])
  • string $str: String to trim from.
  • string $characters: Characters to trim.
serialize (line 3000)

Generates a storable representation of a value.

  • return: The serialisation.
string serialize (mixed $value)
  • mixed $value: Whatever is to be serialised .
session_cache_limiter (line 5764)

Get and/or set the current cache limiter.

  • return: Current setting.
string session_cache_limiter ([?string $cache_limiter = NULL])
  • ?string $cache_limiter: New Setting (NULL: don't change).
session_decode (line 5775)

Decodes session data from a string.

  • return: Success status.
boolean session_decode (string $data)
  • string $data: Data to decode.
session_destroy (line 5783)

Destroys all data registered to a session.

void session_destroy ()
session_encode (line 5792)

Encodes the current session data as a string.

  • return: Session data.
string session_encode ()
session_get_cookie_params (line 5802)

Get the session cookie parameters.

  • return: Data.
array session_get_cookie_params ()
session_id (line 5813)

Get and/or set the current session id.

  • return: Current setting.
string session_id ([?string $id = NULL])
  • ?string $id: New setting (NULL: don't change).
session_module_name (line 5824)

Get and/or set the current session module.

  • return: Current session module name.
string session_module_name ([?string $name = NULL])
  • ?string $name: New session module name (NULL: don't change).
session_name (line 5835)

Get and/or set the current session name.

  • return: Current session name.
string session_name ([?string $name = NULL])
  • ?string $name: New session name (NULL: don't change).
session_save_path (line 5846)

Get and/or set the current session save path.

  • return: Current session save path.
string session_save_path ([?PATH $path = NULL])
  • ?PATH $path: New session save path (NULL: don't change).
session_set_cookie_params (line 5858)

Set the session cookie parameters.

void session_set_cookie_params (integer $lifetime, [?string $path = NULL], [?string $domain = NULL])
  • integer $lifetime: Lifetime.
  • ?string $path: Cookie path (NULL: no path limitation).
  • ?string $domain: Cookie domain (NULL: autodetect).
session_set_save_handler (line 5873)

Sets user-level session storage functions.

  • return: Success status.
boolean session_set_save_handler (mixed $open, mixed $close, mixed $read, mixed $write, mixed $destroy, mixed $gc)
  • mixed $open: Callback (open).
  • mixed $close: Callback (close).
  • mixed $read: Callback (read).
  • mixed $write: Callback (write).
  • mixed $destroy: Callback (destroy).
  • mixed $gc: Callback (garbage collection).
session_start (line 5883)

Initialize session data.

  • return: Success status.
boolean session_start ()
session_unset (line 5894)

Set whether a client disconnect should abort script execution.

  • return: Previous setting.
boolean session_unset (boolean $foo)
  • boolean $foo: Setting.
session_write_close (line 5902)

Write session data and end session.

void session_write_close ()
setcookie (line 3036)

Send a cookie.

  • return: Success status (fails if output already started).
boolean setcookie (string $name, [?string $value = NULL], [?integer $expire = NULL], [?string $path = NULL], [?string $domain = NULL], [BINARY $secure = 0])
  • string $name: The name.
  • ?string $value: The value (NULL: unset existing cookie).
  • ?integer $expire: Expiration timestamp (NULL: session cookie).
  • ?string $path: Path (NULL: current URL path).
  • ?string $domain: Domain (NULL: current URL domain).
  • BINARY $secure: Whether the cookie is only for HTTPS.
set_error_handler (line 3011)

Sets a user-defined error handler function.

  • return: The previously defined error handler.
mixed set_error_handler (mixed $error_handler)
  • mixed $error_handler: The call back.
shell_exec (line 3132)

Execute command via shell and return complete output as string.

  • return: The output (false: error).
~string shell_exec (string $command)
  • string $command: The command.
shuffle (line 4305)

Shuffle an array.

void shuffle (array $array)
  • array $array: The array to shuffle.
similar_text (line 4317)

Calculate the similarity between two strings.

  • return: The number of matching characters.
integer similar_text (string $first, string $second, [?float $percent = NULL])
  • string $first: First string.
  • string $second: Second string.
  • ?float $percent: Returns the percentage of similarity (NULL: do not get).
sin (line 3143)

Calculate the sine of an angle.

  • return: The sine of the angle.
float sin (float $arg)
  • float $arg: The angle.
sinh (line 4728)

Hyperbolic sine.

  • return: Out.
float sinh (float $in)
  • float $in: In.
sleep (line 4738)

Delay execution.

void sleep (integer $sec)
  • integer $sec: Time in seconds.
sort (line 3153)

Sort an array.

void sort (array &$array)
  • array &$array: The array.
soundex (line 4748)

Calculate the soundex key of a string.

  • return: Soundex.
string soundex (string $input)
  • string $input: Input.
sprintf (line 3167)

Return a formatted string.

  • return: Formatted string.
string sprintf (string $format, [?mixed $arg1 = NULL], [?mixed $arg2 = NULL], [?mixed $arg3 = NULL], [?mixed $arg4 = NULL])
  • string $format: Formatting string.
  • ?mixed $arg1: Argument for the formatting string (NULL: none required).
  • ?mixed $arg2: Argument for the formatting string (NULL: none required).
  • ?mixed $arg3: Argument for the formatting string (NULL: none required).
  • ?mixed $arg4: Argument for the formatting string (NULL: none required).
sqrt (line 4328)

Square root.

  • return: return 0.0;
float sqrt (float $arg)
  • float $arg: Number.
srand (line 3177)

Seed the random number generator.

void srand (integer $seed)
  • integer $seed: The seed.
strcasecmp (line 4340)

Binary safe case-insensitive string comparison.

  • return: <0 if s1<s2, 0 if s1=s2, >1 if s1>s2.
integer strcasecmp (string $str1, string $str2)
  • string $str1: The first string.
  • string $str2: The second string.
strcmp (line 3227)

Binary safe string comparison.

  • return: <0 if s1<s2, 0 if s1=s2, >1 if s1>s2.
integer strcmp (string $str1, string $str2)
  • string $str1: The first string.
  • string $str2: The second string.
strcoll (line 4352)

Locale based string comparison.

  • return: <0 if s1<s2, 0 if s1=s2, >1 if s1>s2.
integer strcoll (string $str1, string $str2)
  • string $str1: The first string.
  • string $str2: The second string.
strcspn (line 4364)

Find length of initial segment not matching mask.

  • return: The length.
integer strcspn (string $str1, string $str2)
  • string $str1: The subject string.
  • string $str2: The string of stop characters.
strftime (line 3239)

Format a local time/date according to locale settings (uses alternative formatting to 'date' function).

  • return: The formatted string.
string strftime (string $format, [?TIME $timestamp = NULL])
  • string $format: The formatting string.
  • ?TIME $timestamp: The timestamp (NULL: now).
stripcslashes (line 4771)

Un-quote string quoted with addcslashes.

  • return: Out.
string stripcslashes (string $in)
  • string $in: In.
stripslashes (line 3273)

Un-quote string slashed with addslashes.

  • return: Unslashed string.
string stripslashes (string $str)
  • string $str: Slashed string.
strip_tags (line 3251)

Strip HTML and PHP tags from a string.

  • return: Result.
string strip_tags (string $str, [string $allowable_tags = ''])
  • string $str: Subject.
  • string $allowable_tags: Comma-separated list of allowable tags.
stristr (line 4376)

Case-insensitive strstr.

  • return: All of haystack from the first occurrence of needle to the end.
string stristr (string $haystack, string $needle)
  • string $haystack: Haystack.
  • string $needle: Needle.
strlen (line 3284)

Get string length.

  • return: The string length.
integer strlen (string $str)
  • string $str: The string to get the length of.
strnatcasecmp (line 4388)

Case insensitive string comparisons using a "natural order" algorithm.

  • return: <0 if s1<s2, 0 if s1=s2, >1 if s1>s2.
integer strnatcasecmp (string $str1, string $str2)
  • string $str1: The first string.
  • string $str2: The second string.
strnatcmp (line 4400)

String comparisons using a "natural order" algorithm.

  • return: <0 if s1<s2, 0 if s1=s2, >1 if s1>s2.
integer strnatcmp (string $str1, string $str2)
  • string $str1: The first string.
  • string $str2: The second string.
strncasecmp (line 4413)

Binary safe case-insensitive string comparison of the first n characters.

  • return: <0 if s1<s2, 0 if s1=s2, >1 if s1>s2.
integer strncasecmp (string $str1, string $str2, integer $len)
  • string $str1: The first string.
  • string $str2: The second string.
  • integer $len: Up to this length (n).
strncmp (line 4426)

Binary safe string comparison of the first n characters.

  • return: <0 if s1<s2, 0 if s1=s2, >1 if s1>s2.
integer strncmp (string $str1, string $str2, integer $len)
  • string $str1: The first string.
  • string $str2: The second string.
  • integer $len: Up to this length (n).
strpos (line 3299)

Find position of first occurrence of a string.

  • return: The offset it is found at (false: not found).
~integer strpos (string $haystack, string $needle, [integer $offset = 0])
  • string $haystack: Haystack.
  • string $needle: Needle.
  • integer $offset: Offset to search from.
strrchr (line 4439)

Find the last occurrence of a character in a string.

  • return: The portion of haystack which starts at the last occurrence of needle and goes until the end of haystack.
string strrchr (string $haystack, string $needle)
  • string $haystack: Haystack.
  • string $needle: Needle (string of length 1).
strrev (line 4450)

Reverse a string.

  • return: Reversed string.
string strrev (string $string)
  • string $string: String to reverse.
strrpos (line 3311)

Find position of last occurrence of a char in a string.

  • return: The offset it is found at (false: not found).
~integer strrpos (string $haystack, string $needle)
  • string $haystack: Haystack.
  • string $needle: Needle.
strspn (line 4462)

Find length of initial segment matching mask.

  • return: The length of the initial segment of string which consists entirely of characters in mask.
string strspn (string $string, string $mask)
  • string $string: String to work upon.
  • string $mask: String consisting of alternative characters to require along our run.
strstr (line 3323)

Find first occurrence of a string.

  • return: The answer (false: does not occur).
~string strstr (string $haystack, string $needle)
  • string $haystack: Haystack.
  • string $needle: Needle.
strtok (line 3335)

Tokenize string.

  • return: Next token (false: could not return a token, no more tokens to return).
~string strtok (string $subject, [?string $deliminators = NULL])
  • string $subject: String to tokenise. EXCEPT if $deliminators=NULL, then this has actual deliminators.
  • ?string $deliminators: Deliminators (NULL: continue with previous tokenisation).
strtolower (line 3346)

Make a string lowercase.

  • return: Result.
string strtolower (string $str)
  • string $str: Subject.
strtotime (line 3358)

Parse about any English textual datetime description into a UNIX timestamp.

  • return: The timetamp (-1: failed).
TIME strtotime (string $time, [?TIME $now = NULL])
  • string $time: The subject.
  • ?TIME $now: The timestamp to find times relative to (NULL: now).
strtoupper (line 3369)

Make a string uppercase.

  • return: Result.
string strtoupper (string $str)
  • string $str: Subject.
strtr (line 3381)

Translate certain characters.

  • return: Result.
string strtr (string $string, array $replace_pairs)
  • string $string: Subject.
  • array $replace_pairs: Map of translations to do.
strval (line 3392)

Get string value of a variable.

  • return: String value of the variable.
string strval (mixed $var)
  • mixed $var: The variable.
str_pad (line 3190)

Pad a string to a certain length with another string.

  • return: The result.
string str_pad (string $input, integer $pad_length, [string $pad_string = ' '], [integer $pad_type = STR_PAD_RIGHT])
  • string $input: The subject.
  • integer $pad_length: The length to pad up to.
  • string $pad_string: What we are padding with.
  • integer $pad_type: The padding type (STR_PAD_RIGHT, STR_PAD_LEFT, STR_PAD_BOTH).
str_repeat (line 3202)

Repeat a string.

  • return: The result.
string str_repeat (string $input, integer $multiplier)
  • string $input: The string to repeat.
  • integer $multiplier: How many times to repeat the string.
str_replace (line 3215)

Replace all occurrences of the search string with the replacement string.

  • return: Result (string or array).
mixed str_replace (mixed $search, mixed $replace, mixed $subject)
  • mixed $search: What's being replaced (string or array).
  • mixed $replace: What's being replaced with (string or array).
  • mixed $subject: Subject (string or array).
substr (line 3405)

Return part of a string.

  • return: String part (false: $start was over the end of the string).
~string substr (string $string, integer $start, [?integer $length = NULL])
  • string $string: The subject.
  • integer $start: The start position.
  • ?integer $length: The length to extract (NULL: all remaining).
substr_count (line 3417)

Count the number of substring occurrences.

  • return: The number of times substring occurs in the subject.
integer substr_count (string $haystack, string $needle)
  • string $haystack: The subject.
  • string $needle: The substring to search for in the subject.
substr_replace (line 4476)

Replace text within a portion of a string.

  • return: A copy of string delimited by the start and (optionally) length parameters with the string given in replacement.
string substr_replace (string $string, string $replacement, integer $start, [?integer $length = NULL])
  • string $string: The subject string.
  • string $replacement: The replacement string.
  • integer $start: The start position of what's being replaced.
  • ?integer $length: The run-length of what is being replaced (NULL: go to end of string).
system (line 4783)

Execute an external program and display the output.

  • return: Output (false: error).
~string system (string $commend, [?integer $ret_var = NULL])
  • string $commend: Command to execute.
  • ?integer $ret_var: Place to put return value (NULL: not collected). Note that this is actually passed by reference, but is also optional.
tan (line 4487)

Calculate the tangent of an angle.

  • return: The tangent.
float tan (float $arg)
  • float $arg: The angle in radians.
tanh (line 4717)

Hyperbolic tangent.

  • return: Out.
float tanh (float $in)
  • float $in: In.
tempnam (line 3429)

Create file with unique file name. {{creates-file}}

  • return: The name of the temporary file (false: error).
~string tempnam (PATH $dir, string $prefix)
  • PATH $dir: The directory to create in (empty for temp directory).
  • string $prefix: The prefix of the temporary file name.
time (line 3439)

Return current UNIX timestamp.

  • return: The timestamp.
TIME time ()
tmpfile (line 4706)

Create a temporary file.

  • return: Temporary file.
resource tmpfile ()
touch (line 4696)

Sets access and modification time of file.

  • return: Success status.
boolean touch (PATH $filename, [?TIME $time = NULL], [?TIME $atime = NULL])
  • PATH $filename: File to touch.
  • ?TIME $time: New modification time (NULL: do not change).
  • ?TIME $atime: New access time (NULL: do not change).
trigger_error (line 3462)

Generates a user-level error/warning/notice message.

void trigger_error (string $error_msg, integer $error_type)
  • string $error_msg: The error message.
  • integer $error_type: The PHP error type constant.
trim (line 3451)

Strip whitespace from both ends of a string.

  • return: Trimmed string.
string trim (string $str, [string $characters = &quot; \t\n\r\0\x0B&quot;])
  • string $str: String to trim from.
  • string $characters: Characters to trim.
uasort (line 3472)

Sort an array with a user-defined comparison function and maintain index association.

void uasort (array &$array, mixed $cmp_function)
  • array &$array: The array.
  • mixed $cmp_function: Comparison function.
ucfirst (line 3482)

Make a string's first character uppercase.

  • return: Result.
string ucfirst (string $str)
  • string $str: Subject.
ucwords (line 3493)

Uppercase the first character of each word in a string.

  • return: Result.
string ucwords (string $str)
  • string $str: Subject.
uksort (line 3504)

Sort an array by keys using a user-defined comparison function.

void uksort (array &$array, mixed $cmp_function)
  • array &$array: The array.
  • mixed $cmp_function: Comparison function.
uniqid (line 3515)

Generate a unique ID.

  • return: Unique ID.
string uniqid (string $prefix, [boolean $lcg = false])
  • string $prefix: Prefix for unique ID.
  • boolean $lcg: Whether to add additional "combined LCG" entropy at the end of the return value.
unlink (line 3526)

Deletes a file.

  • return: Success status.
boolean unlink (PATH $filename)
  • PATH $filename: The filename.
unpack (line 4499)

Unpack data from binary string.

  • return: The unpacked data. (false: error)
~array unpack (string $format, string $data)
  • string $format: The formatting string for unpacking.
  • string $data: The data to unpack.
unserialize (line 3537)

Creates a PHP value from a stored representation.

  • return: What was originally serialised (false: bad data given, or actually false was serialized).
~mixed unserialize (string $str)
  • string $str: Serialized string.
urldecode (line 3557)

Decodes URL-encoded string.

  • return: Pure string.
string urldecode (string $str)
  • string $str: URL encoded string.
urlencode (line 3568)

URL-encodes string.

  • return: URL encoded string.
string urlencode (string $str)
  • string $str: The pure string to URL encode.
usort (line 3579)

Sort an array by values using a user-defined comparison function.

void usort (array &$array, mixed $cmp_function)
  • array &$array: The array.
  • mixed $cmp_function: Comparison function.
utf8_decode (line 3589)

Converts a string with ISO-8859-1 characters encoded with UTF-8 to single-byte ISO-8859-1.

  • return: Result.
string utf8_decode (string $data)
  • string $data: Subject.
utf8_encode (line 3600)

Encodes an ISO-8859-1 string to UTF-8.

  • return: Result.
string utf8_encode (string $data)
  • string $data: Subject.
var_dump (line 4660)

Dumps information about a variable.

void var_dump (mixed $expression)
  • mixed $expression: Data.
version_compare (line 4512)

Compares two "PHP-standardized" version number strings.

  • return: For unified: -1 if v1<v2, 0 if v1=v2, 1 if v1>v2. Else BINARY or boolean.
mixed version_compare (string $version1, string $version2, [?string $compare_symbol = NULL])
  • string $version1: First version number.
  • string $version2: Second version number.
  • ?string $compare_symbol: The operator to compare with (NULL: unified).
vprintf (line 4671)

Output a formatted string.

  • return: Length of outputed string.
integer vprintf (string $format, array $args)
  • string $format: Formatting string.
  • array $args: Arguments.
vsprintf (line 4683)

Return a formatted string.

  • return: Fixed string.
string vsprintf (string $format, array $args)
  • string $format: Formatting string.
  • array $args: Arguments.
wordwrap (line 3614)

Wraps a string to a given number of characters using a string break character.

  • return: Word-wrapped string.
string wordwrap (string $string, [integer $width = 75], [string $break = &quot;\n&quot;], [boolean $cut = false])
  • string $string: Subject.
  • integer $width: The word wrap position.
  • string $break: The string to put at wrap points.
  • boolean $cut: Whether to cut up words.
xdebug_dump_function_profile (line 3624)

Xdebug: dump profiling information.

void xdebug_dump_function_profile (integer $type)
  • integer $type: The dump mode
xdebug_start_profiling (line 3631)

Xdebug: start profiling.

void xdebug_start_profiling ()
xmlrpc_encode_request (line 3793)

Generates XML for a method request.

  • return: The XML.
string xmlrpc_encode_request (string $method, array $params)
  • string $method: The method to call.
  • array $params: The parameters to use.
xml_error_string (line 3641)

Get XML parser error string for a certain error code.

  • return: The string representation of the error code given.
string xml_error_string (integer $code)
  • integer $code: Error code.
xml_get_current_byte_index (line 3652)

Get current byte index for an XML parser.

  • return: Byte index (false: invalid parser given).
~integer xml_get_current_byte_index (resource $parser)
  • resource $parser: XML parser.
xml_get_current_column_number (line 4553)

Get current column number for an XML parser.

  • return: Which column on the current line the parser is currently at. (false: error)
~integer xml_get_current_column_number (resource $parser)
  • resource $parser: A reference to the XML parser to get column number from.
xml_get_current_line_number (line 3663)

Get current line number for an XML parser.

  • return: Line number (false: invalid parser given).
~integer xml_get_current_line_number (resource $parser)
  • resource $parser: XML parser.
xml_get_error_code (line 3674)

Get XML parser error code for last error the occurred.

  • return: The error code.
integer xml_get_error_code (resource $parser)
  • resource $parser: XML parser.
xml_parse (line 3687)

Start parsing an XML document.

  • return: Success status.
BINARY xml_parse (resource $parser, string $data, [boolean $is_final = false])
  • resource $parser: XML parser.
  • string $data: The data to parse.
  • boolean $is_final: Finish parsing process with this piece of data (otherwise parsing is open to re-enter with more data).
xml_parser_create (line 4564)

Create an XML parser.

  • return: XML parser (false: could not create, happens on default PHP5 on Windows). (false: error)
~resource xml_parser_create ([?string $encoding = NULL])
  • ?string $encoding: Encoding (NULL: PHP4: as-for-input/PHP5: autodetect).
xml_parser_free (line 3709)

Free an XML parser.

  • return: Success status.
boolean xml_parser_free (resource $parser)
  • resource $parser: XML parser.
xml_parser_get_option (line 4576)

Get options from an XML parser.

  • return: Value.
mixed xml_parser_get_option (resource $parser, integer $option)
  • resource $parser: Parser.
  • integer $option: Option.
xml_parser_set_option (line 3722)

Set options in an XML parser.

  • return: Success status.
boolean xml_parser_set_option (resource $parser, integer $option, mixed $value)
  • resource $parser: XML parser.
  • integer $option: The option to set (XML_OPTION_CASE_FOLDING [integer], XML_OPTION_TARGET_ENCODING [string]).
  • mixed $value: The value (BINARY or string).
xml_parse_into_struct (line 4590)

Parse XML data into an array structure.

  • return: 0 is failure, 1=pass.
BINARY xml_parse_into_struct (resource $parser, string $data, array &$values, [?array $index = NULL])
  • resource $parser: The parser.
  • string $data: The XML.
  • array &$values: Where to put the values.
  • ?array $index: Where to put the indices into the XML for where the values are at (NULL: don't collect). Note that this is actually passed by reference, but is also optional.
xml_set_character_data_handler (line 3734)

Set up character data handler.

  • return: Success status.
boolean xml_set_character_data_handler (resource $parser, mixed $handler)
  • resource $parser: XML parser.
  • mixed $handler: The callback.
xml_set_default_handler (line 4602)

Set up default handler.

  • return: Success status.
boolean xml_set_default_handler (resource $parser, mixed $callback)
  • resource $parser: XML parser.
  • mixed $callback: The callback.
xml_set_element_handler (line 3747)

Set up start and end element handlers.

  • return: Success status.
boolean xml_set_element_handler (resource $parser, mixed $start_handler, mixed $end_handler)
  • resource $parser: XML parser.
  • mixed $start_handler: The callback for start of element.
  • mixed $end_handler: The callback for end of element.
xml_set_external_entity_ref_handler (line 4614)

Set up external entity reference handler.

  • return: Success status.
boolean xml_set_external_entity_ref_handler (resource $parser, mixed $callback)
  • resource $parser: XML parser.
  • mixed $callback: The callback.
xml_set_notation_decl_handler (line 4626)

Set up notation declaration handler.

  • return: Success status.
boolean xml_set_notation_decl_handler (resource $parser, mixed $callback)
  • resource $parser: XML parser.
  • mixed $callback: The callback.
xml_set_object (line 3770)

Use XML Parser within an object.

void xml_set_object (resource $parser, object The $object)
  • resource $parser: XML parser.
  • object The $object: object.
xml_set_processing_instruction_handler (line 4638)

Set up processing instruction (PI) handler.

  • return: Success status.
boolean xml_set_processing_instruction_handler (resource $parser, mixed $callback)
  • resource $parser: XML parser.
  • mixed $callback: The callback.
xml_set_unparsed_entity_decl_handler (line 4650)

Set up unparsed entity declaration handler.

  • return: Success status.
boolean xml_set_unparsed_entity_decl_handler (resource $parser, mixed $callback)
  • resource $parser: XML parser.
  • mixed $callback: The callback.
zend_version (line 4533)

Gets the version of the current Zend engine.

  • return: The version of the currently running Zend Engine.
string zend_version ()

Documentation generated on Sun, 02 Jan 2011 23:21:21 +0000 by phpDocumentor 1.4.3