|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2020-04-14 16:54 UTC] david at grudl dot com
-Package: Output Control
+Package: Scripting Engine problem
[2020-04-14 16:54 UTC] david at grudl dot com
[2020-04-15 07:52 UTC] nikic@php.net
-Status: Open
+Status: Verified
[2020-04-15 09:22 UTC] nikic@php.net
[2020-04-15 09:22 UTC] nikic@php.net
-Status: Verified
+Status: Closed
[2020-04-15 16:53 UTC] david at grudl dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 12:00:01 2025 UTC |
Description: ------------ See the code below. It should print 'default value', but when I'll create property $obj->{1}, it prints 'new value'. This affects PHP >= 7.2 https://3v4l.org/S5tJV and objects where property key is integer. Test script: --------------- <?php class Test { public $prop = 'default value'; } $obj = new Test; // $obj->{1} = null; $arr = (array) $obj; $arr['prop'] = 'new value'; echo $obj->prop;