php-src/ext/spl/tests/bug77751.phpt
Nikita Popov 4f03401628 Partial fix for bug #77751
This avoids the segfault, but it will not make writing to the
SplFileObject during output shutdown work.
2019-03-18 11:06:23 +01:00

19 lines
304 B
PHP

--TEST--
Bug #77751: Writing to SplFileObject in ob_start gives segfault
--FILE--
<?php
echo "No crash.\n";
$logfile = new SplTempFileObject();
ob_start(function ($buffer) use ($logfile) {
$logfile->fwrite($buffer);
$logfile->fflush();
return "";
});
echo "hmm\n";
?>
--EXPECT--
No crash.