php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #80707 function parameter ?t $v not described
Submitted: 2021-02-03 23:35 UTC Modified: 2021-02-04 14:16 UTC
From: Bernhard dot Stauss at Clareon dot de Assigned:
Status: Open 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: Bernhard dot Stauss at Clareon dot de
New email:
PHP Version: OS:

 

 [2021-02-03 23:35 UTC] Bernhard dot Stauss at Clareon dot de
Description:
------------
---
From manual page: https://php.net/functions.arguments
---
The manual page says no single word about function parameters declared as

   ?<type> $<param-name>

where <type> is the data type of the parameter 
and <param-name> is the name of the parameter.

What is the meaning of such a parameter declaration?


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2021-02-04 11:16 UTC] cmb@php.net
I think we should overhaul the "How to read a function definition"
section[1].

[1] <https://www.php.net/manual/en/about.prototypes.php>
 [2021-02-04 14:16 UTC] Bernhard dot Stauss at Clareon dot de
First: Thank you for the hint to nullable type. 

Second: The doc is good to get a help, if you are a more or less experienced php-developper and have a specific question. The doc may not be intended to be read in the given sequence.
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Tue Apr 13 13:01:24 2021 UTC