Re: PHP Bug ?
| From: | Wudi | Date: | Sat, 03 Jul 2004 12:52:10 +0000 |
| Subject: | Re: PHP Bug ? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-189625@lists.php.net to get a copy of this message | ||
It works on Apache/2.0.49 (Win32) PHP/4.3.7.
It wrote the following to test it:
<?php
$country_symbol = array( 'AU' => 5 );
$country_list = array( 5 => 'Australia' );
$temp = $country_list[$country_symbol['AU']];
echo '$country_list[$country_symbol[\'AU\']] =
$country_list['.$country_symbol['AU'].'] = ' . $temp .
'<br>';
$country_symbol = array( 'AU' => 'a' );
$country_list = array( 'a' => 'Australia' );
$temp = $country_list[$country_symbol['AU']];
echo '$country_list[$country_symbol[\'AU\']] =
$country_list['.$country_symbol['AU'].'] = ' . $temp .
'<br>';
$country_symbol = array( 'AU' => '%' );
$country_list = array( '%' => 'Australia' );
$temp = $country_list[$country_symbol['AU']];
echo '$country_list[$country_symbol[\'AU\']] =
$country_list['.$country_symbol['AU'].'] = ' . $temp .
'<br>';
?>
The output was:
$country_list[$country_symbol['AU']] = $country_list[5] = Australia
$country_list[$country_symbol['AU']] = $country_list[a] = Australia
$country_list[$country_symbol['AU']] = $country_list[%] = Australia
On Fri, 2 Jul 2004 14:01:18 +1000
adwinwijaya <adwinwijaya@yahoo.com.au> wrote:
> Hi...
>
> I found a bug (may be)
> I tried to do like this:
>
> $temp = $country_list[$country_symbol['AU']] ;
> this didnt work, so I have to change to :
>
> $symbol = $country_symbol['AU'];
> $temp = $country_list[$symbol] ;
>
> is this PHP bug ?
>
> --
> Best regards,
> adwinwijaya
> mailto:adwinwijaya@yahoo.com.au
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
------------------------------------------------------------------------
Comment: English is not my first language.
Wudi <wudicgi@seoul.com>