public function numberToString($var) : string
    {
        static $precision;
        if (!$precision) {
            $precision = pow(10, (int)ini_get('precision'));
        }
        $v = '' . $var;
        if (!is_numeric($v)) {
            throw new \InvalidArgumentException('Arg var is not integer/float nor number-like when stringified.');
        }

        // If within system precision, just string it.
        return ($v > -$precision && $v < $precision) ? $v : number_format((float) $v, 0, '.', '');
    }