First off, it depends on quite a few things... But this is how I do it and requires some prerequisites.
1. Should work on Windows/Linux/Mac
2. Install ClamAV
3. Make sure FreshClam is working and running
4. Read up on your version of ClamAV's command line arguments and how to call it from within PHP
5. In your PHP script, first make sure the file was successfully uploaded to the TMP directory (wherever that is on your system).
6. In your PHP script, run ClamAV on the uploaded file and have ClamAV delete it if it's a nasty file. Probably using proc_open, system, etc.
7. Check that the uploaded file still exists
8. If it doesn't, ClamAV found a virus and deleted it and you can output some nasty message to the virus uploader (if you wanted to).
This way, you don't have to worry about getting a response back from your antivirus program in order to tell if it was a virus or not. Whether or not the file was deleted or not will tell you if it was a virus.
Hope that helps!
Chrelad