|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2015-08-18 11:47 UTC] cmb@php.net
-Status: Open
+Status: Duplicate
-Assigned To:
+Assigned To: cmb
[2015-08-18 11:47 UTC] cmb@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Nov 18 16:00:01 2025 UTC |
Description: ------------ Upon calling var_dump() or array_key_exists() on a \DateTime object, it will receive new public properties not accessible before. Test script: --------------- $object = new DateTime(); array_key_exists("test",$object); var_dump($object->date); Expected result: ---------------- The result should be the same regardless of the arbitrary calls ( probably fields should not exist at all ) Actual result: -------------- For the code using array_key_exists/var_dump, we receive a string from the public field. Otherwise we receive a warning.