1
0

More than 1 year has passed since last update.

関数を定義する際にデフォルト値を引数に渡していれば呼び出す際に引数を渡さなくとも渡したデフォルト値が返ってくる。
-->試しにdate()関数から得られる月、日、曜日を渡そうとしたが、エラー。

PHPマニュアル曰く、デフォルト値は定数式でなければならないとのことだったので今後忘れないように気を付ける。
https://www.php.net/manual/ja/functions.arguments.php#functions.arguments.default

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0