xref: /php-src/ext/spl/tests/bug77751.phpt (revision 4f034016)
1--TEST--
2Bug #77751: Writing to SplFileObject in ob_start gives segfault
3--FILE--
4<?php
5
6echo "No crash.\n";
7
8$logfile = new SplTempFileObject();
9ob_start(function ($buffer) use ($logfile) {
10    $logfile->fwrite($buffer);
11    $logfile->fflush();
12    return "";
13});
14echo "hmm\n";
15
16?>
17--EXPECT--
18No crash.
19