The PHP version has a function in it that will check to make sure it is a valid file. So, the file would actually need to be a valid file. Next, as long as you are using the allowfile option to only allow certain filetypes, then this should safeguard against that as well on either version.
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.