summaryrefslogtreecommitdiff
path: root/tests/strings/bug22592.phpt
blob: c66e27d880c8ebfe3180722cf54da97f9c3eb6c6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
--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*"