number php code example
Example 1: php number format
$num = 12345.6789;
echo number_format($num, 2, '.', '') //12345.67
echo number_format($num, 3, ',', '.') //12.345,678
Example 2: PHP Numbers
<?php
$x = 5985;
var_dump(is_int($x));
$x = 59.85;
var_dump(is_int($x));
?>
Example 3: php "?int"
// ? means $count can be NULL or integer, maybe PHP >=7.4
private ?int $count