php-src/tests/strings/bug22592.phpt
2008-05-26 15:52:06 +00:00

28 lines
438 B
PHP
Executable File

--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--
unicode(6) "abcdef"
unicode(6) "abcdef"
unicode(6) "a*c*e*"
unicode(6) "a*c*e*"