php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #74024 Nullable types aren't documented, except in the migration guide
Submitted: 2017-01-31 15:55 UTC Modified: 2021-01-13 13:06 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: mat at zerifas dot com Assigned: cmb (profile)
Status: Closed Package: Scripting Engine problem
PHP Version: 7.1.1 OS: N/A
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: mat at zerifas dot com
New email:
PHP Version: OS:

 

 [2017-01-31 15:55 UTC] mat at zerifas dot com
Description:
------------
First I looked here php.net/manual/en/language.oop5.typehinting.php which links to here php.net/manual/en/functions.arguments.php#functions.arguments.type-declaration

The only mention of nullable is using the old syntax: php.net/manual/en/functions.arguments.php#example-140

There's nothing on the return types page either: php.net/manual/en/functions.returning-values.php

Finally, I looked at the Types page, but nothing there either php.net/manual/en/language.types.php

I eventually found what I was looking for in the new features part of the migration guide, but feel it should be in the main docs too: php.net/manual/en/migration71.new-features.php


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-10-05 10:23 UTC] requinix@php.net
-Status: Open +Status: Verified -Package: Documentation problem +Package: Scripting Engine problem
 [2017-10-05 10:23 UTC] requinix@php.net
This is particularly important for the arguments page as a nullable type is the only way to get a null value into a typed variadic list - see doc bug #74024.
 [2017-10-05 10:24 UTC] requinix@php.net
*bug #75312
 [2017-10-07 12:56 UTC] mat at zerifas dot com
-Package: Documentation problem
+Package: Scripting Engine problem

This seems an odd choice – what's the reasoning?
 [2017-10-07 13:54 UTC] requinix@php.net
It's more helpful than saying it's a documentation problem in the documentation package.
 [2021-01-13 13:06 UTC] cmb@php.net
-Status: Verified +Status: Closed -Assigned To: +Assigned To: cmb
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 04:01:29 2024 UTC