2003-12-30 00:23:28 +00:00
|
|
|
--TEST--
|
|
|
|
Bug #26696 (crash in switch() when string index is used)
|
|
|
|
--FILE--
|
|
|
|
<?php
|
|
|
|
$str = 'asdd/?';
|
|
|
|
$len = strlen($str);
|
|
|
|
for ($i = 0; $i < $len; $i++) {
|
|
|
|
switch ($str[$i]) {
|
2004-01-05 14:01:09 +00:00
|
|
|
case '?':
|
2004-01-25 13:19:16 +00:00
|
|
|
echo "?+\n";
|
2004-01-05 14:01:09 +00:00
|
|
|
break;
|
|
|
|
default:
|
2004-01-25 13:19:16 +00:00
|
|
|
echo $str[$i].'-';
|
2004-01-05 14:01:09 +00:00
|
|
|
break;
|
2003-12-30 00:23:28 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
?>
|
2004-01-05 14:01:09 +00:00
|
|
|
===DONE===
|
2003-12-30 00:23:28 +00:00
|
|
|
--EXPECT--
|
2004-01-25 13:19:16 +00:00
|
|
|
a-s-d-d-/-?+
|
2004-01-05 14:01:09 +00:00
|
|
|
===DONE===
|