PHP Program Execution Functions

EditRocket provides the following information on Program Execution functions in the PHP source code builder.

string escapeshellarg ( string $arg ) - escapeshellarg() adds single quotes around a string and quotes/escapes any existing single quotes allowing you to pass a string directly to a shell function and having it be treated as a single safe argument. This function should be used to escape individual arguments to shell functions coming from user input.

string escapeshellcmd ( string $command ) - escapeshellcmd() escapes any characters in a string that might be used to trick a shell command into executing arbitrary commands.

string exec ( string $command [, array &$output [, int &$return_var ]] ) - exec() executes the given command.

void passthru ( string $command [, int &$return_var ] ) -

int proc_close ( resource $process ) -

array proc_get_status ( resource $process ) -

bool proc_nice ( int $increment ) - proc_nice() changes the priority of the current process by the amount specified in increment. A positive increment will lower the priority of the current process, whereas a negative increment will raise the priority.

resource proc_open ( string $cmd , array $descriptorspec , array &$pipes [, string $cwd [, array $env [, array $other_options ]]] ) -

bool proc_terminate ( resource $process [, int $signal ] ) -

string shell_exec ( string $cmd ) -

string system ( string $command [, int &$return_var ] ) - system() is just like the C version of the function in that it executes the given command and outputs the result.