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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
36 + 3 = ?
Subscribe to this entry?

 
 [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: Tue May 07 18:01:31 2024 UTC