私は、次のPHPコードを実行すると:PHPの日付時刻オブジェクト形式
$this_year_start = strtotime(new DateTime("first day of this year")->format('d/m/Y'));
$this_year_end = strtotime(new DateTime("last day of this year")->format('d/m/Y'));
を私は次のエラーを取得する:
PHP Parse error: syntax error, unexpected '->' (T_OBJECT_OPERATOR) in /home/admin/data.php on line 164
私は今年のスタートのUNIX時刻を取得したいです今年の終わりです。しかし、これはいくつかの問題のフォーマットを持ち、それをUNIX時間に変換するようです。
が、私はそれを疑います"今年の最初の日"が議論として受け入れられます。 – fusion3k