Home Email My Account ☎ 480-624-2500

PHP Warning: Use of undefined constant Y - assumed 'Y'

October 4, 2020

Error: PHP Warning:  Use of undefined constant Y - assumed 'Y' (this will throw an Error in a future version of PHP)

Cause: Warning occurs in PHP function like date(Y) where the string Y is not in enclosed with quotation marks.

Solution: Enclose string with single or double quotation marks.

Example: date('Y')