PHP exec() + stderr, stdout, & return code

Reply to comment

`tee' might be what you're looking for.