PHP command line output buffer outputs regardless of buffer settings

后端 未结 3 1613
轮回少年
轮回少年 2021-02-08 19:28

I have some classes I am writing unit tests for which have echoes in them. I want to suppress this output and thought ob_start() and ob_clean() would s

3条回答
  •  無奈伤痛
    2021-02-08 20:04

    Do you have implicit_flush set to true in your PHP ini? This can cause the behaviour you are seeing as it tells PHP to tell the output layer to flush itself automatically after every output block. This is equivalent to calling the PHP function flush() after each and every call to print() or echo() and each and every HTML block.

提交回复
热议问题