Supported Versions: PHP 4 >= 4.2.0, PHP 5, PHP 7, PHP 8
Calculates the md5 hash of a given file
md5_file(string $filenamebool $binary false): string|false
    public function hash($path)

    {

        return 
md5_file($path);

    }
    public function hasSameHash($firstFile$secondFile)

    {

        
$hash = @md5_file($firstFile);



        return 
$hash && $hash === @md5_file($secondFile);

    }
    {

        
$hash = @md5_file($firstFile);



        return 
$hash && $hash === @md5_file($secondFile);

    }