Voting

: min(three, one)?
(Example: nine)

The Note You're Voting On

wally at soggysoftware dot co dot uk
12 years ago
As others have noted, shell_exec and the backtick operator (`) both return NULL if the executed command doesn't output anything.

This can be worked around by doing anything like the following:

shell_exec ("silentcmd && echo ' '");

Here we're simply outputting blank whitespace if the command succeeds - which satisfies this slightly strange issue. From there, you can trim() the command output etc.

<< Back to user notes page

To Top