Support of the $suffix parameter has changed between PHP4 and PHP5:
in PHP4, $suffix is removed first, and then the core basename is applied.
conversely, in PHP5, $suffix is removed AFTER applying core basename.
$file = "path/to/file.xml#xpointer(/Texture)";
echo basename($file, ".xml#xpointer(/Texture)");
Result in PHP4: file
Result in PHP5: Texture)