1--TEST--
2Bug #61115: Stream related segfault on fatal error in php_stream_context_del_link.
3--FILE--
4<?php
5
6$arrayLarge = array_fill(0, 113663, '*');
7
8$resourceFileTemp = fopen('php://temp', 'r+');
9stream_context_set_params($resourceFileTemp, array());
10try {
11    preg_replace('', function() {}, $resourceFileTemp);
12} catch (Error $e) {
13    echo $e->getMessage(), "\n";
14}
15?>
16--EXPECTF--
17Object of class Closure could not be converted to string
18