summaryrefslogtreecommitdiff
path: root/ext/spl/tests/bug77751.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/spl/tests/bug77751.phpt')
-rw-r--r--ext/spl/tests/bug77751.phpt18
1 files changed, 18 insertions, 0 deletions
diff --git a/ext/spl/tests/bug77751.phpt b/ext/spl/tests/bug77751.phpt
new file mode 100644
index 0000000000..23855c6f1b
--- /dev/null
+++ b/ext/spl/tests/bug77751.phpt
@@ -0,0 +1,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.