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
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: 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

Pull Requests

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: Sun Dec 22 11:01:30 2024 UTC