Miscellaneous Functions
Program Execution Functions
escapeshellcmd(string command)
Escape shell metacharacters
int exec(string command [, array output [, int
return_value]])
Execute an external program
int passthru(string command [, int return_value])
Execute an external program and display raw output
int system(string command [, int return_value])
Execute an external program and display output
Random Number Functions
int getrandmax(void)
Return the maximum value a random number can have
int mt_getrandmax(void)
Return the maximum value a random number from Mersenne Twister can have
int mt_rand([int min, int max])
Return a random number from Mersenne Twister
void mt_srand(int seed)
Seed Mersenne Twister random number generator
int rand([int min, int max])
Return a random number
void srand(int seed)
Seed random number generator
Semaphore Functions
int sem_acquire(int id)
Acquire the semaphore with the given id, blocking if necessary
int sem_get(int key [, int max_acquire [, int
perm]])
Return an ID for the semaphore with the given key, and allow
max_acquire
(default 1) processes to acquire it simultaneouslyint sem_release(int id)
Release the semaphore with the given ID
Shared Memory Functions
int shm_attach(int key, int memsize, int perm)
Create or open a shared memory segment
int shm_detach(int shm_id)
Disconnect from shared memory segment
mixed shm_get_var(int id, int variable_key)
Return a variable from shared memory
int shm_put_var(int shm_id, int variable_key,
mixed variable)
Insert or updates a variable in shared ...
Get PHP Pocket Reference now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.