请有人告诉我为什么 mktime 在课堂上给出错误?
<?php
$time_Stamp = mktime(6,30,0);
echo strftime("%H:%M",$time_Stamp);
?>
报告 6:30
<?php
class Test_Time{
private $time_Stamp = mktime(6,30,0);
}
?>
报告 Parse error: syntax error, unexpected '(', expecting ',' or ';' in C:\Program Files (x86)\Ampps\www\sandbox\general\mktime.php 第 5 行