summaryrefslogtreecommitdiff
path: root/Zend/tests/bug26696.phpt
blob: a55dcf6ee5c2f6e1f5d8cbc1537a35a2bae44468 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--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;
    }
}

?>
--EXPECT--
a-s-d-d-/-?+