Always Learning

PHP Functions Essential Reference
Torben Wilson
Zak Greant
Graeme Merrall
Brett Michlitsch

ISBN-10: 073570970X
ISBN-13:  9780735709706

Publisher:  Sams Publishing
Copyright:  2002
Format:  Paper; 768 pp
Published:  09/17/2001
Status: Instock


Customers outside the U.S., click here.


Print this content

In this section:


Description

This book is a must-have for any course covering web development using Open Source tools, or courses focusing on PHP.

This book is a reference of all PHP functions and features, through PHP4, presented in the very accessible manner of an Essential Reference.


Table of Contents



Introduction.

Purposes and Organization of This Book. PHP Version Information. Structure of the Book. This Book's Web Site. Conventions.



1. Apache-Specific Functions.

apache_lookup_uri. apache_note. ascii2ebcdic. ebcdic2ascii. Getallheaders. Virtual.



2. Arbitrary-Precision Mathematics (BC) Functions.

bcad. Bccomp. Bcdiv. Bcmod. bcmul. bcpow. bcscale. bcsqrt. Bcsub.



3. Array-Related Functions.

Overview. Array 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.



4. Calendar Functions.

easter_date. easter_days. frenchtojd. gregoriantojd. jddayofweek. jdmonthname. jdtofrench. jdtogregorian. jdtojewish. jdtojulian. jdtounix. jewishtojd. juliantojd. Unixtojd.



5. CCVS Functions.

CCVS Error Strings. CCVS 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.



6. Class and Object Functions.

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.



7. COM Functions.

com_get. com_invoke. com_load. com_propget. com_propput. com_propset. com_set. new COM.



8. Connection-Handling Functions.

Overview. Connection-Handling Constants. php.ini Directives Related to the Connection-Handling Functions. Installing Connection-Handling Support. connection_aborted. connection_status. connection_timeout. ignore_user_abort.



9. cURL Library Function.

curl_close. curl_errno. curl_error. curl_exec. curl_getinfo. curl_init. curl_setopt. curl_version.



10. Date and Time Functions.

checkdate. date. getdate. gettimeofday. gmdate. gmmktime. gmstrftime. localtime. microtime. mktime. strftime. strtotime. Time.



11. Directory Functions.

chdir. closedir. dir. getcwd. opendir. readdir. Rewinddir.



12. Error-Handling Functions.

Good Error-Handling Practices. error_log. error_reporting. restore_error_handler. set_error_handler. trigger_error. user_error.



13. Filesystem Functions.

Overview. Configuring the Filesystem Functions. Installing Filesystem Support. Additional Information. chgrp. chmod. chown. clearstatcache. copy. diskfreespace. fclose. feof. fgetc. fgetcsv. fgets. fgetss. file. fileatime. filectime. filegroup. fileinode. filemtime. fileowner. fileperms. 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.



14. Function-Handling Functions.

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.



15. HTTP-Related Functions.

header. headers_sent. Setcookie.



16. Java Functions.

New Java. java_last_exception_get. java_last_exception_clear.



17. LDAP Functions.

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.



18. Mail Functions.

ezmlm_hash. Mail.



19. Mathematical Functions.

Overview. Named 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.



20. mhash Functions.

mhash. mhash_count. mhash_get_block_size. mhash_get_hash_name. mhash_keygen_s2k.



21. Miscellaneous Functions.

Overview. Configuring the Miscellaneous Functions. Installing Miscellaneous Function Support. define. defined. die. eval. exit. get_browser. highlight_file. highlight_string. iptcparse. leak. show_source. sleep. Usleep.



22. MySQL Functions.

Overview. How the MySQL Functions Work. Notes on the Examples. Configuring MySQL. Installing MySQL Support. Additional 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.



23. Networking Functions.

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.



24. ODBC Functions.

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.



25. Pack and Unpack Functions.

Pack. Unpack.



26. PHP Options and Information Functions.

Assert. assert_options. dl. extension_loaded. getenv. get_cfg_var. get_current_user. get_extension_funcs. get_included_files. 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.



27. Program Execution Functions.

Overview. How the Program Execution Functions Work. escapeshellarg. escapeshellcmd. exec. passthru. System.



28. Pspell Functions.

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.



