summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorStanislav Malyshev <stas@php.net>2011-12-26 01:08:47 +0000
committerStanislav Malyshev <stas@php.net>2011-12-26 01:08:47 +0000
commite4f40a3375f4838d343bf9169b39ad2208135bc0 (patch)
tree8e599e71697408bb503c0f43db91930c1e82d13b /tests
parent0e563dfa93f9c1927fabf699676abf23a98549ea (diff)
downloadphp-git-e4f40a3375f4838d343bf9169b39ad2208135bc0.tar.gz
fix tests
Diffstat (limited to 'tests')
-rw-r--r--tests/lang/bug19943.phpt4
-rw-r--r--tests/strings/offsets_general.phpt10
2 files changed, 9 insertions, 5 deletions
diff --git a/tests/lang/bug19943.phpt b/tests/lang/bug19943.phpt
index 294a320bf7..c951190511 100644
--- a/tests/lang/bug19943.phpt
+++ b/tests/lang/bug19943.phpt
@@ -5,11 +5,11 @@ Bug #19943 (memleaks)
$ar = array();
for ($count = 0; $count < 10; $count++) {
$ar[$count] = "$count";
- $ar[$count]['idx'] = "$count";
+ @$ar[$count]['idx'] = "$count";
}
for ($count = 0; $count < 10; $count++) {
- echo $ar[$count]." -- ".$ar[$count]['idx']."\n";
+ echo $ar[$count]." -- ".@$ar[$count]['idx']."\n";
}
$a = "0123456789";
$a[9] = $a[0];
diff --git a/tests/strings/offsets_general.phpt b/tests/strings/offsets_general.phpt
index 3ad779d2d1..9d69ea2bf5 100644
--- a/tests/strings/offsets_general.phpt
+++ b/tests/strings/offsets_general.phpt
@@ -18,17 +18,21 @@ var_dump(isset($string{0}{0}));
var_dump($string{"foo"});
var_dump(isset($string{"foo"}{"bar"}));
?>
---EXPECT--
+--EXPECTF--
string(1) "f"
string(1) "o"
bool(true)
bool(true)
+
+Warning: Illegal string offset 'foo' in %s line %d
string(1) "f"
-bool(true)
+bool(false)
string(1) "f"
string(1) "o"
bool(true)
bool(true)
+
+Warning: Illegal string offset 'foo' in %s line %d
string(1) "f"
-bool(true)
+bool(false)