Req #66900 [Opn->Sus]: Object initializers

From: Date: Thu, 21 Sep 2017 08:37:18 +0000
Subject: Req #66900 [Opn->Sus]: Object initializers
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-211291@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=66900&edit=1 ID: 66900 Updated by: cmb@php.net Reported by: eldmannen+php at gmail dot com Summary: Object initializers -Status: Open +Status: Suspended Type: Feature/Change Request Package: Scripting Engine problem PHP Version: Irrelevant Block user comment: N Private report: N New Comment: 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 do 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. Previous Comments: ------------------------------------------------------------------------ [2014-05-01 19:41:57] requinix@php.net Related To: Bug #67171 ------------------------------------------------------------------------ [2014-03-13 18:15:55] eldmannen+php at gmail dot com Description: ------------ Object initializers provides a more convenient way of initializing public fields and properties of an object. Test script: --------------- class Person { public $name; public $age; } $person = new Person { name = "John Doe", age = 39 }; print_r($person); Expected result: ---------------- Person Object ( [name] => John Doe [age] => 39 ) Actual result: -------------- Parse error: syntax error, unexpected '{' ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=66900&edit=1

« previous php.bugs (#211291) next »