I do not know a huge amount about WBXML, but from the fact that I can compile an XML file in it in binary format in it. I suggest that in the simplest case, you can use XML modules, such as simpleXML, to create your XML document, output it as a string, and then use PHP built-in to the file processing functions (fopen, fwrite, etc. ) To output a string as binary data to a file. To reverse the process, download the file as a string and parse SimpleXML.
However, without knowing the specific details of the WBXML format, I am sure there are more. You will also need to implement the necessary code yourself, but since you could implement it in PHP itself, which should make cross-platform portability a little easier.
In fact, I do not answer as such, but I hope that you will go in the right direction.
Gordonm
source share