1--TEST--
2socket_export_stream: effects of leaked handles
3--SKIPIF--
4<?php
5if (!extension_loaded('sockets')) {
6    die('SKIP sockets extension not available.');
7}
8if (!function_exists('zend_leak_variable'))
9    die('SKIP only for debug builds');
10?>
11--INI--
12report_memleaks=0
13--FILE--
14<?php
15
16$sock0 = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
17socket_bind($sock0, '0.0.0.0', 0);
18$stream0 = socket_export_stream($sock0);
19zend_leak_variable($stream0);
20
21$sock1 = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
22socket_bind($sock1, '0.0.0.0', 0);
23$stream1 = socket_export_stream($sock1);
24zend_leak_variable($sock1);
25
26echo "Done.\n";
27?>
28--EXPECT--
29Done.
30