|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-05-03 18:46 UTC] derick@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 22:00:02 2025 UTC |
Description: ------------ The DateInterval does not seem to expose its properties to var_dump().. Reproduce code: --------------- bjori@lohan:~$ cat test.php <?php $date = new DateTime("28-July-2008"); $other = new DateTime("31-July-2008"); $diff = date_diff($date, $other); var_dump($diff); echo $diff, "\n"; bjori@lohan:~$ ~/php/5.3/sapi/cli/php test.php object(DateInterval)#3 (0) { } Catchable fatal error: Object of class DateInterval could not be converted to string in /crypto/bjori/test.php on line 9 Expected result: ---------------- The properties to retrieve the actual difference.