Based on the W3G-Parser for PHP created by Julas: http://w3rep.sourceforge.net/
This library should be fully compatible with existing versions, only enhancing its functionality. It adds another property called "json_parsed_full" to the PHP class object that allows retrieval of well-defined data structures.
The automated test pipeline covers php versions of 7.1, 7.2 and 7.3. Support for older versions is not guaranteed.
Can be accessed by using the json_parsed_full property of the Replay object. Currently still work in progress and not 100% reliable yet.
$this->json_parsed_full["teams"] = $teams;
$this->json_parsed_full["game"] = $this->game;
$this->json_parsed_full["teams_simple"] =$teams_simple;
$this->json_parsed_full["julas"] = $this->players;
$this->json_parsed_full["w3gplus"] =$this->arm;
Example usage in a simplified PHP backend script using an uploaded replay file as source.
if (isset($_FILES['custom_replay'])) {
$replay = new replay($_FILES["custom_replay"]['tmp_name']);
print (json_encode($replay->json_parsed_full));
die;
}