mirror of
https://github.com/php/php-src.git
synced 2024-12-11 19:04:38 +08:00
22 lines
301 B
PHP
22 lines
301 B
PHP
--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]) {
|
|
case '?':
|
|
echo "?+\n";
|
|
break;
|
|
default:
|
|
echo $str[$i].'-';
|
|
break;
|
|
}
|
|
}
|
|
|
|
?>
|
|
===DONE===
|
|
--EXPECT--
|
|
a-s-d-d-/-?+
|
|
===DONE===
|