Posts Tagged ‘shell’

Enable/Disable command line buffering of php shell script

Monday, June 30th, 2008

// enable command line buffering
php -doutput_buffering=1 console_app.php
// disable command line buffering
php -doutput_buffering=0 console_app.php
// console_app.php code
<?php
for ( $i=1; $i<=100;$i++)
{
print “$i]hin”;
sleep( 1 );
}
?>