note 59231 deleted from function.exec by cmb
| From: | cmb@php.net | Date: | Sun, 22 Sep 2019 07:20:53 +0000 |
| Subject: | note 59231 deleted from function.exec by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-212277@lists.php.net to get a copy of this message | ||
Note Submitter: simoncpu
----
Sometimes, it is convenient to let exec() return the status of the executed command, rather than
return the last line from the result of that command. In Unix, just do:
$ret = exec('foo; echo $?');
Remember not to overdo it though. ;)
[ simon.cpu ]