PHP 8.5.0 Alpha 4 available for testing

Voting

: one plus one?
(Example: nine)

The Note You're Voting On

kexianbin at diyism dot com
13 years ago
My recursive unchunk function:

<?php
function unchunk($result)
{return
preg_replace('/([0-9A-F]+)\r\n(.*)/sie',
'($cnt=@base_convert("\1", 16, 10))
?substr(($str=@strtr(\'\2\', array(\'\"\'=>\'"\', \'\\\\0\'=>"\x00"))), 0, $cnt).unchunk(substr($str, $cnt+2))
:""
'
,
$result
);
}
?>

<< Back to user notes page

To Top