PHPめも

PHPで作成したWEBアプリで未来や過去の日時に変更して動作確認したいことは結構あります。

dateコマンドを使う

Carbonを使う

https://carbon.nesbot.com/docs/#api-testing

Chronosを使う

https://book.cakephp.org/chronos/2/ja/index.html#id11

php-timecopを使う

https://pecl.php.net/package/timecop

https://github.com/hnw/php-timecop

https://github.com/kiddivouchers/php-timecop


トップ   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS