I’ve been tasked with editing the PHP inside an XML file. I had no idea this was a thing people did, and I wish they didn’t, because I don’t understand it. So I tried to look it up and I came across this question and answer about how to add php to an XML file.
It seemed like a really promising QA, because the format suggested by the top answer (using “” around the PHP is exactly what’s happening in the xml file I’ve been tasked to edit.
But now my question is… How the heck do I run the thing? It obviously can’t run just by doing php -S localhost:8000
, because it’s not php. there is no or
?>
, so the interpreter wouldn't know what was php and what wasn't.
Why is there php in the xml file? and what do now that it’s already happened?
Here’s a minimal example (not the actual file I’m working with).
blah blah
1.3
some plugin
some hook name