|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2016-12-08 10:44 UTC] sjon at hortensius dot net
Description: ------------ I found another issue that was broken between RC6 and the final 7.1.0 release; this is probably broken by the fix for bug #69587 Test script: --------------- $dp = new DateInterval('P2Y3W3D'); var_dump(isset($dp->d, $dp['d'])); echo $dp->d; Expected result: ---------------- bool(true) 3 Actual result: -------------- Fatal error: Uncaught Error: Cannot use object of type DateInterval as array in /in/XQOQD:4 Stack trace: #0 {main} thrown in /in/XQOQD on line 4 Process exited with code 255. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 02 22:00:01 2025 UTC |
Maybe my test-script was too verbose; but are you saying array-access was broken intentionally? Why does this no longer work? $dp = new DateInterval('P2Y3W3D'); var_dump(isset($dp->d));Ignore code in above comment; I meant: $dp = new DateInterval('P2Y3W3D'); var_dump(isset($dp['d']));