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
 [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-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 07:01:32 2024 UTC