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
Have you experienced this issue?
Rate the importance of this bug to you:

 [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-2021 The PHP Group
All rights reserved.
Last updated: Sat Sep 25 22:03:39 2021 UTC