"PHP or JavaScript" sounds like a weird choice: PHP is usually used as a server language, while JavaScript is usually used as a client-side language.
What is your situation? What makes you offer these two languages in particular? If you could give more information about what you are trying to do, this will help a lot. (We do not know if you are developing a web application, batch processing tool, graphical application, etc.).
I suspect that JSON will be a little more compact than XML, although if they compress the data, you may well find that they end up taking the exact same bandwidth (since most of the "bloat" XML is easily compressed).
As always, the best way to find out is to check a specific web service with some realistic data. General provisions are not a good basis for decision making.
source share