F.30. Program Execution
Function | Returns | Description |
---|---|---|
exec(string command [, array &output [, int &return_value]]) | string | Executes an external program. |
system(string command [, int &return_value]) | int | Executes an external program and displays output. |
passthru(string command [, int &return_value]) | void | Executes an external program and displays raw output. |
escapeshellcmd(string command) | string | Escapes shell metacharacters. |
escapeshellarg(string arg) | string | Quotes and escapes an argument for use in a shell command. |
shell_exec(string cmd) | string | Executes command via shell and returns complete output as string. |
proc_nice(int priority) | bool | Changes the priority of the current process. |
proc_terminate(resource process [, long signal]) | int | Kills a process opened by proc_open. |
proc_close(resource process) | int | Closes a process opened by proc_open. |
proc_get_status(resource process) | array | Gets information about a process opened by proc_open. |
proc_open(string command, array descriptorspec, array &pipes [, string cwd [, array env [, array other_options]]]) | resource | Runs a process with more control over its file descriptors. |
Get Web Standards Programmer's Reference: HTML, CSS, JavaScript®, Perl, Python®, and PHP 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.