summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/lang/bug19943.phpt2
-rw-r--r--tests/lang/bug22592.phpt20
-rw-r--r--tests/lang/bug26696.phpt4
-rwxr-xr-xtests/strings/bug22592.phpt8
4 files changed, 17 insertions, 17 deletions
diff --git a/tests/lang/bug19943.phpt b/tests/lang/bug19943.phpt
index 3be703fb1d..294a320bf7 100644
--- a/tests/lang/bug19943.phpt
+++ b/tests/lang/bug19943.phpt
@@ -12,7 +12,7 @@ Bug #19943 (memleaks)
echo $ar[$count]." -- ".$ar[$count]['idx']."\n";
}
$a = "0123456789";
- $a[9] = $a{0};
+ $a[9] = $a[0];
var_dump($a);
?>
--EXPECT--
diff --git a/tests/lang/bug22592.phpt b/tests/lang/bug22592.phpt
index e4e68b1184..351ea08b9b 100644
--- a/tests/lang/bug22592.phpt
+++ b/tests/lang/bug22592.phpt
@@ -13,26 +13,26 @@ $s = "string";
$result = "* *-*";
var_dump($result);
-$result{6} = '*';
+$result[6] = '*';
var_dump($result);
-$result{1} = $i;
+$result[1] = $i;
var_dump($result);
-$result{3} = $s;
+$result[3] = $s;
var_dump($result);
-$result{7} = 0;
+$result[7] = 0;
var_dump($result);
-$a = $result{1} = $result{3} = '-';
+$a = $result[1] = $result[3] = '-';
var_dump($result);
-$b = $result{3} = $result{5} = $s;
+$b = $result[3] = $result[5] = $s;
var_dump($result);
-$c = $result{0} = $result{2} = $result{4} = $i;
+$c = $result[0] = $result[2] = $result[4] = $i;
var_dump($result);
-$d = $result{6} = $result{8} = 5;
+$d = $result[6] = $result[8] = 5;
var_dump($result);
-$e = $result{1} = $result{6};
+$e = $result[1] = $result[6];
var_dump($result);
var_dump($a, $b, $c, $d, $e);
-$result{-1} = 'a';
+$result[-1] = 'a';
?>
--EXPECT--
string(5) "* *-*"
diff --git a/tests/lang/bug26696.phpt b/tests/lang/bug26696.phpt
index e51978b3d2..dae182d307 100644
--- a/tests/lang/bug26696.phpt
+++ b/tests/lang/bug26696.phpt
@@ -6,7 +6,7 @@ Bug #26696 (string index in a switch() crashes with multiple matches)
$str = 'asdd/?';
$len = strlen($str);
for ($i = 0; $i < $len; $i++) {
- switch ($str{$i}) {
+ switch ($str[$i]) {
case '?':
echo "OK\n";
break;
@@ -14,7 +14,7 @@ for ($i = 0; $i < $len; $i++) {
}
$str = '*';
-switch ($str{0}) {
+switch ($str[0]) {
case '*';
echo "OK\n";
break;
diff --git a/tests/strings/bug22592.phpt b/tests/strings/bug22592.phpt
index 0c13e50164..3443c32859 100755
--- a/tests/strings/bug22592.phpt
+++ b/tests/strings/bug22592.phpt
@@ -9,12 +9,12 @@ $t = $x[] = 'x';
var_dump($correct);
var_dump($wrong);
-$correct{1} = '*';
-$correct{3} = '*';
-$correct{5} = '*';
+$correct[1] = '*';
+$correct[3] = '*';
+$correct[5] = '*';
// This produces the
-$wrong{1} = $wrong{3} = $wrong{5} = '*';
+$wrong[1] = $wrong[3] = $wrong[5] = '*';
var_dump($correct);
var_dump($wrong);