Re: PHP 4.0 Bug #3281 Updated: Array handling returns "Array" or does something stupid when keys are strings

From: Date: Sun, 23 Jan 2000 02:30:02 +0000
Subject: Re: PHP 4.0 Bug #3281 Updated: Array handling returns "Array" or does something stupid when keys are strings
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-14849@lists.php.net to get a copy of this message
This should not work! Example 1 Correct: <?php $a['b']['a c'] = "lala"; echo "{$a['b']['a c']}"; // or echo $a['b']['a c']; ?> Example 2 Correct: <?php $z['hello baby'] = "yo"; $z['bubye baby'] = "bah"; print implode("\0", array_keys($z)); ?> Sterling Hughes sterling@designmultimedia.com : ID: 3281 : User Update by: johnston@itactics.com : Status: Open : Bug Type: Scripting Engine problem : Description: Array handling returns "Array" or does something stupid when keys are strings : : <?php : $[b]['a c'] = "lala"; : echo "$a[b]['a c']"; : ?> : : returns "Array" : : <?php : $z['hello baby'] = "yo"; : $z['bubye baby'] = "bah"; : print array_keys($z); : ?> : : also, returns "Array" : : I'm trying to write a script that parses out a mail header into $message[header][headername] = "value"; and headername might be a few words or might have some weird chars in it and php's buggy arrays are causing me grief - lots of grief. It wouldnt even matter if i removed all weird characters. : : Full Bug description available at: http://bugs.php.net/version4/?id=3281 : : : -- : 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 :

« previous php.dev (#14849) next »