Skip to main content

Timeline for Why are zero-based arrays the norm?

Current License: CC BY-SA 2.5

7 events
when toggle format what by license comment
S Sep 26, 2011 at 18:19 history migrated from stackoverflow.com (revisions)
S Sep 26, 2011 at 18:19 history made wiki Post Made Community Wiki
Dec 26, 2008 at 17:52 comment added Dan Rosenstark I meant the last half of my answer...
Dec 26, 2008 at 17:50 comment added Dan Rosenstark True regarding both of these points: last half deleted, since it is the same for zero-based or one-based arrays: count is 0 if you've got zero elements.
Dec 26, 2008 at 11:29 comment added Jules You are confusing the count with the index of the last element. The count of an empty array is always 0, whether you use zero-based or one-based arrays. The advantage of one-based arrays is that the count is the position of the last element (but that's about the only advantage).
Dec 26, 2008 at 7:42 comment added jmucchiello In PHP, most search inside string function return FALSE on not found. Not -1.
Dec 26, 2008 at 4:21 history answered Dan Rosenstark CC BY-SA 2.5