PHP Miscellaneous Functions

EditRocket provides the following information on Miscellaneous functions in the PHP source code builder.

int connection_aborted ( void ) - Checks whether the client disconnected.

int connection_status ( void ) - Gets the connection status bitfield.

int connection_timeout ( void ) - Determines whether the script timed out.

mixed constant ( string $name ) -

bool define ( string $name , mixed $value [, bool $case_insensitive ] ) - Defines a named constant at runtime.

bool defined ( string $name ) - Checks whether the given constant exists and is defined.


mixed eval ( string $code_str ) - Evaluates the string given in code_str as PHP code. Among other things, this can be useful for storing code in a database text field for later execution.

void exit ([ string $status ] ) -

mixed get_browser ([ string $user_agent [, bool $return_array ]] ) - Attempts to determine the capabilities of the user's browser, by looking up the browser's information in the browscap.ini file.

void __halt_compiler ( void ) - Halts the execution of the compiler. This can be useful to embed data in PHP scripts, like the installation files.

mixed highlight_file ( string $filename [, bool $return ] ) - Prints out or returns a syntax highlighted version of the code contained in filename using the colors defined in the built-in syntax highlighter for PHP.

mixed highlight_string ( string $str [, bool $return ] ) -

int ignore_user_abort ([ bool $setting ] ) - Sets whether a client disconnect should cause a script to be aborted.

string pack ( string $format [, mixed $args [, mixed $... ]] ) - Pack given arguments into binary string according to format.

bool php_check_syntax ( string $filename [, string &$error_message ] ) - Performs a syntax (lint) check on the specified filename testing for scripting errors.

string php_strip_whitespace ( string $filename ) - Returns the PHP source code in filename with PHP comments and whitespace removed. This may be useful for determining the amount of actual code in your scripts compared with the amount of comments.


int sleep ( int $seconds ) -

array sys_getloadavg ( void ) - Returns three samples representing the average system load (the number of processes in the system run queue) over the last 1, 5 and 15 minutes, respectively.

mixed time_nanosleep ( int $seconds , int $nanoseconds ) - Delays program execution for the given number of seconds and nanoseconds.

bool time_sleep_until ( float $timestamp ) - Makes the script sleep until the specified timestamp.

string uniqid ([ string $prefix [, bool $more_entropy ]] ) - Gets a prefixed unique identifier based on the current time in microseconds.

array unpack ( string $format , string $data ) - Unpacks from a binary string into an array according to the given format.

void usleep ( int $micro_seconds ) - Delays program execution for the given number of micro seconds.