I am trying to compare two files with their modification time. But the comaprison is not working right.
I am doing it this way:
if( filemtime($fullPath.'/_mainstyle.scss') > filemtime($fullPath.'style.css') ) {
echo '<br/><br/><br/><br/>_mainstyle.scss '.filemtime($fullPath.'/_mainstyle.scss');
echo '<br/>style.css '.filemtime($fullPath.'/style.css');
}
I also am outputting the filemtime, which is:
_mainstyle.scss 1532435273
style.css 1532518177
For my understanding, the Number of _mainstyle.scss is smaller than style.css but the if conditional is printing something. I also outputted a boolean of the comparison, which is true. If I reverse the comparison, nothing is put out. I don't really get why this is happening. Thank you!
Aucun commentaire:
Enregistrer un commentaire