php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #75694 Error in example code
Submitted: 2017-12-15 21:25 UTC Modified: 2017-12-15 21:36 UTC
From: gpedelagrabe at gmail dot com Assigned:
Status: Not a bug Package: Documentation problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: gpedelagrabe at gmail dot com
New email:
PHP Version: OS:

 

 [2017-12-15 21:25 UTC] 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


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-12-15 21:36 UTC] requinix@php.net
-Status: Open +Status: Not a bug
 [2017-12-15 21:36 UTC] requinix@php.net
No, "strict_types" is correct.
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Mon Sep 28 13:01:23 2020 UTC