Edit report at https://bugs.php.net/bug.php?id=72775&edit=1
ID: 72775
Updated by: cmb@php.net
Reported by: fgheorghe at grosan dot co dot uk
Summary: C++ Style Method Overloading
-Status: Open
+Status: Closed
Type: Feature/Change Request
-Package: PHP Language Specification
+Package: *General Issues
PHP Version: Next Major Version
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
Duplicate of request #69961.
Previous Comments:
------------------------------------------------------------------------
[2016-08-07 13:56:14] fgheorghe at grosan dot co dot uk
Description:
------------
PHP made great progress by adding function return and parameter types. It would be great to push it
to a new level and allow for C++ style method overloading, to enable different types of
constructors, and function signatures.
Use cases:
Construct a class by a numeric id:
__construct(int $id)
Construct a class by a given string identifier:
__construct(string $name)
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=72775&edit=1