PHP函数不接受参数[关闭]

I'm currently experiencing a problem with a php function. I have declared a function:

    function edit_content($array, $id = NULL){
        //code
    }

Where $array is an array passed to the function and $id is an optional integer value. When I call the function for example like this:

edit_content($content_array, 2);

the value 2 doesn't get passed.

Why wouldn't the value not get passed? Does it have something to do with the array being passed?

The problem wasn't in the code after all but in cache. I forgot to clean the cache after changing the ajax call a bit and it resulted in calling the function under different condition (where ID is not passed because it is not needed.

Thank you for your help and I'm sorry for taking your time. Have a great day!