$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];
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)