|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #24766 strange result array from unpack
Submitted: 2003-07-23 07:35 UTC Modified: 2003-10-03 18:40 UTC
From: spy at spy dot zp dot ua Assigned: moriyoshi
Status: Closed Package: Scripting Engine problem
PHP Version: 5CVS-2003-08-06 (dev) OS: FreeBSD 4.8
Private report: No CVE-ID:
 [2003-07-23 07:35 UTC] spy at spy dot zp dot ua
Something wrong with result array from unpack.

var_dump prints correct content.
But when I try to access directly to index, that reports "undefined offset".

Reproduce code:



print $a[$i];

Expected result:
Expected result of line 9 is:

Actual result:
Undefined offset:  1 in 1.php on line 9


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2003-10-03 18:40 UTC]
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at
In case this was a documentation problem, the fix will show up soon at

In case this was a website problem, the change will show
up on the site and on the mirror sites in short time.
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2015 The PHP Group
All rights reserved.
Last updated: Sat Oct 10 03:01:30 2015 UTC