lib/SteamCondenser/Servers/GameServer.php
protected function splitPlayerStatus($attributes, $playerStatus) {
        if($attributes[0] != 'userid') {
            $playerStatus = preg_replace('/^\d+ +/', '', $playerStatus);
        }

        $firstQuote = strpos($playerStatus, '"');
        $lastQuote  = strrpos($playerStatus, '"');
        $data = [
            substr($playerStatus, 0, $firstQuote),
            substr($playerStatus, $firstQuote + 1, $lastQuote - 1 - $firstQuote),
            substr($playerStatus, $lastQuote + 1)
        ];

        $data = array_merge(
            array_filter(preg_split("/\s+/", trim($data[0]))),
            [$data[1]],
            preg_split("/\s+/", trim($data[2]))
        );
        $data = array_values($data);

        if(sizeof($attributes) > sizeof($data) &&
           in_array('state', $attributes)) {
            array_splice($data, 3, 0, [null, null, null]);
        } elseif(sizeof($attributes) < sizeof($data)) {
            unset($data[1]);
            $data = array_values($data);
        }

        $playerData = [];
        for($i = 0; $i < sizeof($data); $i ++) {
            $playerData[$attributes[$i]] = $data[$i];
        }

        return $playerData;
    }
protected function splitPlayerStatus($attributes, $playerStatus) {
        if($attributes[0] != 'userid') {
            $playerStatus = preg_replace('/^\d+ +/', '', $playerStatus);
        }

        $firstQuote = strpos($playerStatus, '"');
        $lastQuote  = strrpos($playerStatus, '"');
        $data = [
            substr($playerStatus, 0, $firstQuote),
            substr($playerStatus, $firstQuote + 1, $lastQuote - 1 - $firstQuote),
            substr($playerStatus, $lastQuote + 1)
        ];

        $data = array_merge(
            array_filter(preg_split("/\s+/", trim($data[0]))),
            [$data[1]],
            preg_split("/\s+/", trim($data[2]))
        );
        $data = array_values($data);

        if(sizeof($attributes) > sizeof($data) &&
           in_array('state', $attributes)) {
            array_splice($data, 3, 0, [null, null, null]);
        } elseif(sizeof($attributes) < sizeof($data)) {
            unset($data[1]);
            $data = array_values($data);
        }

        $playerData = [];
        for($i = 0; $i < sizeof($data); $i ++) {
            $playerData[$attributes[$i]] = $data[$i];
        }

        return $playerData;
    }
Splits the player status obtained with <var>rcon status</var>

@param array $attributes The attribute names
@param string $playerStatus The status line of a single player
@return array The attributes with the corresponding values for this
player
@see getPlayerStatusAttributes()