mardi 8 août 2017

PHP Function to one liner

is it possible to convert this function

function DateTotext($dateTime) {
    $dateObj = new DateTime();
    return $dateObj->setTimestamp($dateTime + 7200)->format('d.m.Y H:i');
}

into a one liner? I'm just curious.

Btw: This function converts a int UTC time stamp to a CET text.

Aucun commentaire:

Enregistrer un commentaire