PHP Developer’s Dictionary IT-SC book 155 getmypid() Syntax int getmypid(void) Description The getmypid() function returns the process ID as to which PHP is running, or false on error. Note that when PHP is running as a server module, multiple scripts may share the same process ID. getmyuid() Syntax int getmyuid(void) Description The getmyuid() function returns the user ID under which the current script is running, or false on error. getrusage() Syntax array getrusage(int [who] ) Description The getrusage() function, which was added in PHP 3.0.7 and PHP 4.0b2, returns an associative array returned from the system call getrusage() . When who is set to 1 , the system call getrusage() will be called with RSUAGE_CHILDREN . The array structure is system-dependent, so you should consult your man pages for more information. phpcredits() Syntax PHP Developer’s Dictionary IT-SC book 156 void phpinfo(int flag) Description The phpcredits() function, which was added in PHP 4.0, outputs details about the developers of PHP and its modules. The output is in HTML format and its contents are based on the flag parameter. Possible values include: CREDITS_ALL All the credit messages. CREDITS_DOCS Lists the documentation team members. CREDITS_FULLPAGE Indicates that an entire HTML page should be generated. This is used in conjunction with other flags. CREDITS_GENERAL Lists language developers, 4.0 authors, and SAPI module. CREDITS_GROUP Lists the core developers. CREDITS_MODULES Lists the extension module developers. CREDITS_SAPI Not implemented. phpinfo() Syntax int phpinfo(void) Description The phpinfo() function outputs details about the current state of PHP. The details include information about PHP compilation options and extensions, the PHP version, server information and server environment (if compiled as a module), PHP environment, OS version information, paths, master and local values of configuration options, HTTP headers, and the GNU Public License. phpversion() Syntax string phpversion void) Description The phpversion() function returns a string containing the version of the currently running PHP parser. PHP Developer’s Dictionary IT-SC book 157 php_logo_guid() Syntax string php_logo_guid(void) Description The php_logo_guid() function, which was added in PHP 4.0b4, returns the logo guid. php_sapi_name() Syntax string php_sapi_name(void) Description The php_sapi_name() function, which was added in PHP 4.0.1, returns the type of interface between the Web server and PHP, such as cgi or apache . putenv() Syntax void putenv(string setting) Description The putenv() function adds the setting to the current environment variables. set_magic_quotes_runtime() Syntax long set_magic_quotes_runtime(int new_setting) PHP Developer’s Dictionary IT-SC book 158 Description The set_magic_quotes_runtime() function, which was added in PHP 3.0.6 and PHP 4.0, sets the current active configuration setting of magic_quotes_runtime to new_setting , which can be either 0 for off, or 1 for on. set_time_limit() Syntax void set_time_limit(int seconds) Description The set_time_limit() function sets the number of seconds a script is allowed to run. The default limit is 30 seconds or, if it exists, the max_execution_time value defined in the configuration file. If seconds is set to zero, no time limit is imposed. If called during the execution of the script, the timer is reset to 0 and the counter starts counting towards this new limit. If PHP is running in safe mode, set_time_limit() has no effect. zend_logo_guid() Syntax string zend_logo_guid(void) Description The zend_logo_guid() function, which was added in PHP 4.0b4, returns the Zend guid. String PHP has many string manipulation functions, most of which follow the syntax and operation of their C namesakes. addcslashes() Syntax string addcslashes(string str, string charlist) PHP Developer’s Dictionary IT-SC book 159 Description The addcslashes() function, which was added in PHP 4.0b4, returns a string with backslashes placed before characters listed in the charlist parameter. Similar to C, it escapes \\ n , \\ t , \\ r , and so on. Any characters with ASCII codes lower than 32 or higher than 126 are converted to octal representation. The charlist parameter can also be used to specify a range by indicating the ASCII codes of the characters. The notation is "\\ <start> \\ <end>" where start and end are ASCII codes. addslashes() Syntax string addslashes(string str) Description The addslashes() function returns a new version of str in which characters that must be quoted for database queries have a backslash in front of them. These characters include single quotes ( ' ), double quotes ( " ), backslashes ( and NUL (the null byte). bin2hex() Syntax string bin2hex(string str) Description The bin2hex() function, which was added in PHP 3.0.9 and PHP 4.0, returns an ASCII string containing the hexadecimal equivalent of the binary data represented by the parameter str . The conversion is done byte-wise with the high-nibble first, where a nibble is half of a byte. echo bin2hex("12ab");//displays 31326162 chop() . more information. phpcredits() Syntax PHP Developer’s Dictionary IT-SC book 156 void phpinfo(int flag) Description The phpcredits() function, which was added in PHP 4.0, outputs. implemented. phpinfo() Syntax int phpinfo(void) Description The phpinfo() function outputs details about the current state of PHP. The details include information about PHP compilation. License. phpversion() Syntax string phpversion void) Description The phpversion() function returns a string containing the version of the currently running PHP parser. PHP Developer’s