Hi folks,while fixing http://bugs.php.net/bug.php?id=48557 I was wondering why zend_hash_update doesn't automatically convert numeric strings to integers.
Doing $foo = array('1' => 'bar'); actually results in an integer key with value 1, not in a string. The problem in the bug above was that when ext/soap decodes keys from a hashmap, it won't convert numeric string keys to integers. As a result, such items in an array were never accessible from PHP code (that is, unless you did some array_keys()/array_values() stunts, of course).
Is this intentional? It seems that every internal feature that would like to deal with hashes needs to implement this string->int casting behavior of PHP itself. Why doesn't zend_hash_update() do it automatically?
Cheers, David
smime.p7s
Description: S/MIME cryptographic signature