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('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', 58380); 15$stream0 = socket_export_stream($sock0); 16leak_variable($stream0, true); 17 18$sock1 = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP); 19socket_bind($sock1, '0.0.0.0', 58381); 20$stream1 = socket_export_stream($sock1); 21leak_variable($sock1, true); 22 23echo "Done.\n"; 24--EXPECT-- 25Done. 26