PHP PHP Options&Information Functions

EditRocket provides the following information on PHP Options&Information functions in the PHP source code builder.

bool assert ( mixed $assertion ) - assert() will check the given assertion and take appropriate action if its result is FALSE.

mixed assert_options ( int $what [, mixed $value ] ) -

int dl ( string $library ) - Loads the PHP extension given by the parameter library.

bool extension_loaded ( string $name ) - Finds out whether the extension is loaded.

string get_cfg_var ( string $option ) - Gets the value of a PHP configuration option.

string get_current_user ( void ) -

array get_defined_constants ([ mixed $categorize ] ) - Returns the names and values of all the constants currently defined.

array get_extension_funcs ( string $module_name ) - This function returns the names of all the functions defined in the module indicated by module_name.

string get_include_path ( void ) -

array get_included_files ( void ) -

array get_loaded_extensions ([ bool $zend_extensions=FALSE ] ) - This function returns the names of all the modules compiled and loaded in the PHP interpreter.

int get_magic_quotes_gpc ( void ) -

int get_magic_quotes_runtime ( void ) -


string getenv ( string $varname ) - Gets the value of an environment variable.

int getlastmod ( void ) - Gets the time of the last modification of the current page.

int getmygid ( void ) -

int getmyinode ( void ) - Gets the inode of the current script.

int getmypid ( void ) - Gets the current PHP process ID.

int getmyuid ( void ) -

array getopt ( string $options [, array $longopts ] ) - Parses options passed to the script.

array getrusage ([ int $who ] ) - This is an interface to getrusage(2). It gets data returned from the system call.


string ini_get ( string $varname ) - Returns the value of the configuration option on success.

array ini_get_all ([ string $extension ] ) - Returns all the registered configuration options.

void ini_restore ( string $varname ) - Restores a given configuration option to its original value.

string ini_set ( string $varname , string $newvalue ) - Sets the value of the given configuration option. The configuration option will keep this new value during the script's execution, and will be restored at the script's ending.

- There is no function named main() except in the PHP source. In PHP 4.3.0, a new type of error handling in the PHP source (php_error_docref) was introduced.

int memory_get_peak_usage ([ bool $real_usage ] ) - Returns the peak of memory, in bytes, that's been allocated to your PHP script.

int memory_get_usage ([ bool $real_usage ] ) - Returns the amount of memory, in bytes, that's currently being allocated to your PHP script.

string php_ini_scanned_files ( void ) - php_ini_scanned_files() returns a comma-separated list of configuration files parsed after php.ini. These files are found in a directory defined by the --with-config-file-scan-dir option which is set during compilation.

string php_logo_guid ( void ) - This function returns the ID which can be used to display the PHP logo using the built-in image.

string php_sapi_name ( void ) -

string php_uname ([ string $mode ] ) - php_uname() returns a description of the operating system PHP is running on. For the name of just the operating system, consider using the PHP_OS constant, but be reminded this constant will contain the operating system PHP was built on.

bool phpcredits ([ int $flag ] ) - This function prints out the credits listing the PHP developers, modules, etc. It generates the appropriate HTML codes to insert the information in a page.

bool phpinfo ([ int $what ] ) - Outputs a large amount of information about the current state of PHP. This includes information about PHP compilation options and extensions, the PHP version, server information and environment (if compiled as a module), the PHP environment, OS version information, paths, master and local values of configuration options, HTTP headers, and the PHP License.

string phpversion ([ string $extension ] ) - Returns a string containing the version of the currently running PHP parser or extension.

bool putenv ( string $setting ) - Adds setting to the server environment. The environment variable will only exist for the duration of the current request. At the end of the request the environment is restored to its original state.

void restore_include_path ( void ) -

string set_include_path ( string $new_include_path ) -

bool set_magic_quotes_runtime ( int $new_setting ) -

void set_time_limit ( int $seconds ) - Set the number of seconds a script is allowed to run. If this is reached, the script returns a fatal error. The default limit is 30 seconds or, if it exists, the max_execution_time value defined in the php.ini.

string sys_get_temp_dir ( void ) - Returns the path of the directory PHP stores temporary files in by default.

mixed version_compare ( string $version1 , string $version2 [, string $operator ] ) - version_compare() compares two PHP-standardized version number strings. This is useful if you would like to write programs working only on some versions of PHP.

string zend_logo_guid ( void ) - This function returns the ID which can be used to display the Zend logo using the built-in image.

int zend_thread_id ( void ) - This function returns an unique identifier for the current thread.

string zend_version ( void ) - Returns a string containing the version of the currently running Zend Engine.