note 95262 rejected from function.stream-socket-server by danbrown

From: Date: Tue, 22 Dec 2009 18:59:45 +0000
Subject: note 95262 rejected from function.stream-socket-server by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-164253@lists.php.net to get a copy of this message
Note Submitter: mubinicyer at gmail dot com ---- In the last line of the UDP Server example there is an error: <?php $socket = stream_socket_server("udp://127.0.0.1:1113", $errno, $errstr, STREAM_SERVER_BIND); if (!$socket) { die("$errstr ($errno)"); } do { $pkt = stream_socket_recvfrom($socket, 1, 0, $peer); echo "$peer\n"; stream_socket_sendto($socket, date("D M j H:i:s Y\r\n"), 0, $peer); } while ($pkt !== false); // it must be while ($pkt != false); ?> The statement while ($pkt !== false); must be while ($pkt != false);

« previous php.notes (#164253) next »