Doc #64252 [Opn->Nab]: add to documentation
| From: | frozenfire@php.net | Date: | Wed, 27 Feb 2013 04:41:26 +0000 |
| Subject: | Doc #64252 [Opn->Nab]: add to documentation | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-9593@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=64252&edit=1
ID: 64252
Updated by: frozenfire@php.net
Reported by: ray at gurganus dot org
Summary: add to documentation
-Status: Open
+Status: Not a bug
Type: Documentation Problem
Package: Unknown/Other Function
Operating System: Windows
PHP Version: 5.3.21
Block user comment: N
Private report: N
New Comment:
pack is one of those functions which really is fairly necessarily complicated and
hard to document. I don't think there's anything we could add to the
documentation that could possibly clear things up. I've used pack and unpack
extensively, and I feel your pain, but unless you have a suggestion, I don't
think there's a solution.
As for your example, I think the documentation is actually pretty clear about how
to pack a hex string.
Previous Comments:
------------------------------------------------------------------------
[2013-02-20 16:14:22] ray at gurganus dot org
Description:
------------
The documentation on the pack() function could be a little clearer. I needed a function that would
receive a hex string and output binary for creating an image. The first time I read the
documentation page, I had no idea this is the answer I was looking for, and eventually found it in
someone else's code.
Here's the code I have that returns the output I needed.
$GIF = "CCFFCC009900...." (etc)
$output = pack("H".strlen($GIF),$GIF);
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=64252&edit=1