Ok, well xml is obviously not a programming language so you cannot compare it to php. But you can for example compare it to mysql.
How in mysql would you represent heiarchical data? It would be fun times making multiple tables and lets say your heiarchy is thousands of levels deep. XML makes this simpler.
But another major advantage of XML is it offers nice structure. Here is an example, lets say you write a object framework and obviously want a way to define object properties and sql commands to load those properties. You can use an xml document to define the object properties and sql commands.
Another place XML is useful is communication. It offers a structured format for communication.
Im not an xml expert, ive only seen it used in these situations, im sure its possible without xml. Afterall xml is nothing mind blowing, its just a markup language. It has its place though.