how to pass current year as default argument in php function

Viewed 10582

I want to pass the current Year as one of the default value of a function

I AM using

date("Y")

for current year

So it work fine when i write function in this way:

function MYfUNCTION($month,$year = 2013)
{
}

But I want to pass current year instead of 2013 but it gives me an error when i write like this

function MYfUNCTION($month,$year = date("Y"))
{
}

Please help me

3 Answers
Related