php-src/ext/sockets/tests/socket_export_stream-5.phpt
Nikita Popov 892421c9a8 Make some zend_test dependencies explicit
Rather than checking that specific functions exist.
2021-06-14 15:40:34 +02:00

25 lines
488 B
PHP

--TEST--
socket_export_stream: effects of leaked handles
--EXTENSIONS--
sockets
zend_test
--INI--
report_memleaks=0
--FILE--
<?php
$sock0 = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
socket_bind($sock0, '0.0.0.0', 0);
$stream0 = socket_export_stream($sock0);
zend_leak_variable($stream0);
$sock1 = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
socket_bind($sock1, '0.0.0.0', 0);
$stream1 = socket_export_stream($sock1);
zend_leak_variable($sock1);
echo "Done.\n";
?>
--EXPECT--
Done.