fprintf (php 5, php 7, php 8) fprintf Écrivez une chaîne formatée sur un flux

<?php
if (!($fp = fopen('date.txt', 'w'))) {
    return;
}

fprintf($fp, "%04d-%02d-%02d", $year, $month, $day);
// will write the formatted ISO date to date.txt
?>
SAMER SAEID