Description
The following code:
<?php
echo 'x';
ob_end_flush();
flush();
// header('test: test');
http_response_code(301);
Resulted in this output:
But I expected this output instead:
x
Warning: Cannot modify response code - headers already sent by (output started at ....php:12) in ...
I would expect about the same warning as header() emit. In the repro above, I have verified header(string) emits a warning, but http_response_code(number) currently does not.
PHP Version
any
Operating System
any