mainNew Riders Publishing: PHP Functions Essential Reference073570970X.hhc073570970X_main.html073570970X_toc.htmlMain PageTable of contentCopyrightAbout the AuthorsAbout the Technical ReviewersAcknowledgmentsTell Us What You ThinkIntroductionChapter 1. Apache-Specific FunctionsChapter 2. Arbitrary-Precision Mathematics (BC) FunctionsChapter 3. Array-Related FunctionsChapter 4. Calendar FunctionsChapter 5. CCVS FunctionsChapter 6. Class and Object FunctionsChapter 7. COM FunctionsChapter 8. Connection-Handling FunctionsChapter 9. cURL Library FunctionsChapter 10. Date and Time FunctionsChapter 11. Directory FunctionsChapter 12. Error-Handling FunctionsChapter 13. Filesystem FunctionsChapter 14. Function-Handling FunctionsChapter 15. HTTP-Related FunctionsChapter 16. Java FunctionsChapter 17. LDAP FunctionsChapter 18. Mail FunctionsChapter 19. Mathematical FunctionsChapter 20. mhash FunctionsChapter 21. Miscellaneous FunctionsChapter 22. MySQL FunctionsChapter 23. Networking FunctionsChapter 24. ODBC FunctionsChapter 25. Pack and Unpack FunctionsChapter 26. PHP Options and Information FunctionsChapter 27. Program Execution FunctionsChapter 28. Pspell FunctionsChapter 29. Regular Expression FunctionsChapter 30. Semaphore and Shared Memory FunctionsChapter 31. Session-Management FunctionsChapter 32. String FunctionsChapter 33. Syslog FunctionsChapter 34. Tick FunctionsChapter 35. URL FunctionsChapter 36. Variable-Related FunctionsChapter 37. WDDX FunctionsChapter 38. XML FunctionsPurposes and Organization of This BookPHP Version InformationStructure of the BookThis Book's Web SiteConventions'apache_lookup_uri''apache_note''ascii2ebcdic''ebcdic2ascii''getallheaders''virtual''bcadd''bccomp''bcdiv''bcmod''bcmul''bcpow''bcscale''bcsqrt''bcsub'OverviewArray Specifics'array''array_count_values''array_flip''array_intersect''array_keys''array_merge''array_merge_recursive''array_multisort''array_pad''array_pop''array_push''array_rand''array_reverse''array_shift''array_slice''array_splice''array_sum''array_unique''array_unshift''array_values''array_walk''arsort''asort''compact''count''current''each''end''extract''in_array''key''krsort''ksort''list''natcasesort''natsort''next''pos''prev''range''reset''rsort''shuffle''sizeof''sort''uasort''uksort''usort''easter_date''easter_days''frenchtojd''gregoriantojd''jddayofweek''jdmonthname''jdtofrench''jdtogregorian''jdtojewish''jdtojulian''jdtounix''jewishtojd''juliantojd''unixtojd'CCVS Error StringsCCVS Status Strings'ccvs_add''ccvs_auth''ccvs_command''ccvs_count''ccvs_delete''ccvs_done''ccvs_init''ccvs_lookup''ccvs_new''ccvs_report''ccvs_return''ccvs_reverse''ccvs_sale''ccvs_status''ccvs_textvalue''ccvs_void''call_user_method''class_exists''get_class''get_class_methods''get_class_vars''get_declared_classes''get_object_vars''get_parent_class''is_subclass_of''method_exists''com_get''com_invoke''com_load''com_propget''com_propput''com_propset''com_set''new COM'OverviewConnection-Handling Constants'php.ini' Directives Related to the Connection-Handling FunctionsInstalling Connection-Handling Support'connection_aborted''connection_status''connection_timeout''ignore_user_abort''curl_close''curl_errno''curl_error''curl_exec''curl_getinfo''curl_init''curl_setopt''curl_version''checkdate''date''getdate''gettimeofday''gmdate''gmmktime''gmstrftime''localtime''microtime''mktime''strftime''strtotime''time''chdir''closedir''dir''getcwd''opendir''readdir''rewinddir'Good Error-Handling Practices'error_log''error_reporting''restore_error_handler''set_error_handler''trigger_error''user_error'OverviewConfiguring the Filesystem FunctionsInstalling Filesystem SupportAdditional Information'chgrp''chmod''chown''clearstatcache''copy''diskfreespace''fclose''feof''fgetc''fgetcsv''fgets''fgetss''file''fileatime''filectime''filegroup''fileinode''filemtime''fileowner''fileperms''filesiz'filesize''filetype''file_exists''flock''fopen''fpassthru''fputs''fread''fseek''ftell''fwrite''getlastmod''getmyinode''is_dir''is_executable''is_file''is_link''is_readable''is_writeable''link''linkinfo''lstat''mkdir''pclose''popen''readfile''readlink''rename''rewind''rmdir''set_file_buffer''stat''symlink''tempnam''touch''umask''uniqid''unlink''call_user_func_array''call_user_func''create_function''func_get_arg''func_get_args''func_num_args''function_exists''get_defined_functions''register_shutdown_function''header''headers_sent''setcookie''new Java''java_last_exception_get''java_last_exception_clear'Overview'ldap_8859_to_t61''ldap_add''ldap_bind''ldap_close''ldap_connect''ldap_compare''ldap_count_entries''ldap_delete''ldap_dn2ufn''ldap_err2str''ldap_errno''ldap_error''ldap_explode_dn''ldap_first_attribute''ldap_first_entry''ldap_free_entry''ldap_free_result''ldap_get_attributes''ldap_get_dn''ldap_get_entries''ldap_get_values''ldap_get_values_len''ldap_list''ldap_modify''ldap_mod_add''ldap_mod_del''ldap_mod_replace''ldap_next_attribute''ldap_next_entry''ldap_read''ldap_t61_to_8859''ldap_search''ldap_unbind''ezmlm_hash''mail'OverviewNamed Constants'abs''acos''asin''atan''atan2''base_convert''bindec''ceil''cos''decbin''dechex''decoct''deg2rad''exp''floor''getrandmax''hexdec''log''log10''max''min''mt_getrandmax''mt_rand''mt_srand''number_format''octdec''pi''pow''rad2deg''rand''round''sin''sqrt''srand''tan''mhash''mhash_count''mhash_get_block_size''mhash_get_hash_name''mhash_keygen_s2k'OverviewConfiguring the Miscellaneous FunctionsInstalling Miscellaneous Function Support'define''defined''die''eval''exit''get_browser''highlight_file''highlight_string''iptcparse''leak''show_source''sleep''usleep'OverviewHow the MySQL Functions WorkNotes on the ExamplesConfiguring MySQLInstalling MySQL SupportAdditional Information'mysql''mysql_affected_rows''mysql_change_user''mysql_close''mysql_connect''mysql_create_db''mysql_createdb''mysql_data_seek''mysql_db_name''mysql_db_query''mysql_dbname''mysql_drop_db''mysql_dropdb''mysql_errno''mysql_error''mysql_escape_string''mysql_fetch_array''mysql_fetch_assoc''mysql_fetch_field''mysql_fetch_lengths''mysql_fetch_object''mysql_fetch_row''mysql_field_flags''mysql_field_len''mysql_field_name''mysql_field_seek''mysql_field_table''mysql_field_type''mysql_fieldname''mysql_fieldtable''mysql_fieldlen''mysql_fieldtype''mysql_fieldflags''mysql_free_result''mysql_freeresult''mysql_insert_id''mysql_list_dbs''mysql_list_fields''mysql_list_tables''mysql_listdbs''mysql_listfields''mysql_listtables''mysql_num_fields''mysql_num_rows''mysql_numfields''mysql_numrows''mysql_pconnect''mysql_query''mysql_result''mysql_select_db''mysql_selectdb''mysql_tablename''checkdnsrr''debugger_off''debugger_on''fsockopen''gethostbyaddr''gethostbyname''gethostbynamel''getmxrr''getprotobyname''getprotobynumber''getservbyname''getservbyport''ip2long''long2ip''pfsockopen''socket_get_status''socket_set_blocking''socket_set_timeout''odbc_autocommit''odbc_binmode''odbc_close''odbc_close_all''odbc_columnprivileges''odbc_columns''odbc_commit''odbc_connect''odbc_cursor''odbc_do''odbc_error''odbc_errormsg''odbc_exec''odbc_execute''odbc_fetch_array''odbc_fetch_into''odbc_fetch_object''odbc_fetch_row''odbc_field_len''odbc_field_name''odbc_field_num''odbc_field_precision''odbc_field_scale''odbc_field_type''odbc_foreignkeys''odbc_free_result''odbc_gettypeinfo''odbc_longreadlen''odbc_num_fields''odbc_num_rows''odbc_pconnect''odbc_prepare''odbc_primarykeys''odbc_procedurecolumns''odbc_procedures''odbc_result''odbc_result_all''odbc_rollback''odbc_setoption''odbc_specialcolumns''odbc_statistics''odbc_tableprivileges''odbc_tables''pack''unpack''assert''assert_options''dl''extension_loaded''getenv''get_cfg_var''get_current_user''get_extension_funcs''get_included_files''get_loa'get_loaded_extensions''get_magic_quotes_gpc''get_magic_quotes_runtime''get_required_files''getlastmod''getmyinode''getmypid''getmyuid''getrusage''ini_alter''ini_get''ini_restore''ini_set''parse_ini_file''phpcredits''phpinfo''phpversion''php_logo_guid''php_sapi_name''php_uname''putenv''set_magic_quotes_runtime''set_time_limit''zend_logo_guid''zend_version'OverviewHow the Program Execution Functions Work'escapeshellarg''escapeshellcmd''exec''passthru''system''pspell_add_to_personal''pspell_add_to_session''pspell_check''pspell_clear_session''pspell_config_create''pspell_config_ignore''pspell_config_mode''pspell_config_personal''pspell_config_repl''pspell_config_runtogether''pspell_config_save_repl''pspell_new''pspell_new_config''pspell_new_personal''pspell_save_wordlist''pspell_store_replacement''pspell_suggest'POSIX Extended Regular Expression Functions'ereg''eregi''ereg_replace''eregi_replace''split''spliti'Perl-Compatible Regular Expression FunctionsPattern Modifiers'preg_grep''preg_match''preg_match_all''preg_quote''preg_replace''preg_split'Overview'sem_acquire''sem_get''sem_release''shm_attach''shm_detach''shm_get_var''shm_put_var''shm_remove''shm_remove_var''shmop_close''shmop_delete''shmop_open''shmop_read''shmop_size''shmop_write''session_cache_limiter''session_decode''session_destroy''session_encode''session_get_cookie_params''session_id''session_is_registered''session_module_name''session_name''session_register''session_save_path''session_set_cookie_params''session_set_save_handler''session_start''session_unregister''session_unset'OverviewUsing the String FunctionsConfiguring the String FunctionsInstalling String Function Support'addcslashes''addslashes''bin2hex''chop''chr''chunk_split''convert_cyr_string''count_chars''crc32''crypt''echo''explode''get_meta_tags''hebrev''hebrevc''implode''join''levenshtein''ltrim''md5''metaphone''nl2br''ord''parse_str''print''printf''quoted_printable_decode''quotemeta''rtrim''sscanf''setlocale''similar_text''soundex''sprintf''strchr''strcspn''strip_tags''stripcslashes''stripslashes''stristr''strnatcmp''strnatcasecmp''str_pad''strpos''strrchr''str_repeat''strrev''strrpos''strspn''strstr''strtok''strtolower''strtoupper''str_replace''strtr''substr''substr_count''substr_replace''trim''ucfirst''ucwords''wordwrap''closelog''define_syslog_variables''openlog''syslog'OverviewHow Ticks WorkTick Functions'register_tick_function''unregister_tick_function''base64_decode''base64_encode''parse_url''rawurldecode''rawurlencode''urldecode''urlencode'OverviewConfiguring Variable-Related FunctionsInstalling Variable-Related Functions SupportAdditional Information'doubleval''empty''get_defined_vars''get_resource_type''gettype''intval''is_array''is_bool''is_double''is_float''is_int''is_integer''is_long''is_null''is_numeric''is_object''is_real''is_resource''is_scalar''is_string''isset''print_r''serialize''settype''strval''unserialize''unset''var_dump''wddx_add_vars''wddx_deserialize''wddx_packet_end''wddx_packet_start''wddx_serialize_value''wddx_serialize_vars''wddx_unserialize'Overview'xml_error_string''xml_get_current_byte_index''xml_get_current_column_number''xml_get_current_line_number''xml_get_error_code''xml_parse''xml_parser_create''xml_parser_free''xml_parser_get_option''xml_parser_set_option''xml_parse_into_struct''xml_set_character_data_handler''xml_set_default_handler''xml_set_element_handler''xml_set_external_entity_ref_handler''xml_set_notation_decl_handler''xml_set_processing_instruction_handler''xml_set_unparsed_entity_decl_handler''xml_set_object'