Re: Re: PHP 4.0 Bug #9307 Updated: Numeric-looking array keys are forced to be integers

From: Date: Tue, 06 Mar 2001 15:32:23 +0000
Subject: Re: Re: PHP 4.0 Bug #9307 Updated: Numeric-looking array keys are forced to be integers
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-48056@lists.php.net to get a copy of this message
So what about a string key that breaks when someone enters a string that can be autoconverted. Zend turns it into a number and hey presto nothing works any more. Can we have a construct to *force* it not to convert these things? On Tue, 6 Mar 2001, Stanislav Malyshev wrote: > DC>> Even for array keys that are *not numbers*? How do I get a > DC>> string for my array key in this case? > > If they are not numbers, they are not interpreted as numbers. So, $a[0] is > the same as $a['0'], but different from $a["foo"]. > -- > Stanislav Malyshev, Zend Products Engineer > stas@zend.com http://www.zend.com/ +972-3-6139665 ext.115 > > >

« previous php.dev (#48056) next »