function foo($year = date('Y')) {
// this is invalid
}So, how should do it?
define('THIS_YEAR', date('Y'));
function bar($year = THIS_YEAR) {
// this is valid
}function foo($year = date('Y')) {
// this is invalid
}So, how should do it?
define('THIS_YEAR', date('Y'));
function bar($year = THIS_YEAR) {
// this is valid
}