mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
fix tests
This commit is contained in:
parent
0e563dfa93
commit
e4f40a3375
2 changed files with 15 additions and 11 deletions
|
@ -5,11 +5,11 @@ Bug #19943 (memleaks)
|
||||||
$ar = array();
|
$ar = array();
|
||||||
for ($count = 0; $count < 10; $count++) {
|
for ($count = 0; $count < 10; $count++) {
|
||||||
$ar[$count] = "$count";
|
$ar[$count] = "$count";
|
||||||
$ar[$count]['idx'] = "$count";
|
@$ar[$count]['idx'] = "$count";
|
||||||
}
|
}
|
||||||
|
|
||||||
for ($count = 0; $count < 10; $count++) {
|
for ($count = 0; $count < 10; $count++) {
|
||||||
echo $ar[$count]." -- ".$ar[$count]['idx']."\n";
|
echo $ar[$count]." -- ".@$ar[$count]['idx']."\n";
|
||||||
}
|
}
|
||||||
$a = "0123456789";
|
$a = "0123456789";
|
||||||
$a[9] = $a[0];
|
$a[9] = $a[0];
|
||||||
|
|
|
@ -18,17 +18,21 @@ var_dump(isset($string{0}{0}));
|
||||||
var_dump($string{"foo"});
|
var_dump($string{"foo"});
|
||||||
var_dump(isset($string{"foo"}{"bar"}));
|
var_dump(isset($string{"foo"}{"bar"}));
|
||||||
?>
|
?>
|
||||||
--EXPECT--
|
--EXPECTF--
|
||||||
string(1) "f"
|
string(1) "f"
|
||||||
string(1) "o"
|
string(1) "o"
|
||||||
bool(true)
|
bool(true)
|
||||||
bool(true)
|
bool(true)
|
||||||
string(1) "f"
|
|
||||||
bool(true)
|
Warning: Illegal string offset 'foo' in %s line %d
|
||||||
string(1) "f"
|
string(1) "f"
|
||||||
string(1) "o"
|
bool(false)
|
||||||
bool(true)
|
string(1) "f"
|
||||||
bool(true)
|
string(1) "o"
|
||||||
string(1) "f"
|
bool(true)
|
||||||
bool(true)
|
bool(true)
|
||||||
|
|
||||||
|
Warning: Illegal string offset 'foo' in %s line %d
|
||||||
|
string(1) "f"
|
||||||
|
bool(false)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue