[Pmwiki-users] Some issues with the latest pmwiki release

Jonathan Scott Duff duff at pobox.com
Tue Apr 29 10:20:37 CDT 2003

On Tue, Apr 29, 2003 at 09:59:32AM -0500, Patrick R. Michaud wrote:
> Also, arrays in PHP (like perl) aren't quite as sparse as one might
> like.  Thus something stored at element 700 means that elements 0 through
> 699 are automatically created and eat up some space.  So, there's
> some reason to keep the numbers small -- 0..70 takes up one tenth of
> the memory as 0..700.  
> Floating point numbers as indices aren't an option in PHP.  I'd have
> to go to strings in that case, and of course sorting strings introduces
> weird things (e.g., "11" comes before "2") and so it seems that just
> sticking with integers is best.

For some reason I thought that arrays in PHP were all indexed "by
string"  such that $a[700] can exist independant of $a[0]...$a[699].
Same for using floating point numbers as indices.

A quick test program shows that a) floating point numbers as indices
doesn't cause php to balk and b) there's not an appreciable memory
slurp when I assign to $a[10000000000].

Jonathan Scott Duff
duff at cbi.tamucc.edu

More information about the pmwiki-users mailing list