Doc #55165 [Opn->Wfx]: Additional equal sign, misleading.
| From: | aharvey@php.net | Date: | Mon, 11 Jul 2011 15:04:54 +0000 |
| Subject: | Doc #55165 [Opn->Wfx]: Additional equal sign, misleading. | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-6858@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=55165&edit=1
ID: 55165
Updated by: aharvey@php.net
Reported by: tamate at hotmail dot com
Summary: Additional equal sign, misleading.
-Status: Open
+Status: Wont fix
Type: Documentation Problem
Package: Documentation problem
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
Looks fine to me: socket_create() returns boolean false on error.
Previous Comments:
------------------------------------------------------------------------
[2011-07-09 09:55:43] tamate at hotmail dot com
Description:
------------
---
From manual page: http://www.php.net/function.socket-last-error%23Examples
---
Additional equal sign.
Test script:
---------------
Should be
if ($fp == false) {
$errorcode = socket_last_error();
$errormsg = socket_strerror($errorcode);
die("Couldn't create socket: [$errorcode] $errormsg");
}
and not
if ($fp === false) {
$errorcode = socket_last_error();
$errormsg = socket_strerror($errorcode);
die("Couldn't create socket: [$errorcode] $errormsg");
}
Expected result:
----------------
Using the old code, no error will be found, and thus, no error will be shown.
Actual result:
--------------
If $fp fails, error code with error message will be displayed.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=55165&edit=1