php-src/tests/output/ob_010.phpt
Nikita Popov 1b29e0cacd Switch zend_print_zval_r to use smart_str
Instead of directly writing to stdout. This allows doing a print_r
into a string, without using output buffering.

The motivation for this is bug #67467: print_r() in return mode
will still dump the string to stdout (causing a potential information
leak) if a fatal error occurs.
2016-06-13 18:04:22 +02:00

14 lines
147 B
PHP

--TEST--
output buffering - fatalism
--FILE--
<?php
function obh($s)
{
return print_r($s, 1);
}
ob_start("obh");
echo "foo\n";
?>
--EXPECTF--
foo