【发布时间】:2013-07-23 13:55:03
【问题描述】:
$now = new DateTime();
print_r($now);
print $now->date; // print the current date
但是如果 print_r($now);评论是否显示错误?
$now = new DateTime();
print $now->date; // Notice: Undefined property: DateTime::$date in
【问题讨论】:
-
成员函数/属性DateTime中没有定义
date -
请不要使用无证属性,否则会发生坏事。
标签: php