Re: http://bugs.php.net/bugs.php?id=8409
| From: | Cynic | Date: | Mon, 08 Jan 2001 17:40:31 +0000 |
| Subject: | Re: http://bugs.php.net/bugs.php?id=8409 | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-43406@lists.php.net to get a copy of this message | ||
Well,
this is not entirely true. I cannot do more than the language
will allow me to.
If PHP preserved the type of array indices, and it "didn't suit
my needs, I could put in additional work in order to achieve"
conversion e. g. from string to int. However, PHP will convert
array( '1' => 'aaa' , '2' => 'bbb' , '3'
=> 'ccc' ) ;
to
array( 1 => 'aaa' , 2 => 'bbb' , 3 => 'ccc' ) ;
no matter what I try to do to convince it I want the array
indexed with numeric strings.
I know, I know... It's just this was driving me mad.
BTW, what about the extract() question?
At 19:13 6.1. 2001, Zeev Suraski wrote the following:
--------------------------------------------------------------
>At 05:58 6/1/2001, Cynic wrote:
>>Methinks (YMMV) implicit conversions were meant to make things
>>easier, not complicated, let alone impossible.
>
>They were intended to make things easier, and they do. The price, though, is that when the
>default behavior of PHP doesn't suit your needs, you have to put in additional work in order to
>achieve what you want. If you stop for a minute and think about the consequences of avoiding these
>auto conversions, you'd realize that they are one of the main things that make scripting in PHP
>so intuitive.
>
>>Can arrays in PHP change a bit, or are they carved in stone
>>yet? Is, for example, change to extract() so that
>
>For this purpose, they're carved in a diamond :)
>
>Zeev
>
>--
>Zeev Suraski <zeev@zend.com>
>CTO & co-founder, Zend Technologies Ltd.
>http://www.zend.com/
>
>
>--
>PHP Development Mailing List <http://www.php.net/>
>To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net
>For additional commands, e-mail: php-dev-help@lists.php.net
>To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
------end of quote------
____________________________________________________________
Cynic:
A member of a group of ancient Greek philosophers who taught
that virtue constitutes happiness and that self control is
the essential part of virtue.
cynic@mail.cz