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--FILE-- 11<?php 12 13$sock0 = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP); 14socket_bind($sock0, '0.0.0.0', 0); 15$stream0 = socket_export_stream($sock0); 16zend_leak_variable($stream0); 17 18$sock1 = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP); 19socket_bind($sock1, '0.0.0.0', 0); 20$stream1 = socket_export_stream($sock1); 21zend_leak_variable($sock1); 22 23echo "Done.\n"; 24--EXPECT-- 25Done. 26