Nasty dead.

Source: Internet
Author: User
Tags acos asin ereg floor function month name natural logarithm uppercase letter value of pi
Nasty dead ... Urgent
Which is the common function of PHP must be mastered how to crash I have java, half a year work experience, thank you! Only 100 points can be scattered, sincerely ask for advice

PHP Code
PHP Common function Manual judge the function of a programming language, you can start with his library functions. A good programming language, must have a strong library function. I/O functions flush Function Description: Flush (); Description: The function flush refreshes the output cache of PHP, which tries to output the contents of the buffer to the user's browser. return value: No print function Description: print (string arg,string[arg],...); Description: The function print input all parameters. Return value: Returns True (1) If the output succeeds, or False (0). printf function Description: printf (string format,mixed[string]); Description: The function printf prints a string according to the format given. The format begins with a%, ending with a letter that determines the data type of the output. The type description for PHP is shown in the such as table. PHP type specifier type specifier description b output binary integer o output octal integer x,x output hexadecimal integer, "x" Using lowercase letters, "x" using uppercase letter D output decimal integer c output integer ASCII code description of character s output string f output floating point number E Output floating-point number as represented by scientific notation output a percent-semicolon return value: no formal expression function Ereg function Description: int ereg (string pattern, string string, Array[regs]) Description: The function ereg the entry in the parameter string for the regular expression given in pattern. If an optional reg array is provided, each match is stored sequentially in the items starting with the array regs[1]. Stores the match for the entire regular expression in regs[0]. In the function ereg, the identification of the match is case-sensitive. See the following program return values: If there is at least one match, the function Ereg returns True (1); otherwise false (0) is returned. Example: <? $date = "2000-5-4", if (Ereg ("([[0-9]) {4})-([0-9]{1,2}-([0-9]) {})", $date, $regs) {print ("$regs [3]. $regs [2]. $regs [ 1] "); Else{print ("Incorrect output time format: $date");}? > The program output results: 14.5.2000ereg_replace function Description: String ereg_replace (String pattern,string replacement,string string); Description: The function ereG_replace can be used to replace text, and when the parameter pattern matches the string in the argument string, he is replaced by the contents of the parameter replacement. If the parameter pattern contains parenthesized sub-expressions, it is possible to include specific code in the parameter replacement to indicate which child expression is replaced with a maximum of nine sub-expressions. The specific form is two backslash followed by a single number from 0~9, 0 for the entire expression to match, 1~9 indicates corresponding to the previous 1~9 sub-expression matching. Notice that the parentheses in the parameter pattern can be nested, with the expression ordinal equal to the number of parentheses before the expression. Return value: Function Ereg_eplace returns the replaced string pattern. eregi function Description: int eregi (string pattern, string string, Array[regs]); Description: The function eregi is similar to Ereg, where the function eregi is not case-sensitive when matching. Return value: If there is at least one match, the function Eregi returns True (1), otherwise false (0) is returned. Eregi_replace function Description: String eregi_replace (String pattern,string replacement,string string); Description: function Eregi_replace and Ereg_ Replace is similar, and the difference is that the function eregi_replace is case-insensitive when matching. Return value: Function Eregi_eplace returns the replaced string pattern. Split function Description: Array split (String pattern,string string, Int[limit]); Description: Function split takes the parameter pattern as a delimiter to take a series of substrings from the parameter string, and deposit them into a string array. The parameter limit limits the size of the generated array, and the last element in the array is all content that is not yet grouped in the parameter string. Return value: Function split returns an array of generated strings, and returns False (0) If there is an error. Sql_regcase function Description: String sql_regcase (String string), Description: function Sql_regcase generates an array of strings, each element in the array is the case of each character in the argument string in turn If there is a space in the argument string, the contents of the corresponding array element are a single space. Return value: Function Sql_regcase returns the resulting string array.Cases: 
  The result of this program is: [hh][ee][ll][ll][oo][][pp][hh][pp] Mathematical function abs function Description: Mixed ABS (mixed number); return value: function ABS returns the absolute value of the parameter number. ACOs function Description: Double ACOs (double number); return value: function ACOs returns the inverse cosine of the parameter number. If the parameter number is greater than 1 or less than 1, its inverse cosine value is meaningless. ASIN function description; Double asin (double number); return value: Function asin returns the inverse sine of the parameter number. If the parameter number is greater than 1 or less than 1, its inverse sine value is meaningless. Atan function Description: Double Atan (double number), function Atan returns the inverse tangent of the parameter. atan2 function Description: Double atan2 (Double x, double y); Return value: The function atan2 returns the radian value of the angle specified by the Cartesian coordinate system for the position of the seat punctuation in the polar coordinates. Bindec function Description: int bindec (string binary_number); return value: Function Bindec returns an integer value written as a binary number string binary_number. PHP uses a 32-bit signed integer, and the first bit of the binary number is the sign bit. ceil function Description: int ceil (double number); return value: function Ceil returns the smallest integer greater than the number of the parameter, if number is an integer. , it returns itself. Cos function Description: Double cos (double angle); return value: The function cos returns the cosine of the angle with the size of the radians as the parameter angle. Decbin In contrast to Bindec, decimal is converted to binary. Dechex (&LT;-&GT;HEXDEC) returns the hexadecimal value decoct (&LT;-&GT;OCTDEC) returns the octal value Deg2rad (<->rad2reg) function Description: Double deg2red (double angle); return value: Function deg2red returns the Radian value corresponding to the angle of the number of angles. Exp Function Description: Double exp (double power); return value: function exp Returns the power of the natural logarithm. Floor function Description: Int floor (double number); return value: Returns the integer part of the parameter #. Getrandmax function Description: int GETRAndmax (); Returns the maximum value that can be returned by the function Rand log (LOG10) function Description: Double log (double number); return value: Returns the natural logarithm of the parameter number (returns the base 10 logarithm) max (<- >min) function Description: Mixed max (mixed arg1, mixed arg2, ..., mixed argn); return value: Returns the maximum value in this array (minimum), if there is a floating-point number in the argument, all parameters are converted to floating-point numbers, and the return value is a floating-point number Otherwise all parameters are converted to integers, and the return value is an integer. Pi function Description: double pi (); return value: The function pi returns the approximate value of pi. Pow function Description: Double pow (double base,double power); return value: Function POW returns the power of the parameter base. The RAND function describes: int rand (int lowest,int longest); Description: Function rand is activated with Srand before it is used. Return value: The function Rand returns a number (containing two parameters) between the optional arguments lowest and longest, and if there is no argument, the range of the returned value is from zero to the integer returned by Getrandmax. Round function Description: Double round (double number); return value: function round returns the integer closest to the parameter number. Sin function Description: Double sin (double angle); return value: The function sin returns a sinusoidal value of the angle in radians. sqrt function Description: Double sqrt (double number); Description: In function sqrt, the parameter number cannot be less than 0. Return value: Function sqrt returns the square root of the parameter number. Srand function Description: srand (int seed); Description: function Srand activates the random number generator. The parameter seed is a randomly generated seed, i.e. the resulting random number is calculated by a series of parameters. return value: None. Tan function Description: Double tan (duoble angle); return value: function tan returns the tangent of the angle in radians. Time function Checkdate function Description: int checkdate (int month,int date,int year); Description: Naysayers the so-called legal date in PHP, referring to the parameter year between 1900~32767 and month between 1~ Between 12, day is the date between the effective date of the current month. Return value: Returns True if the date entered is valid (1Otherwise, return False (0). Date function Description: string date (string format, int [timestamp]); Description: The function date generates a string that describes the date timestamp, based on the parameter format. The parameter timestamp is optional and, if given, is the required timestamp, which is the number of seconds from January 1, 1970, or the current date if it is blank. The format code is the following table: Return value: function date returns the generated date description string. The Format Code table code for the date of the function describes a AM/PMA AM/PMD has a leading zero date in the month of the day D three letter shorthand for the days of the week F month name H is expressed in 1~12 hour h with 0~23 hour I minutes J no leading zero month of the date L day of the Week with 1~12 Represents the month in m abbreviated month name the positive sequence suffix of the date in the month of the year from the epoch y two-bit years y four-bit year Z date getdate function Description: Array getdate (Int[timnestamp]) ; Description: The function generates an associative array with the given date information. The parameter timestamp is the required timestamp, and if it is empty, the current date is used. The associative array elements are shown in the following table: Return value: Function getdate returns the resulting associative array. The GETDATE function generates an associative array element table element that describes the hours 24-hour format of the day in the mday month minutes minutes Mon number form month months full name seconds seconds wday number of days 0~6 from weekday weeks A number of names yday the date of the year in the form of the years year 0 days stamp mktime function Description: int mktime (int hour, int minute, int second, int month, int day, int); return value: Letter Number Mktime returns the timestamp of the given date, which is the number of seconds since January 1, 1970. All parameters are optional, and if empty, the current value is used. If a parameter exceeds the range, the function mktime can also be interpreted correctly. For example, using 13 as the month equals the second year of January. Gmmktime function Description: int gmmktime (int hour, int minute, int second, int month, int day, int year); return value: function gmmktime is similar to function mktime, but the difference is All of his parameters are considered to be GMT. Time functionDescription: int time (); return value: function times returns the current timestamp. Microtime function Description: String Microtime (); return value: Function Microtime returns a string consisting of two members separated by spaces, the first member is the number of milliseconds for the system time, and the second member is the number of seconds from January 1, 1970. That is, the time stamp of the system time. String manipulation function Addslashes function Description: String addslashes (String string), Description: The function addslashes add a backslash (\), double quotation mark ("), backslash (\), and space before the argument string. )。 Return value: Function Addslashes returns the string parameter after the addition. Chop function Description: String chop (String string), return value: function chop remove all spaces after the last non-null character in the parameter string and return the generated new string. Chr function Description: string chr (int ascii); return value: The function CHR returns the corresponding character according to the given ASCII code. eval function Description: eval (string phpcode); Description: Function eval executes the parameter Phpcode as a line of code in a PHP script, applying single or backspace dollar characters in parentheses. return value: None. Explode function Description: Array explode (string separator,string string), return value: function explode returns an array of strings, An array element is a section of the argument string that is delimited by the parameter separator. Htmlspecialchars function Description: String Htmlspecialchars (String string), Description: In HTML, some characters and special meaning, in order to retain their original intent, they are described in HTLM language. ' & ' converted to ' & ' ' to ' &qout ' < ' Convert to ' < ' > ' to ' > ' return value: function Htmlspecialchars returns the transformed string.
  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.