On Thu, Jul 17, 2008 at 8:19 AM, werdna@svn.wikimedia.org wrote:
$h = popen( $cmd, 'r' );
$diff = '';
do {
$data = fread( $h, 8192 );
if ( strlen( $data ) == 0 ) {
break;
}
$diff .= $data;
} while ( true );
// Clean up
pclose( $h );
. . .
$diff_lines = explode( "\n", $diff );
Couldn't all this be replaced with the following?
$diff_lines = array(); exec( $cmd, $diff_lines );