Created
September 14, 2011 14:50
-
-
Save nikic/1216769 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: ext/standard/tests/strings/md5_file.phpt | |
=================================================================== | |
--- ext/standard/tests/strings/md5_file.phpt (revision 316568) | |
+++ ext/standard/tests/strings/md5_file.phpt (working copy) | |
@@ -56,7 +56,7 @@ | |
/* Raw Binary Output for Empty file as input */ | |
echo "\n*** Raw Binary Output for Empty file as Argument ***\n"; | |
-var_dump( md5_file("EmptyFile.txt", true) ); | |
+var_dump( bin2hex(md5_file("EmptyFile.txt", true)) ); | |
/* Normal operation with hexadecimal output */ | |
echo "\n*** Hexadecimal Output for a valid file with some contents ***\n"; | |
@@ -64,7 +64,7 @@ | |
/* Normal operation with raw binary output */ | |
echo "\n*** Raw Binary Output for a valid file with some contents ***\n"; | |
-var_dump ( md5_file("DataFile.txt", true) ); | |
+var_dump ( bin2hex(md5_file("DataFile.txt", true)) ); | |
// remove temp files | |
unlink("DataFile.txt"); | |
@@ -97,12 +97,13 @@ | |
string(32) "d41d8cd98f00b204e9800998ecf8427e" | |
*** Raw Binary Output for Empty file as Argument *** | |
-string(16) "ÔÙ | |
+string(32) "d41d8cd98f00b204e9800998ecf8427e" | |
+ | |
*** Hexadecimal Output for a valid file with some contents *** | |
string(32) "7f28ec647825e2a70bf67778472cd4a2" | |
*** Raw Binary Output for a valid file with some contents *** | |
-string(16) "(ìdx%â§öwxG,Ô¢" | |
+string(32) "7f28ec647825e2a70bf67778472cd4a2" | |
Done | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment