Doc #61894 [Asn->Csd]: Missed part of echo in example
Edit report at https://bugs.php.net/bug.php?id=61894&edit=1
ID: 61894
Updated by: preinheimer@php.net
Reported by: iliavlad at mail dot ru
Summary: Missed part of echo in example
-Status: Assigned
+Status: Closed
Type: Documentation Problem
Package: Documentation problem
PHP Version: Irrelevant
Assigned To: preinheimer
Block user comment: N
Private report: N
New Comment:
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.
Thank you for the report, and for helping us make our documentation better.
resolved in commit 325538
I went with 123 bytes as that's what running the code gave me (ignoring the fact that the rest
was different, They're now redirecting example.com elsewhere.)
Previous Comments:
------------------------------------------------------------------------
[2012-05-04 19:35:49] preinheimer@php.net
Automatic comment from SVN on behalf of preinheimer
Revision: http://svn.php.net/viewvc/?view=revision&revision=325538
Log: Adding missing text to code output, as per Doc Bug #61894
------------------------------------------------------------------------
[2012-05-02 05:20:41] iliavlad at mail dot ru
Description:
------------
Missed part of echo in example
---
From manual page: http://www.php.net/function.socket-recv#refsect1-function.socket-recv-examples
---
Test script:
---------------
echo "Reading response:\n\n";
$buf = 'This is my buffer.';
if (false !== ($bytes = socket_recv($socket, $buf, 2048, MSG_WAITALL))) {
echo "Read $bytes bytes from socket_recv(). Closing socket...";
} else {
echo "socket_recv() failed; reason: " . socket_strerror(socket_last_error($socket)) .
"\n";
}
socket_close($socket);
echo $buf . "\n";
Expected result:
----------------
Reading response:
Read 999 bytes from socket_recv().Closing socket...HTTP/1.1 200 OK
...
Content-Type: text/html; charset=UTF-8
OK.
Actual result:
--------------
Reading response:
Closing socket...HTTP/1.1 200 OK
...
Content-Type: text/html; charset=UTF-8
OK.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=61894&edit=1
Thread (2 messages)