|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2017-09-21 08:37 UTC] cmb@php.net
-Status: Open
+Status: Suspended
[2017-09-21 08:37 UTC] cmb@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 01 18:00:01 2025 UTC |
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 '{'