protected function getFileModifiedTimestampOfFile($fileName, $format = 'Y-m-d H:i:s', $resultInUtc = false)
    {
        if (!file_exists($fileName)) {
            return ['error' => $fileName . ' was not found'];
        }
        $info = new \SplFileInfo($fileName);
        if ($format === 'PHPtime') {
            return $info->getMTime();
        }
        $sReturn = date($format, $info->getMTime());
        if ($resultInUtc) {
            $sReturn = gmdate($format, $info->getMTime());
        }
        return $sReturn;
    }
protected function getFileModifiedTimestampOfFile($fileName, $format = 'Y-m-d H:i:s', $resultInUtc = false)
    {
        if (!file_exists($fileName)) {
            return ['error' => $fileName . ' was not found'];
        }
        $info = new \SplFileInfo($fileName);
        if ($format === 'PHPtime') {
            return $info->getMTime();
        }
        $sReturn = date($format, $info->getMTime());
        if ($resultInUtc) {
            $sReturn = gmdate($format, $info->getMTime());
        }
        return $sReturn;
    }
protected function getFileModifiedTimestampOfFile ( $ fileName , $ format = 'Y-m-d H:i:s' , $ resultInUtc = false ) { if ( ! file_exists ( $ fileName ) ) { return [ 'error' => $ fileName . ' was not found' ] ; } $ info = new \ SplFileInfo ( $ fileName ) ; if ( $ format === 'PHPtime' ) { return $ info -> getMTime ( ) ; } $ sReturn = date ( $ format , $ info -> getMTime ( ) ) ; if ( $ resultInUtc ) { $ sReturn = gmdate ( $ format , $ info -> getMTime ( ) ) ; } return $ sReturn ; }
Returns Modified date and time of a given file

@param string $fileName
@param string $format
@param boolean $resultInUtc
@return string
Returns Modified date and time of a given file