php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #71031 Ability to use return value when instantiating
Submitted: 2015-12-04 19:04 UTC Modified: 2017-08-05 04:46 UTC
From: love at sickpeople dot se Assigned:
Status: Suspended Package: Scripting Engine problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2015-12-04 19:04 UTC] love at sickpeople dot se
Description:
------------
Along the lines of using foo ()['bar'] etc - it would be handy to use the return value of a function when instantiating a class. Please see test script.

Test script:
---------------
class A {}

$a = new A ();

$b = new get_class ($a) ();


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-12-06 21:56 UTC] stas@php.net
-Type: Bug +Type: Feature/Change Request -Package: PHP Language Specification +Package: Scripting Engine problem
 [2017-08-05 04:46 UTC] stas@php.net
-Status: Open +Status: Suspended
 [2017-08-05 04:46 UTC] stas@php.net
Thank you for your interest in PHP and for submitting a feature request. Please be aware that due to the magnitude of change this request requires, it would be necessary to discuss it on PHP Internals list (internals@lists.php.net) as an RFC. Please read the guide about creating RFCs here:
https://wiki.php.net/rfc/howto
If you haven't had experience with writing RFCs before, it is advised to seek guidance on the Internals list (http://php.net/mailing-lists.php) and/or solicit help from one of the experienced developers. 

Please to not consider this comment as a negative view on the merits of your proposal - every proposal which requires changes of certain magnitude, even the very successful and widely supported ones, must be done through the RFC process. This helps make the process predictable, transparent and accessible to all developers.
 
PHP Copyright © 2001-2017 The PHP Group
All rights reserved.
Last updated: Sun Nov 19 01:31:42 2017 UTC