在PHP中创建三个函数来调用今天,Yester和Future [关闭]

I am a new PHP student . I want to create 3 functions to return Today, Yesterday, and Future.

Could anyone tell me how to create those?

You can use these function :

// midnight second or equal today
    function isToday($time) 
    {
        return (strtotime($time) === strtotime('today'));
    }

    //Yesterday

    function isPast($time)
    {
        return (strtotime($time) < time());
    }

    // Next day
    function isFuture($time)
    {
        return (strtotime($time) > time());
    }