summaryrefslogtreecommitdiff
path: root/tests/strings
diff options
context:
space:
mode:
authorMarcus Boerger <helly@php.net>2003-12-22 22:53:48 +0000
committerMarcus Boerger <helly@php.net>2003-12-22 22:53:48 +0000
commit717604ea70cfd7323237d1e0de9fba7b80e91786 (patch)
tree056cac0f5a0c54655c97dd8e0646d28d58be6a9e /tests/strings
parent26a0abbd0cfd4b691ac485206914aad0f68ba2ec (diff)
downloadphp-git-717604ea70cfd7323237d1e0de9fba7b80e91786.tar.gz
Add more tests
Diffstat (limited to 'tests/strings')
-rwxr-xr-xtests/strings/bug22592.phpt27
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/strings/bug22592.phpt b/tests/strings/bug22592.phpt
new file mode 100755
index 0000000000..0c13e50164
--- /dev/null
+++ b/tests/strings/bug22592.phpt
@@ -0,0 +1,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*"