1--TEST-- 2Bug #76136: stream_socket_get_name should enclose IPv6 in brackets 3--SKIPIF-- 4<?php 5@stream_socket_client('tcp://[::1]:0', $errno); 6if ($errno != 111) { 7 die('skip IPv6 is not supported.'); 8} 9?> 10--FILE-- 11<?php 12$server = stream_socket_server("tcp://[::1]:1337/"); 13echo stream_socket_get_name($server, false).PHP_EOL; 14$server = stream_socket_server("tcp://127.0.0.1:1337/"); 15echo stream_socket_get_name($server, false); 16?> 17--EXPECT-- 18[::1]:1337 19127.0.0.1:1337 20