|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #72775 C++ Style Method Overloading
Submitted: 2016-08-07 13:56 UTC Modified: 2016-08-07 14:13 UTC
From: fgheorghe at grosan dot co dot uk Assigned: cmb (profile)
Status: Duplicate Package: *General Issues
PHP Version: Next Major Version OS:
Private report: No CVE-ID: None
 [2016-08-07 13:56 UTC] fgheorghe at grosan dot co dot uk
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)


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2016-08-07 14:07 UTC]
-Status: Open +Status: Closed -Package: PHP Language Specification +Package: *General Issues -Assigned To: +Assigned To: cmb
 [2016-08-07 14:07 UTC]
Duplicate of request #69961.
 [2016-08-07 14:13 UTC]
-Status: Closed +Status: Duplicate
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Thu Jan 21 18:01:23 2021 UTC