1--TEST--
2Bug #20134 (UDP reads from invalid ports)
3--FILE--
4<?php
5# vim600:syn=php:
6$fp = fsockopen("udp://localhost", 65534, $errno, $errstr);
7if (!$fp) {
8	/* UDP will never cause a connection error, as it is
9	 * a connection-LESS protocol */
10    echo "ERROR: $errno - $errstr<br>\n";
11}
12else {
13	/* Likewise, writes will always appear to succeed */
14    $x = fwrite($fp,"\n");
15	var_dump($x);
16	/* But reads should always fail */
17    $content = fread($fp, 40);
18	var_dump($content);
19    fclose($fp);
20}
21?>
22--EXPECT--
23int(1)
24string(0) ""
25