#19943 [NEW]: Ragged array returns undefined results
From: [EMAIL PROTECTED] Operating system: Win2K PHP version: 4.2.1 PHP Bug Type: Arrays related Bug description: Ragged array returns undefined results When using an array that has ragged indices, the value in the array is undefined. Well, actually it can be defined, but it is unexpected. No errors or warnings are reported. Sample Code: ? $ragged = array(); for ( $count = 0; $count 10; $count++ ) { $ragged[$count]= 'single '.$count; $ragged[$count]['idx'] = 'ragged '.$count; } ? htmlhead/headbody table border=1 tr tdExpected/tdtdActual/td tdExpected IDX/tdtdActual IDX/td /tr ? for ( $count = 0; $count 10; $count++ ) { ? tr td ?= 'single '.$count ? /tdtd ?= $ragged[$count] ? /td td ?= 'ragged '.$count ? /tdtd ?= $ragged[$count]['idx'] ? /td /tr ? } ? /table/body/html -- Edit bug report at http://bugs.php.net/?id=19943edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=19943r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=19943r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=19943r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=19943r=needtrace Try newer version: http://bugs.php.net/fix.php?id=19943r=oldversion Not developer issue:http://bugs.php.net/fix.php?id=19943r=support Expected behavior: http://bugs.php.net/fix.php?id=19943r=notwrong Not enough info:http://bugs.php.net/fix.php?id=19943r=notenoughinfo Submitted twice:http://bugs.php.net/fix.php?id=19943r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=19943r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=19943r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=19943r=dst IIS Stability: http://bugs.php.net/fix.php?id=19943r=isapi
#19943 [Com]: Ragged array returns undefined results
ID: 19943 Comment by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Open Bug Type: Arrays related Operating System: Win2K PHP Version: 4.2.1 New Comment: However, the following codes does work, even though the array is still ragged: ? $ragged = array(); for ( $count = 0; $count 10; $count++ ) { $ragged['idx'][$count] = 'ragged '.$count; $ragged[$count]= 'single '.$count; } ? htmlhead/headbody table border=1 tr tdExpected/tdtdActual/td tdExpected IDX/tdtdActual IDX/td /tr ? for ( $count = 0; $count 10; $count++ ) { ? tr td ?= 'single '.$count ? /tdtd ?= $ragged[$count] ? /td td ?= 'ragged '.$count ? /tdtd ?= $ragged['idx'][$count] ? /td /tr ? } ? /table/body/html Previous Comments: [2002-10-16 19:50:57] [EMAIL PROTECTED] When using an array that has ragged indices, the value in the array is undefined. Well, actually it can be defined, but it is unexpected. No errors or warnings are reported. Sample Code: ? $ragged = array(); for ( $count = 0; $count 10; $count++ ) { $ragged[$count]= 'single '.$count; $ragged[$count]['idx'] = 'ragged '.$count; } ? htmlhead/headbody table border=1 tr tdExpected/tdtdActual/td tdExpected IDX/tdtdActual IDX/td /tr ? for ( $count = 0; $count 10; $count++ ) { ? tr td ?= 'single '.$count ? /tdtd ?= $ragged[$count] ? /td td ?= 'ragged '.$count ? /tdtd ?= $ragged[$count]['idx'] ? /td /tr ? } ? /table/body/html -- Edit this bug report at http://bugs.php.net/?id=19943edit=1
#19565 [Bgs]: line comment interprets ?
ID: 19565 User updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Bogus Bug Type: Scripting Engine problem Operating System: Win 2K PHP Version: 4.2.1 New Comment: Ok, so it is defined in the manual. However this is not intuitive behaviour. Previous Comments: [2002-09-23 19:00:23] [EMAIL PROTECTED] Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php [2002-09-23 18:59:52] [EMAIL PROTECTED] Sorry, but the bug system is not the appropriate forum for asking support questions. Your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php Thank you for your interest in PHP. [2002-09-23 18:39:27] [EMAIL PROTECTED] A single line comment still interprets the ? character sequence. - ? // some text // the next line is OK, block comment /* input name=?= $ip_name ? */ // the next line is the problem // input name=?= $ip_name ? // all done ? - The above snippet will show the following on the web page, even though NOTHING should show: // all done ? -- Edit this bug report at http://bugs.php.net/?id=19565edit=1
#19565 [NEW]: line comment interprets ?
From: [EMAIL PROTECTED] Operating system: Win 2K PHP version: 4.2.1 PHP Bug Type: Scripting Engine problem Bug description: line comment interprets ? A single line comment still interprets the ? character sequence. - ? // some text // the next line is OK, block comment /* input name=?= $ip_name ? */ // the next line is the problem // input name=?= $ip_name ? // all done ? - The above snippet will show the following on the web page, even though NOTHING should show: // all done ? -- Edit bug report at http://bugs.php.net/?id=19565edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=19565r=trysnapshot Fixed in CVS:http://bugs.php.net/fix.php?id=19565r=fixedcvs Fixed in release:http://bugs.php.net/fix.php?id=19565r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=19565r=needtrace Try newer version: http://bugs.php.net/fix.php?id=19565r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=19565r=support Expected behavior: http://bugs.php.net/fix.php?id=19565r=notwrong Not enough info: http://bugs.php.net/fix.php?id=19565r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=19565r=submittedtwice register_globals:http://bugs.php.net/fix.php?id=19565r=globals