I have upgraded PHP from v5.3 to v5.4 and I am now getting the following error:
Strict standards: Only variables should be passed by reference
Code:
$filename = array_pop(explode("/", $_SERVER['SCRIPT_FILENAME']));
How to fix this?
I have upgraded PHP from v5.3 to v5.4 and I am now getting the following error:
Strict standards: Only variables should be passed by reference
Code:
$filename = array_pop(explode("/", $_SERVER['SCRIPT_FILENAME']));
How to fix this?
Breaking the code apart would resolve the error
$filename = explode("/", $_SERVER['SCRIPT_FILENAME']);
$filename = array_pop($filename);
echo $filename ;