|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2002-01-02 13:39 UTC] amnuts at talker dot com
Running the following always causes a core dump:
<?php
$arr = array (
1 => array ("0","0","0","0","0"),
2 => array ("0","0","0","0","0"),
3 => array ("0","0","0","0","0"),
4 => array ("0","0","0","0","0"),
5 => array ("0","0","0","0","0")
);
print_r($arr);
echo "<br>\n\n<br>\n\n";
$str = serialize($arr);
echo "serialized<br>\n", $str, "<br><br>\n\n";
function hex2bin($data) {
$len = strlen($data);
return pack("H" . $len, $data);
}
$enc = urlencode($str);
echo "urlencoded<br>", $enc, "<br><br>\n\n";
$gzd = gzcompress($enc);
//echo "gzcompressed (urlencoded)<br>", $gzd, "<br><br>\n\n";
$b64 = base64_encode($gzd);
echo "base64_encoded<br>", $b64, "<br><br>\n\n";
$b2h = bin2hex($enc);
echo "bin2hex (urlencoded)<br>", $b2h, "<br><br>\n\n";
$binary = base_convert($b2h, 16, 2);
echo $binary, "<br><br>\n\n";
$conv = base_convert($binary, 2, 16);
echo $conv, "<br><br>\n\n";
$h2b = hex2bin($conv);
echo $h2b, "<br><br>\n\n";
$md = md5($str);
echo "md5<br>", $md, "<br><br>\n";
?>
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 12:00:01 2025 UTC |
Another test case which makes base_convert dump core is this: <?php $x=base_convert ("2f0f336509c9a3d0f29e4281321d496f", 16, 36); echo $x; echo Done; ?> I have not experienced this problem under SuSE 7.2 but under the following: Mandrake 8.2 Linux p700 2.4.18-6mdk #1 Fri Mar 15 02:59:08 CET 2002 i686 unknown apache-1.3.23-4mdk apache-common-1.3.23-4mdk apache-modules-1.3.23-4mdk mod_php-4.1.2-1mdk php-4.1.2-1mdk php-common-4.1.2-1mdk