29. Regular Expression Functions.

POSIX Extended Regular Expression Functions. ereg. eregi. ereg_replace. eregi_replace. split. spliti. Perl-Compatible Regular Expression Functions. Pattern Modifiers. preg_grep. preg_match. preg_match_all. preg_quote. preg_replace. preg_split.



30. Semaphore and Shared Memory Functions.

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.



31. Session-Management Functions.

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.



32. String Functions.

Overview. Using the String Functions. Configuring the String Functions. Installing 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.



33. Syslog Functions.

closelog. define_syslog_variables. openlog. Syslog.



34. Tick Functions.

Overview. How Ticks Work. Tick Functions. register_tick_function. unregister_tick_function.



35. URL Functions.

base64_decode. base64_encode. parse_url. rawurldecode. rawurlencode. urldecode. Urlencode.



36. Variable-Related Functions.

Overview. Configuring Variable-Related Functions. Installing Variable-Related Functions Support. Additional 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.



37. WDDX Functions.

wddx_add_vars. wddx_deserialize. wddx_packet_end. wddx_packet_start. wddx_serialize_value. wddx_serialize_vars. wddx_unserialize.



38. XML Functions.

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.



Index.



Back to top

Print this content

In this section:


Sample Chapter

View a Sample Chapter PDF:/samplechapter/073570970X.pdf


Author Bios

Zak Greant is lead developer for 51 Degrees North and is the founder of the Foo & Associates programmer's cooperative. He leads the PHP Quality Assurance Team and (when not writing) is an active contributor to the PHP documentation, mailing lists, and source code.

Graeme Merrall graduated from university in 1993 with a degree in biochemistry. While at university, he discovered the Internet while it was still very much in its infancy. This led him away from biochemistry into employment with an ISP and later with a leading web design firm in New Zealand, where he developed his skills in PHP and ASP. As well as his programming, Graeme has written for the local newspaper in his former home town in New Zealand, and has written several tutorials and articles on PHP for Wired Digital's Web Monkey. Born and raised in New Zealand, Graeme currently resides in Sydney, where he runs his own consultancy, specializing in e-commerce and business integration with the Internet. In his spare time, he enjoys modern literature, music, and crocodile wrestling.

Torben Wilson is a freelance developer, technical writer, and member of the Foo & Associates programmer's cooperative. He has been programming in PHP since 1996 and has been a contributing author to the official PHP manual since 1997.

Brett Michlitsch is a producer/senior developer at a leading multimedia training development company based in Minneapolis, MN. As a leader in software design and development, Brett has mentored aspiring developers, led in-services on database design and software architecture, and been recognized by colleagues for his outstanding technical feats. In addition, he has led the design of several web sites and web applications, overseeing the database, business logic, and interface design, and using scripting languages such as PHP, ASP, and Perl to carry out his designs.


Backcover Copy

PHP Functions Essential Reference is a detailed and practical funtion reference for the PHP programming language. Concise and authoritative, this working programmer's guide covers the core function groups plus 300 additional commonly used PHP functions, and details 800 more functions on the book's web site, php-er.com.

Written by working developers and PHP community leaders, this book is full of working code that utilizes the rich variety of functions available with PHP. Every function is supported by one or more examples that illustrate the function in action. This definitive guide to PHP is a must-have for any serious PHP programmer.

Back to top

Print this content

This product is a member of the following series. Click on the series name to see the full list of products in the series.

Back to top

Log in to the Instructor Resource Center

Login name: 

  Password: 

Forgot login/password?  |  Need to redeem an access code?

        

Instructor Resource Center File Download

This work is protected by local and international copyright laws and is provided solely for the use of instructors in teaching their courses and assessing student learning. Dissemination or sale of any part of this work (including on the World Wide Web) will destroy the integrity of the work and is not permitted. The work and materials from this site should never be made available to students except by instructors using the accompanying text in their classes. All recipients of this work are expected to abide by these restrictions and to honor the intended pedagogical purposes and the needs of other instructors who rely on these materials.

Cancel     I accept, proceed with download

Print this content

Pearson Higher Education offers special pricing when you choose to package your text with other student resources. If you're interested in creating a cost-saving package for your students contact your Pearson Higher Education representative.

Back to top