<?php 

class cache
{
    public static function getFileWithTime(string $_file){
        if (file_exists($_file)) {
            return $_file . "?v=" . date("YmdHis", filemtime($_file));
        } else {
            return $_file;
        }
    }

    public static function printFileWithTime(string $_file){
        echo self::getFileWithTime($_file);
    }
}