helly Mon Dec 22 17:53:48 2003 EDT
Added files:
/php-src/tests/strings bug22592.phpt
/php-src/tests/lang bug23524.phpt
Log:
Add more tests
Index: php-src/tests/strings/bug22592.phpt
+++ php-src/tests/strings/bug22592.phpt
--TEST--
Bug #22592 (Cascading assignments to strings with curly braces broken)
--FILE--
<?php
$wrong = $correct = 'abcdef';
$t = $x[] = 'x';
var_dump($correct);
var_dump($wrong);
$correct{1} = '*';
$correct{3} = '*';
$correct{5} = '*';
// This produces the
$wrong{1} = $wrong{3} = $wrong{5} = '*';
var_dump($correct);
var_dump($wrong);
?>
--EXPECT--
string(6) "abcdef"
string(6) "abcdef"
string(6) "a*c*e*"
string(6) "a*c*e*"
Index: php-src/tests/lang/bug23524.phpt
+++ php-src/tests/lang/bug23524.phpt
--TEST--
Bug #23524 Improper handling of constants in array indeces
--FILE--
<?php
echo "Begin\n";
define("THE_CONST",123);
function f($a=array(THE_CONST=>THE_CONST)) {
print_r($a);
}
f();
f();
f();
echo "Done";
?>
--EXPECT--
Begin
Array
(
[123] => 123
)
Array
(
[123] => 123
)
Array
(
[123] => 123
)
Done
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php