public function formatTime($time)
    {
        $time = preg_match('~\D~', $time) ? strtotime($time) : $time;

        return time() - $time;
    }
public function formatTime($time)
    {
        $time = preg_match('~\D~', $time) ? strtotime($time) : $time;

        return time() - $time;
    }
public function formatTime ( $ time ) { $ time = preg_match ( '~\D~' , $ time ) ? strtotime ( $ time ) : $ time ; return time ( ) - $ time ; }
Formats the time.

@param (int|string) $time Timestamp or English textual datetime (http://php.net/manual/en/function.strtotime.php)

@since 3.0.0

@return int
Formats the time .