summaryrefslogtreecommitdiff
path: root/ext/spl/tests/bug77751.phpt
blob: 23855c6f1b4037c05f59f97763fce58f3ceacf0b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
--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.