note 104781 added to function.hex2bin
| From: | komb at 808 dot lv | Date: | Thu, 07 Jul 2011 08:29:57 +0000 |
| Subject: | note 104781 added to function.hex2bin | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-181303@lists.php.net to get a copy of this message | ||
function hex2bin($hex){
return preg_replace('#(\w)(\w)#e', "chr(hexdec('$1$2'))", $hex);
}
//native bin2hex():
$hex = bin2hex("abc+123=?"); //6162632b3132333d3f
//convert back:
hex2bin($hex); //abc+123=?
----
Server IP: 69.147.83.197
Probable Submitter: 88.135.132.31
----
Manual Page -- http://www.php.net/manual/en/function.hex2bin.php
Edit -- https://master.php.net/note/edit/104781
Del: integrated -- https://master.php.net/note/delete/104781/integrated
Del: useless -- https://master.php.net/note/delete/104781/useless
Del: bad code -- https://master.php.net/note/delete/104781/bad+code
Del: spam -- https://master.php.net/note/delete/104781/spam
Del: non-english -- https://master.php.net/note/delete/104781/non-english
Del: in docs -- https://master.php.net/note/delete/104781/in+docs
Del: other reasons-- https://master.php.net/note/delete/104781
Reject -- https://master.php.net/note/reject/104781
Search -- https://master.php.net/manage/user-notes.php