Doc #75694 [Opn->Nab]: Error in example code
| From: | requinix@php.net | Date: | Fri, 15 Dec 2017 21:36:01 +0000 |
| Subject: | Doc #75694 [Opn->Nab]: Error in example code | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-15288@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=75694&edit=1
ID: 75694
Updated by: requinix@php.net
Reported by: gpedelagrabe at gmail dot com
Summary: Error in example code
-Status: Open
+Status: Not a bug
Type: Documentation Problem
Package: Documentation problem
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
No, "strict_types" is correct.
Previous Comments:
------------------------------------------------------------------------
[2017-12-15 21:25:50] gpedelagrabe at gmail dot com
Description:
------------
---
From manual page: http://php.net/manual/en/functions.arguments.php#functions.arguments.type-declaration.strict
---
On this page Language Reference > Functions > Functions arguments
Example 10 :
Instead of
declare(strict_types=1);
it should be
declare(strict_type=1);
Test script:
---------------
declare(strict_types=1);
// will throw an exception
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=75694&edit=1