php-src/tests/strings/bug22592.phpt

28 lines
434 B
Plaintext
Raw Normal View History

2003-12-22 22:53:48 +00:00
--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);
2005-11-16 15:13:20 +00:00
$correct[1] = '*';
$correct[3] = '*';
$correct[5] = '*';
2003-12-22 22:53:48 +00:00
// This produces the
2005-11-16 15:13:20 +00:00
$wrong[1] = $wrong[3] = $wrong[5] = '*';
2003-12-22 22:53:48 +00:00
var_dump($correct);
var_dump($wrong);
?>
--EXPECT--
string(6) "abcdef"
string(6) "abcdef"
string(6) "a*c*e*"
string(6) "a*c*e*"