Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Format a number with grouped thousands
<?php number_format(    float $num,    int $decimals = 0,    ?string $decimal_separator = ".",    ?string $thousands_separator = ","): string
<?php Loop::addPeriodicTimer(5, function () {

    $memory = memory_get_usage() / 1024;

    $formatted = number_format($memory, 3).'K';

    echo "Current memory usage: {$formatted}\n";

});