Bug #12257: list() construct doesn't work as expected.

From: Date: Thu, 19 Jul 2001 15:40:26 +0000
Subject: Bug #12257: list() construct doesn't work as expected.
Groups: php.dev 
Request: Send a blank email to php-dev+get-60307@lists.php.net to get a copy of this message
From:             daniel_sevcik@hotmail.com
Operating system: W2000, Debian
PHP version:      4.0.6
PHP Bug Type:     Scripting Engine problem
Bug description:  list() construct doesn't work as expected.

<?php
	$tmp=array(0=>1, "test"=>2);
	list($xx,$yy)=$tmp;
	echo("$xx, $yy");
?>

---Output:start---
1,
---Output:end-----

Variable $yy is empty (only if key name is not integer).
$tmp=array(0=>1, 1=>2);
In this case - it works...

Danny
-- 
Edit bug report at: http://bugs.php.net/?id=12257&edit=1



Thread (2 messages)

« previous php.dev (#60307) next »