From: spy at spy dot zp dot ua Operating system: FreeBSD 4.8 PHP version: 5.0.0b1 (beta1) PHP Bug Type: Unknown/Other Function Bug description: strange result array from unpack
Description: ------------ 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: --------------- $a=unpack('C3',pack("H6","123456")); var_dump($a); $k=array_keys($a); var_dump($k); $i=$k[0]; print $a[$i]; Expected result: ---------------- Expected result of line 9 is: 18 Actual result: -------------- Undefined offset: 1 in 1.php on line 9 -- Edit bug report at http://bugs.php.net/?id=24766&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=24766&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=24766&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=24766&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=24766&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=24766&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=24766&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=24766&r=support Expected behavior: http://bugs.php.net/fix.php?id=24766&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=24766&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=24766&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=24766&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=24766&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=24766&r=dst IIS Stability: http://bugs.php.net/fix.php?id=24766&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=24766&r=gnused