$currentDateTime = new DateTime();
echo "Date: " . $currentDateTime->date; // Not displaying
echo "<br>";
echo "Time: " . $currentDateTime->timezone; // Not Displaying
echo "<br>";
------------------------------------------------------------------
$currentDateTime = new DateTime();
$dataArr = (array) $currentDateTime;
echo "Date1: " . $dataArr["date"]; // Displaying
echo "<br>";
echo "Time1: " . $dataArr["timezone"]; // Displaying
为什么我无法直接从对象访问日期和时区? 我正在使用php 5.3.13