1. Home
  2. Docs
  3. PHP Style Guide
  4. Default Function Arguments

Default Function Arguments

Whenever appropriate, provide function argument defaults, which helps prevent PHP errors with mistaken calls and provides common fallback values which can save a few lines of code. Example:

Was this article helpful to you? Yes No

How can we help?