Code Comments
Programming Forum and web based access to our favorite programming groups.Hi, I just encountered one problem with run-tests - it uses backticks to execute tests, like so: $out = `$cmd`; This is great for almost all situations. Unfortunately, in very rare cases, it is also necessary to test for return values. For instance, the shell-test command returns 1 or 0 - this is the only way to test its output (by design). Fortunately, by changing the code above to: ob_start(); system($cmd, $return_value); $out = ob_get_contents(); ob_end_clean(); it's possible to retrieve the return value and test based on it. Otherwise, I will have to somehow run a test-within-a-test, which would suck. My question is: are there any situations that anyone knows of where system() just doesn't measure up to the flexibility of shell_exec()? Greg
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.