Funksiya
|
Tavsif
|
Matematik funksiyalar
|
mixed abs(mixed x)
|
x argumentning absolyut qiymati
|
int ceil(double x)
|
katta x dan kichik son
|
int floor(double number)
|
Kichik x dan katta son
|
double round(double x)
|
Yaxlitlash
|
string decbin(int dec)
|
O‘nlik sanoq tizimidagi sonni ikkilik sanoq tizimiga o‘girish
|
string dechex(int dec)
|
O‘nlik sanoq tizimidagi sonni o‘n oltilik sanoq tizimiga o‘girish
|
string decoct(int dec)
|
O‘nlik sanoq tizimidagi sonni sakkizlik sanoq tizimiga o‘girish
|
int bindec(string bin)
|
Ikkilik sanoq tizimidagi sonni 10 sanoq tizimiga o‘girish
|
int hexdec(string hex)
|
O‘n oltilik sanoq tizimidagi sonni o‘nlik sanoq tizimiga o‘girish
|
int octdec(string oct)
|
Sakkizlik sanoq tizimidagi sonni o‘nlik sanoq tizimiga o‘girish
|
int rand([int min,
int max])
|
Tasodifiy sonni olish
|
void srand(int seed)
|
Tasodifiy sonlar generatsiyasini o‘rnatish
|
int getrandmax()
|
“rand”ning qaytaradigan qiymatining eng kattasini olish
|
int mt_rand([int min,
int max])
|
Tasodifiy sonni olish
|
void mt_srand(int seed)
|
Tasodifiy sonlar generatsiyasini o‘rnatish
|
int mt_getrandmax()
|
“mt_rand”ning qaytaradigan qiymatining eng kattasini olish
|
double sqrt(double x)
|
Kvadrat ildiz
|
double exp(double x)
|
Eksponenta
|
double pow(double x,
double y)
|
xy
|
double log(double x)
|
Natural logorifm
|
double log10(double x)
|
O‘nlik logorifm
|
double pi()
|
|
double cos(double x)
|
Kosinus
|
double sin(double x)
|
Sinus
|
double tan(double x)
|
Tangens
|
double acos(double x)
|
Arkkosinus
|
double asin(double x)
|
Arksinus
|
double atan(double x)
|
Arktangens
|
double atan2(double y,
double x)
|
Arktangensy/x
|
Satrlarni qayta ishlash
|
void print(string str)
|
Standart chiqish oqimiga chiqarish
|
int printf(string format,
mixed arg, ...)
|
Formatlangan chiqarish
|
string sprintf(
string format,
mixed arg, ...)
|
Satrni formatlashtirish
|
string addslashes(
string str)
|
Satrning sahifada "$", "\", "‘" va 0 simvollarni ekranlashtirish
|
string stripslashes(
string str)
|
Ekranlangan simvollarni o‘chirish
|
string chr(int ascii)
|
Berilgan kodli simvolni topish
|
int ord(string ch)
|
Simvolning kodi
|
string convert_cyr_string(
string str, string from,
string to)
|
Kiril yozuvidagi kodirovkadan boshqa kodirovkaga o‘zgartirish
|
void parse_str(string str)
|
So‘rov qatorini bo‘lish va tegishli o‘zgaruvchini yaratish
|
Massivlarni qayta ishlash
|
int count(mixed arr)
|
Massiv elementlarining soni
|
mixed current(array arr)
|
Massivning joriy elementi
|
mixed pos(array arr)
|
current taxallusi
|
array each(array arr)
|
arr elementi sifatida kalit/ma’lumot ko‘rinishida olish
|
mixed key(array arr)
|
Joriy massiv kalitini olish
|
mixed reset(array arr)
|
Massivning ichki ko‘rsatkichini massiv boshiga olib kelish
|
mixed prev(array arr)
|
Massiv ko‘rsatkichini oldingi elementga qo‘yish
|
mixed next(array arr)
|
Massiv ko‘rsatkichini keyingi elementga qo‘yish
|
mixed end(array arr)
|
Massivning ichki ko‘rsatkichini massiv ohiriga olib kelish
|
void sort(array arr)
|
Massivni saralash
|
void rsort(array arr)
|
Massivni teskari saralash
|
void asort(array arr)
|
assotsiativ massivini saralash
|
void arsort(array arr)
|
assotsiativ massivini teskari saralash
|
int ksort(array arr)
|
assotsiativ massivini kalitlar bo‘yicha saralash
|
Protseslar
|
string exec(
string command [,
array output [,
int return_code]]
)
|
UNIX qoplamida command komandasini bajarish. Standart chiqishga output qatorlar massiviga, qaytish kodi result_code o‘zgaruvchisiga yoziladi. Ohirgi chiqish oqimidagi qator chiqariladi.
|
string system(
string cmd [, int ret])
|
Komandani bajarish va natijani qaytarish
|
int chdir(string dir)
|
Joriy katalogni o‘zgartirish
|
void putenv(string str)
|
O‘zgaruvchi sohasini o‘zgartirish
|
string getenv(string var)
|
O‘zgaruvchi sohasining qiymatini olish
|
void sleep(int sec)
|
Joriy protsessni to‘xtatib turish
|
void usleep(int us)
|
Joriy protsessni to‘xtatib turish
|
int sem_get(int key
[, int max [, int perm]])
|
Semofor identifikatorini olish
|
int sem_acquire(int sem)
|
Semafor qiymatini kamaytirish
|
int sem_release(int sem)
|
Semafor qiymatini ko‘paytirish
|
Fayl va kataloglar
|
int copy(string src,
string dest)
|
Faylini ko‘chirish
|
int rename(string old,
string new)
|
Fayl nomini o‘zgartirish
|
int unlink(
string filename)
|
Faylini o‘chirish
|
int readfile(
strinf filename)
|
Tekst faylini standar chiqish oqimiga o‘qish
|
array file(string filename)
|
Test faylini qatorlar massiviga o‘qish
|
int filesize(
string filename)
|
Faylning o‘lchami
|
int file_exists(
string filename)
|
TRUE, agar fayl mavjud bo‘lsa
|
int fopen(string filename, string mode)
|
Faylni ochish
|
string fgetc(int fd)
|
Fayldagi simvolni o‘qish
|
string fgets(int fd,
int maxlen)
|
maxlen eng katta uzunlikka ega bo‘lgan qatorni fayldan o‘qib olish
|
int fputs(int fd, string str [, int length])
|
Satrni faylga yozish
|
string fread(int fp,
int len)
|
Fayldan binar o‘qish
|
int fwrite(int fd,
string str, int len)
|
Faylga binar yozish
|
int ftell(int fd)
|
Ko‘rsatkichning joriy holati
|
int fseek(int fd, int offset)
|
Faylning joriy ko‘rsatkichini o‘zgartirish
|
int rewind(int fd)
|
Faylning ko‘rsatkichini fayl boshiga ko‘chirish
|
int feof(int fd)
|
TRUE, fd diskriptor faylning ohirini ko‘rsatsa
|
int fclose(int fd)
|
Faylni yopish
|
int popen(
string command,
string mode)
|
command protsessorini ishqa tushurish va standart oqimning diskriptorini standart kirish yoki chiqish oqimiga qaytarish
|
int pclose(int fd)
|
Ochiq popen oqimni ochish yoki yopish
|
int mkdir(string dir,
int mode)
|
Direktoriyani yaratish
|
int rmdir(string dir)
|
Direktoriyani o‘chirish
|
int opendir(string dir)
|
Direktoriyani ochish
|
string readdir(int fd)
|
Katalogdagi keyingi faylning nomini olish
|
void rewinddir(int fd)
|
Ko‘rsatkichni katalogdagi birinchi faylga ko‘chirish
|
void closedir(int fd)
|
Direktoriyani yopish
|
void clearstatcache()
|
Fayl keshini tozalash
|
flush()
|
Standart chiqish buferini tozalash
|
int fsockopen(string host, int port)
|
Soketni ochish
|
Sana va vaqt
|
int time()
|
UNIX formatida joriy vaqtni olish
|
string date(string format, int timestamp)
|
Ko‘rsatilgan holatda lokal vaqtni, sanani qator ko‘rinishida olish
|
string gmdate(
string format,
int timestamp)
|
GMT formatidagi vaqtni UNIX formatiga o‘zgartirish
|
array getdate(
int timestamp)
|
Sana va kunni assotsiativ massivga o‘girish
|
int mktime(int hour,
int minute, int second,
int month, int day,
int year)
|
Sana va vaqt UNIX formatida
|
int gmmktime(int hour,
int minute, int second,
int month, int day,
int year)
|
GMT sana va vaqti UNIX formatida
|
TCP/IP, HTTP, CGI, PHP
|
string gethostbyname(
string host)
|
Xostning IP-manzilini olish
|
string gethostbyaddr(
string addr)
|
IP-adres yordami bilan xost nomini olish
|
int header(string hdr)
|
HTTP sarlavhasini jo‘natish
|
string htmlspecialchars(string str)
|
Maxsus HTML simvollarni str qatorlariga escape-ketmaketliglarida o‘zgartirish
|
int isset()
|
TRUE, agar o‘zgaruvchi aniqlangan bo‘lsa
|
void eval(string code)
|
“code”ni ichki senariy sifatiida qayta ishlash
|
void exit()
|
Joriy senariyni tugatish
|
int phpinfo()
|
PHPning joriy holati haqida ma’lunotni ekranga chiqarish
|
string phpversion()
|
PHPning joriy versiyasi haqida ma’lunotni ekranga chiqarish
|