php-src/Zend/tests/output_started_at_eval.phpt
Nikita Popov 97202d9d84 Make sure output start filename is not freed early
As filenames are no longer interned, we need to keep a reference
to the zend_string to make sure it isn't freed.

To avoid a nominal source compatibility break, create a new member
in the globals.
2020-10-16 17:27:52 +02:00

12 lines
239 B
PHP

--TEST--
Output start at eval()
--FILE--
<?php
eval('echo "Foo\n";');
header('Foo: Bar');
?>
--EXPECTF--
Foo
Warning: Cannot modify header information - headers already sent by (output started at %s(2) : eval()'d code:1) in %s on line %d