no. $_FILES['newfilename']
is an array which contains several metadata about the uploaded file.
just go for the obvious one.
// save file name
$_SESSION['newfilename'] = $newfilename;
PS. unescaped _ is used in markdown for italic style, therefore you need to wrap your inline code in single backticks.