|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[1999-09-06 03:20 UTC] mattias at umc dot se
Lines 1 and 3 generate different output. Seems like it should be the same.
Line 1 generates different output from time to time, so the problem should be in the interaction between the crypt() and substr() function.
-- code --
1 print crypt("olalala",substr("olalala",0,2));
2 print "<br>";
3 print crypt("olalala","ol");
4 print "<br>";
5 printf ("%s",substr("olalala",0,2));
?>
-- output --
$1$ol@?$.3S/EAX3UwfsQraYbrFTL1
$1$ol??@?$D5moWZdAKwlH8S2JXDYQ9.
ol
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Dec 14 15:00:01 2025 UTC |
Lines 1 and 3 generate different output, though it should be the same. Line 1 generates different output from time to time, so the problem might be in the interaction between the crypt() and substr() function. -- code -- <? 1 print crypt("olalala",substr("olalala",0,2)); 2 print "<br>"; 3 print crypt("olalala","ol"); 4 print "<br>"; 5 printf ("%s",substr("olalala",0,2)); ?> -- output -- $1$ol@?$.3S/EAX3UwfsQraYbrFTL1 $1$ol??@?$D5moWZdAKwlH8S2JXDYQ9. ol