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