Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
smalyshev committed Dec 26, 2011
1 parent 066879f commit d36263b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
4 changes: 2 additions & 2 deletions tests/lang/bug19943.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down
10 changes: 7 additions & 3 deletions tests/strings/offsets_general.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit d36263b

Please sign in to comment.