$greeting = "Hello"; $name = "John"; echo sprintf("%s, %s!", $greeting, $name);
$number = 123456.789; echo number_format($number, 2);
echo date("Y-m-d H:i:s");This example uses the `date` function to format the current date and time. The parameters inside the `date` function specify the format of the date and time to output. The resulting output will be in the format of "YYYY-MM-DD HH:MM:SS". This PHP format library is included in the PHP Standard Library.