mirror of
https://github.com/php/php-src.git
synced 2024-09-23 10:57:26 +00:00
4f03401628
This avoids the segfault, but it will not make writing to the SplFileObject during output shutdown work.
19 lines
304 B
PHP
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.
|