[PHP] function 4

Source: Internet
Author: User

// Output the PHP and current request information page

Int phpinfo (void)
// Returns the current PHP version.

String phpversion (void)
// Print out a list of people contributing to this PHP Project

String phpcredits (void)
// Convert VaR to an integer. Base is the conversion base. The default value is 10. The transformed variable VAR can be an array or a variable other than
Any Type Variable

Int intval (mixed var, int [base])
// Obtain the double precision of the Variable

Double doubleval (mixed var)
// Obtain the string value of the Variable

String strval (mixed var)
// Return the type of the Variable

String GetType (mixed var)
// Set the variable type. Returns true if the conversion is successful.

Int settype (string var, string type)
// Sort array elements

Void sort (array)
// Sort array elements in reverse order

Void rsort (array)
// Apply the User Function to each element of the array

Int array_walk (array, string func)
// Calculate the number of elements in an array

Int count (mixed var)
// Point the internal pointer of the array parameter to the last element and return this element.

Mixed end (array)
// Set the internal pointer of the array parameter to a forward element and return the element.

Mixed Prev (array)
// Point the internal pointer of the array parameter to the next element and return the element

Mixed Next (array)
// Point the internal pointer of the array parameter to 1st elements and return the element

Mixed reset (array)
// Returns the element pointed to by the internal pointer of the current array.

Mixed current (array)
// Check whether the value specified by needle exists in the haystack array. Strict means strict matching (default)

Bool in_array (mixed needle, array haystack, [, bool strict])
// Returns the index value of the next element in the array.

Array each (array)
// Add the element to the end of the array

Int array_push (array stack, mixed var [, mixed...])
// An element pops up from the end of the array.

Mixed array_pop (array stack)
// An element pops up 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 timestamp.

Int time (void)
// Input the time parameter to return the Unix timestamp.

Int mktime (INT hour, int minute, int second, int month, int day, int year)
// Obtain the Greenwich Mean Time in UNIX timestamp format

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])
// Obtain an array of date/time information

Array getdate (INT [timestamp])
// Returns true if it is a valid date.

Bool checkdate (INT month, int day, int [timestamp])
// Format the time or date expression of the server according to the region

String strftime (string format, int [timestamp])
// Convert the string representing the date and time into a timestamp. It can accept strings in most typical data formats. For example, YYYY-MM-DD
And mm/DD/YYYY

Int strtotime (string time, int now)
// Obtain the value of one second in the current time (in UNIX timestamp format. Returns a string.

String microtime (void)
// Returns the current time as an array

Array gettimeofday (void)
// Set Random Number

Void srand (INT seed)
// Return a random number. If the maximum and minimum ranges of the random number are not specified, this function automatically retrieves a random number from 0 to rand_max.
. If the min and Max parameters are specified, a number is obtained from the specified parameters.

Int rand ([int Min], [int Max])
// Returns the maximum allowed random number.

Int getrandmax (void)

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.