PHP 4.0 Bug #6662: array keys of type real not allowed?
| From: | jeroen at polder dot net | Date: | Tue, 12 Sep 2000 02:06:25 +0000 |
| Subject: | PHP 4.0 Bug #6662: array keys of type real not allowed? | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-32914@lists.php.net to get a copy of this message | ||
From: jeroen@polder.net
Operating system: linux
PHP version: 4.0.2
PHP Bug Type: Scripting Engine problem
Bug description: array keys of type real not allowed?
It seems that array keys of type real are not allowed in class declaration:
class MyClass {
var $a = array( 1.5=>1, 3.5=>2, 7.5=>5, 99=>10);
...
}
Results in only one item 99=>10 in array.
Above is accepted in PHP3.
Workaround:
var $a = array( '1.5'=>1, '3.5'=>2, '7.5'=>5,
'99'=>10);