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 (\TypeError $e) { 13 echo $e->getMessage(), "\n"; 14} 15?> 16--EXPECT-- 17preg_replace(): Argument #2 ($replacement) must be of type array|string, Closure given 18