cvs: phpdoc /en/reference/sockets/functions socket-select.xml
| From: | Derick Rethans | Date: | Wed, 14 May 2003 14:44:18 +0000 |
| Subject: | cvs: phpdoc /en/reference/sockets/functions socket-select.xml | ||
| Groups: | php.doc | ||
| Request: | Send a blank email to phpdoc+get-969353457@lists.php.net to get a copy of this message | ||
derick Wed May 14 10:44:18 2003 EDT
Modified files:
/phpdoc/en/reference/sockets/functions socket-select.xml
Log:
- Fixed example code (and shortened a bit)
Index: phpdoc/en/reference/sockets/functions/socket-select.xml
diff -u phpdoc/en/reference/sockets/functions/socket-select.xml:1.7
phpdoc/en/reference/sockets/functions/socket-select.xml:1.8
--- phpdoc/en/reference/sockets/functions/socket-select.xml:1.7 Sat Jun 1 23:51:10 2002
+++ phpdoc/en/reference/sockets/functions/socket-select.xml Wed May 14 10:44:18 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.7 $ -->
+<!-- $Revision: 1.8 $ -->
<!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 -->
<refentry id="function.socket-select">
<refnamediv>
@@ -59,9 +59,11 @@
/* Prepare the read array */
$read = array($socket1, $socket2);
-if (false === ($num_changed_sockets = socket_select($read, $write = NULL, $except = NULL, 0))) {
+$num_changed_sockets = socket_select($read, $write = NULL, $except = NULL, 0);
+
+if ($num_changed_sockets === false) {
/* Error handling */
-else if ($num_changed_sockets > 0) {
+} else if ($num_changed_sockets > 0) {
/* At least at one of the sockets something interesting happened */
}
]]>
@@ -106,7 +108,8 @@
<programlisting role="php">
<![CDATA[
if (false === socket_select($r, $w, $e = NULL, 0)) {
- echo "socket_select() failed, reason: " . socket_strerror(socket_last_error()) .
"\n";
+ echo "socket_select() failed, reason: " .
+ socket_strerror(socket_last_error()) . "\n";
}
]]>
</programlisting>