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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Sat Jul 12 13:01:33 2025 UTC