This is a loaded question...
- Do you mean, "how do I read a barcode from an image?"
or
- "How do I read a barcode from a barcode gun or wand, into my PHP driven website?"
If its #1, then you're sort of on your own with doing OCR research. There might be some libraries out there to do it, but I doubt they'll be open source and free.
If its #2, then usually you, as a web (or software) developer, do not have to do anything. Typically, the gun/wand has its interface to the computer and if need be, they're own drivers. The drivers interface in such a way that allows the gun/wand's input to appear as keyboard input. So if you're app/web page accepts user typed input, then it will be able to accept gun/wand input. If you're working with a funky gun/wand that doesn't do this, then you're own your own. PHP, from a server-side standpoint, will be of no use (assuming the gun/wand is on the client machine).