Home > Backend Development > PHP Tutorial > [PHP] Practical functions 10_PHP tutorial

[PHP] Practical functions 10_PHP tutorial

WBOY
Release: 2016-07-21 15:54:04
Original
768 people have browsed it

//Convert the characters of the IP dotted address back to the IP v4 format address

int ip2long(string ip_address)
//Convert the IP v4 format address back to the string of the IP dotted address

string long2ip(int proper_address)
//Get the environment variable varname. If successful, the variable value will be returned. If it fails, false will be returned.

string getenv(string varname)
//Used to set Set the system environment

void putenv(string setting)
//Get the owner name of the current PHP script

string get_current_user(void)
//Call the user function specified by function_name

string get_cfg_var(string function_name[,mixed parrameter[,mixed...]])
//Return the port (protocol) associated with service, which must be TCP or UDP

int getservbyname(string service,string protocol)
//Returns the service name (protocol) associated with port, which must be TCP or UDP

string getservbyport(int port,string protocol)
// Take the absolute value

mixed abs(mixed number)
//Square root

float sqrt(float arg)
//The power of the natural logarithm e

float exp(float arg)
//Return pi

double pi(void)
//Round

double round(double val)
// Calculate the smallest integer greater than the specified number

int ceil(float number)
//Calculate the largest integer less than the specified number

int floor(float number)
//Get the maximum value

mixed max(mixed arg1,mixed arg2...mixed argn)
//Take the minimum value

mixed min(mixed arg1,mixed arg2...mixed argn)
//Get random numbers

int rand([int min],[int max])
//Number system conversion

string base_convert(string number,int frombase,int tobase )
//Format number string

string number_format(float number,int[decimals],string[decpoint],string[thounsands_sep])

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/318591.htmlTechArticle//Convert the characters of the IP dotted address back to the IPv4 format address intip2long(stringip_address) //Convert the IPv4 format address Convert back to the string of IP dot address stringlong2ip(intproper_address) //Get the ring...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template