1--TEST-- 2GH-10885: stream_socket_server context leaks 3--FILE-- 4<?php 5$context = stream_context_create(); 6debug_zval_dump($context); 7$server = @\stream_socket_server( 8 'tcp://127.0.0.1:0', 9 $errno, 10 $errstr, 11 \STREAM_SERVER_BIND | \STREAM_SERVER_LISTEN, 12 $context, 13); 14debug_zval_dump($context); 15fclose($server); 16unset($server); 17debug_zval_dump($context); 18?> 19--EXPECTF-- 20resource(%d) of type (stream-context) refcount(2) 21resource(%d) of type (stream-context) refcount(3) 22resource(%d) of type (stream-context) refcount(2) 23