passthru

void passthru(string cmd, [variable $return_value]) 

Executes command cmd in the system’s command interpreter and displays the output.An optional argument allows the return value to be captured.

Returns:

Nothing

Description:

passthru() attempts to execute cmd in the system’s command interpreter. PHP waits until the command interpreter returns before execution of the PHP script continues past the call to passthru(). If you’re using a UNIX-like operating system, you can redirect stdout to a file or /dev/null to avoid this.

Caution:

Some Windows command interpreters allow redirection to a special device, nul. As of PHP 4.0.7, redirecting the output of a command executed by passthru() to nul (that is, dir > nul) has no effect—even though ...

Get PHP Functions Essential 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.