xref: /php-src/tests/strings/bug22592.phpt (revision d7a3edd4)
1--TEST--
2Bug #22592 (Cascading assignments to strings with curly braces broken)
3--FILE--
4<?php
5$wrong = $correct = 'abcdef';
6
7$t = $x[] = 'x';
8
9var_dump($correct);
10var_dump($wrong);
11
12$correct[1] = '*';
13$correct[3] = '*';
14$correct[5] = '*';
15
16// This produces the
17$wrong[1] = $wrong[3] = $wrong[5] = '*';
18
19var_dump($correct);
20var_dump($wrong);
21
22?>
23--EXPECT--
24string(6) "abcdef"
25string(6) "abcdef"
26string(6) "a*c*e*"
27string(6) "a*c*e*"
28