Dont Stop til You Get enough [PHP] utility function 4

Source: Internet
Author: User
Output the information page about PHP and current instructions
int phpinfo (void)
Returns the current PHP version number
String phpversion (void)
Print out a list of people who contributed to this PHP project
String phpcredits (void)
You can turn Var into an integer type. Base is the base of the conversion, the default value is 10. The variable var can be converted to an array or a class other than
Any type of variable
int intval (mixed var,int[base])
Get the double value of a variable
Double Doubleval (mixed Var)
Get the string value of a variable
String Strval (mixed var)
Returns the type of the variable
String GetType (mixed Var)
Sets the type of the variable. Returns true if the conversion succeeds
int Settype (string var,string type)
To sort the elements of an array
void sort (array array)
Reverse order of array elements
void Rsort (array array)
Apply a user function to each element of an array
int Array_walk (Array array,string func)
Counts the number of elements in an array
int count (mixed var)
Makes an internal pointer to the array parameter point to the last element and returns the element
Mixed end (array array)
Makes an internal pointer to the array parameter point to the previous element and returns the element
Mixed prev (array array)
Makes an internal pointer to the array parameter point to the next element and returns the element
Mixed next (array array)
Makes an internal pointer to the array parameter point to the 1th element and returns the element
Mixed reset (array array)
Returns the element pointed to by the pointer inside the current array
Mixed current (array array)
To see if there are needle given this value in the haystack array, strict means a strict match (default value)
BOOL In_array (mixed Needle,array Haystack,[,bool Strict])
Returns the index value of the next element in the array
Array each (array array)
Add elements to the end of the array
int Array_push (array stack,mixed var[,mixed ...])
POPs an element from the end of an array
Mixed Array_pop (array stack)
POPs an element from the beginning of the array
Mixed Array_shift (array stack)
Return the element to the beginning of the array
Mixed Array_unshift (array stack)
Returns the current UNIX format timestamp
int time (void)
Enter the time parameter to return the UNIX format timestamp
int mktime (int hour,int minute,int second,int month,int day,int year)
Get the UNIX timestamp format of Greenwich Mean Time
int gmmktime (int hour,int minute,int second,int month,int day,int year)
Format a time or date
String date (string Format,int[timestamp])
Get an array of date/time information
Array getdate (int [timestamp])
Returns True if the date is valid
BOOL Checkdate (int month,int day,int [timestamp])
Format the server's time or date representation according to your locale
String Strftime (String format,int [timestamp])
Converts a string representing a date and time into a timestamp. A string that can accept most typical data formats. For example, YYYY-MM-DD
and mm/dd/yyyy
int Strtotime (String time,int now)
Gets the current time (Unix timestamp format) one out of 10,000 seconds value. return string
String Microtime (void)
Returns the current time as an array type
Array gettimeofday (void)
Set random number of
void Srand (int seed)
Returns a random number that, without specifying the maximum and minimum range of random numbers, will automatically take a random number from 0 to Rand_max
。 If a parameter of min and Max is specified, a number is taken from the specified argument
int rand ([int min],[int Max])
Returns the maximum allowable value of a random number
int Getrandmax (void)

The above describes the dont stop til you get enough [PHP] utility function 4, including the dont stop til you Get enough aspects of the content, want to be interested in PHP tutorial friends helpful.

  • 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: info-contact@alibabacloud.com 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.