php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #71268 Adding variable type key words: variant, object, void
Submitted: 2016-01-03 17:21 UTC Modified: 2016-01-04 01:02 UTC
From: furun at arcor dot de Assigned:
Status: Wont fix Package: Variables related
PHP Version: 7.0.1 OS: Win7 XAMPP
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: furun at arcor dot de
New email:
PHP Version: OS:

 

 [2016-01-03 17:21 UTC] furun at arcor dot de
Description:
------------
It would improve explicitly to add the key words 
"variant" (for function parameter/return variable type, for any type),
"object" (for function parameter/return variable type),
"void" (for function return variable type)

function Example (variant var1) : void {
	return;
}



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-01-04 01:02 UTC] requinix@php.net
-Status: Open +Status: Wont fix -Package: *Programming Data Structures +Package: Variables related
 [2016-01-04 01:02 UTC] requinix@php.net
"variant" is the same as not using a hint.
"object" doesn't say much: have a class/interface hint or don't use one at all.
"void" was added in 7.1. https://wiki.php.net/rfc/void_return_type
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 20:01:29 2024 UTC