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