I have been writing PHP for about 10 years and I have no clue what you are asking or wanting. Can you give more about what you are wanting to do?
I would do where date is the shell command I want to run exec(escapeshellcmd('date', $result)); print "The result of the date command is " . $date ."\n";
These solution show the result AFTER the shell command has terminated. If he is asking to get partial results, this is not going to do it.