PHP Developer''''s Dictionary- P27 pptx

5 251 0
PHP Developer''''s Dictionary- P27 pptx

Đang tải... (xem toàn văn)

Thông tin tài liệu

PHP Developer’s Dictionary IT-SC book 130 Description The mhash_count() function, which was added in PHP 3.0.9 and PHP 4.0, returns the highest available hash ID. Hash IDs are numbered beginning with zero. mhash() Syntax string mhash(int hash, string data) Description The mhash() function, which was added in PHP 3.0.9 and PHP 4.0, applies the hash function to the data and returns the resulting hash string, which is also referred to as a digest. Mathematical PHP's mathematical function library provides methods for geometric operations, numerical conversions, and numerical operations. Note that when performing geometric operations in PHP, the geometric functions expect parameters expressed in radians, but functions are supplied to convert from radians to degrees and vice versa. You can even supply deg2rad() with a degree value as the radians parameter. The conversion factor for this is \\'9a (~3.14) radians = 180 degrees. abs() Syntax mixed abs(mixed number) Description The abs() function returns the absolute value of number . Return type is float if number is a float, and int otherwise. acos() Syntax PHP Developer’s Dictionary IT-SC book 131 float acos(float arg) Description The acos() function returns the arc cosine arg expressed in radians. asin() Syntax float asin(float arg) Description The asin() function returns the arc sine of arg expressed in radians. atan() Syntax float atan(float arg) Description The atan() function returns the arc tangent of arg expressed in radians. atan2() Syntax float atan2(float y, float x) Description The atan2() function, which was added in PHP 3.0.5 and PHP 4.0, returns the arc tangent of x and y . It differs from atan y/x because the signs of both parameters are used to determine the quadrant of the result. The result is expressed in radians. PHP Developer’s Dictionary IT-SC book 132 base_convert() Syntax string base_convert(string number , int frombase , int tobase ) Description The base_convert() function, which was added in PHP 3.0.6 and PHP 4.0, returns a string containing number represented with a base of tobase . The frombase parameter indicates the base number with which it should be associated. For digits higher than 10, use the alphabet such that a represents 11 and z represents 35. echo base_convert(15,10,16);//returns f bindec() Syntax int bindec(string binary_string ) Description The bindec() function returns the decimal equivalent of binary_string . The largest number that can be converted contains 31 bits of 1s or 2,147,483,647 in decimal. The parameter binary_string is an unsigned number. ceil() Syntax int ceil(float number) Description The ceil() function returns the next higher integer value above number . echo ceil(5.23);//returns 6 PHP Developer’s Dictionary IT-SC book 133 cos() Syntax float cos(float arg ) Description The cos() function returns the cosine of arg in radians. decbin() Syntax string decbin( int number) Description The decbin() function returns the binary equivalent string of the decimal number . The largest number that can be converted is 2,147,483,647 or 31 bits set to 1. dechex() Syntax string dechex(int number) Description The dechex() function returns the hexadecimal equivalent of number . The largest number that can be converted is 2,147,483,647 or 7fffffff in hex. decoct() Syntax string decoct(int number) PHP Developer’s Dictionary IT-SC book 134 Description The decoct() function returns a string that is the conversion of number from decimal to octal format. The largest number that can be converted is 2,147,483,647 in decimal resulting to 17777777777 in octal. deg2rad() Syntax double deg2rad(double number) Description The deg2rad() function, which was added in PHP 3.0.4 and PHP 4.0, converts number from degrees to the radian equivalent. exp() Syntax float exp(float arg) Description The exp() function returns e raised to the power of arg . echo exp(1);//returns ~ 2.72 floor() Syntax int floor(float number ) Description The floor() function returns the next lower integer from number . echo floor(2.99);//returns 2 . PHP Developer’s Dictionary IT-SC book 130 Description The mhash_count() function, which was added in PHP 3.0.9 and PHP 4.0, returns the highest available. which was added in PHP 3.0.9 and PHP 4.0, applies the hash function to the data and returns the resulting hash string, which is also referred to as a digest. Mathematical PHP& apos;s mathematical. float atan2(float y, float x) Description The atan2() function, which was added in PHP 3.0.5 and PHP 4.0, returns the arc tangent of x and y . It differs from atan y/x because the

Ngày đăng: 07/07/2014, 05:20

Mục lục

  • Cover

  • PHP Developer's Dictionary

  • About the Authors

  • Acknowledgments

    • Tell Us What You Think!

    • Introduction

      • Who Should Buy This Book?

      • Organization of the Chapters

      • Writing Conventions

      • Chapter 1. Basic PHP Background and History

        • Advantages of PHP 4

        • Installation

          • PHP Installation General Overview

          • Configuration Options

          • Types, Variables, and Constants

          • Arrays

          • Strings

          • Type Conversion

          • Variables

          • Constants

          • Operators and Mathematical Functions

            • Expressions and Operators

            • Control Structures

            • Mathematical Functions

            • Functions, Classes, and Objects

              • Functions

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan