I get strange results with that test....
Output of microtime 0.063
Command Line (php buffer.php):
Output of microtime 0.576
Command Line (php buffer.php > test.out):
Output of microtime 0.01
wget (wget http://localhost/buffer.php | cat buffer.php):
Output of microtime 0.032
Command line is 9 times slower (probably because it is using stdout)!
I'm still not convinced that what you say is happening, is truly happening... so I found that if you put %D in your apache LogFormat, it tells you how long the request took in microseconds! COOL!
So let's see what apache says for wget http://localhost/buffer.php:
Output from cat buffer.php: 0.031
Output from tail access.log (microseconds in bold):
::1 - - [07/Oct/2013:19:37:48 -0400] "GET /buffer.php HTTP/1.1" 200 6291739 "-" "Wget/1.13.4 (linux-gnu)" 0/56520
Seems the request via apache far exceeds what PHP states and more so lines up with php from the command line.
Okay, let's increase this:
$str = str_repeat('A ', 10*1024*1024);
php from the command line (stdout): 1.898
php from the command line (to file): 0.032 (time php buffer.php > test.out reports 0.260)
apache access.log: ::1 - - [07/Oct/2013:19:42:19 -0400] "GET /buffer.php HTTP/1.1" 200 20971804 "-" "Wget/1.13.4 (linux-gnu)" 0/108153
browser (Chrome): 0.217
apache access.log: ::1 - - [07/Oct/2013:19:43:16 -0400] "GET /buffer.php HTTP/1.1" 200 20703 "http://localhost:12710/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.76 Safari/537.36" 0/237888
As you can see, Apache, wget, and the command line all have additional overhead. The command line actually has the overhead "built in", which is strange and it has a bit more overhead when using time php buffer.php; but it literally is 1.853 versus 1.941 so it is hardly measurable. I still believe this to be due to using stdout (which my data seems to support).
Nonetheless, I still think you are not seeing anything from apache in your time output. I just can't fathom a scripting language knowing when apache is working or apache halting/pausing the script execution whilst it feeds a partial buffer output to the user. That just doesn't make sense.