|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits              [2018-08-28 00:46 UTC] requinix@php.net
 
-Status:  Open
+Status:  Feedback
-Package: Documentation problem
+Package: *Encryption and hash functions
  [2018-08-28 00:46 UTC] requinix@php.net
  [2018-08-28 16:38 UTC] chealer at gmail dot com
 
-Status: Feedback
+Status: Open
  [2018-08-28 16:38 UTC] chealer at gmail dot com
  [2018-08-28 17:57 UTC] chealer at gmail dot com
  [2018-08-28 18:02 UTC] requinix@php.net
  [2018-08-28 20:51 UTC] chealer at gmail dot com
  [2018-08-28 21:59 UTC] cmb@php.net
  [2018-08-31 13:55 UTC] chealer at gmail dot com
  [2018-08-31 14:35 UTC] requinix@php.net
  [2018-09-10 21:29 UTC] chealer at gmail dot com
 | |||||||||||||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 18:00:01 2025 UTC | 
Description: ------------ We use the following function to uniquely identify the contents of a set of files: /** * Calculate a hash based on the contents of files recursively * * @param array $files multidimensional array of filepaths to minify/hash * @param string $hash * @return string hash based on contents of the files */ private function getFilesContentsHash(array $files, & $hash = '') { foreach ($files as $file) { if (is_array($file)) { $hash .= $this->getFilesContentsHash($file, $hash); } else { $hash .= md5_file($file); } } return md5($hash); } This unfortunately seems to be quite slow. But I am unable to tell how this should be written and what difference a rewrite would make from the documentation of md5_file(), since it lacks any information on performance, explaining how file size influences computation cost.