1
0
mirror of https://github.com/php/php-src.git synced 2026-03-31 20:53:00 +02:00
Files
archived-php-src/ext/sockets/tests/socket_export_stream-5.phpt
2016-05-02 17:08:15 +02:00

26 lines
613 B
PHP

--TEST--
socket_export_stream: effects of leaked handles
--SKIPIF--
<?php
if (!extension_loaded('sockets')) {
die('SKIP sockets extension not available.');
}
if (!function_exists('leak_variable'))
die('SKIP only for debug builds');
--FILE--
<?php
$sock0 = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
socket_bind($sock0, '0.0.0.0', 58380);
$stream0 = socket_export_stream($sock0);
leak_variable($stream0, true);
$sock1 = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
socket_bind($sock1, '0.0.0.0', 58381);
$stream1 = socket_export_stream($sock1);
leak_variable($sock1, true);
echo "Done.\n";
--EXPECT--
Done.