PHP 8.5.0 Beta 1 available for testing

Voting

: eight minus zero?
(Example: nine)

The Note You're Voting On

joelhy
16 years ago
Here is a easy way to grab STDERR and discard STDOUT:
add '2>&1 1> /dev/null' to the end of your shell command

For example:
<?php
$output
= shell_exec('ls file_not_exist 2>&1 1> /dev/null');
?>

<< Back to user notes page

To Top