Bug #49382 [Asn]: can't access DateTime->date
| From: | derick@php.net | Date: | Sun, 07 Mar 2010 19:22:06 +0000 |
| Subject: | Bug #49382 [Asn]: can't access DateTime->date | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-148370@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=49382&edit=1
ID: 49382
Updated by: derick@php.net
Reported by: klawd at kamundo dot de
Summary: can't access DateTime->date
Status: Assigned
Type: Bug
-Package: Date/time related
+Package: Feature/Change Request
Operating System: Debian GNU/Linux 5.0
PHP Version: 5.3.0
Assigned To: derick
New Comment:
->date being available is actually a side-effect of support for
var_dump() here. I'll mark this as a feature request as it was not
intended to work.
Previous Comments:
------------------------------------------------------------------------
[2009-08-27 07:52:37] klawd at kamundo dot de
Description:
------------
Can not access property date of DateTime.
Reproduce code:
---------------
$dt=new DateTime('1742-05-23 00:00:00'); echo $dt->date;
gets me Notice: Undefined property: DateTime::$date
strangely though, this works:
$dt=new DateTime('1742-05-23 00:00:00'); print_r($dt); echo $dt->date;
DateTime Object ( [date] => 1742-05-23 00:00:00 [timezone_type] => 3
[timezone] => UTC ) 1742-05-23 00:00:00
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=49382&edit=1