xref: /PHP-8.1/Zend/tests/bug26696.phpt (revision f8d79582)
1--TEST--
2Bug #26696 (crash in switch() when string index is used)
3--FILE--
4<?php
5$str = 'asdd/?';
6$len = strlen($str);
7for ($i = 0; $i < $len; $i++) {
8    switch ($str[$i]) {
9    case '?':
10        echo "?+\n";
11        break;
12    default:
13        echo $str[$i].'-';
14        break;
15    }
16}
17
18?>
19--EXPECT--
20a-s-d-d-/-?+
21