pocketmine\network\protocol\DataPacket::__debugInfo PHP Method

__debugInfo() public method

public __debugInfo ( )
    public function __debugInfo()
    {
        $data = [];
        foreach ($this as $k => $v) {
            if ($k === "buffer") {
                $data[$k] = bin2hex($v);
            } elseif (is_string($v) or is_object($v) and method_exists($v, "__toString")) {
                $data[$k] = Utils::printable((string) $v);
            } else {
                $data[$k] = $v;
            }
        }
        return $data;
    }