xref: /PHP-5.4/tests/lang/bug26696.phpt (revision cce5e8c9)
1--TEST--
2Bug #26696 (string index in a switch() crashes with multiple matches)
3--FILE--
4<?php
5
6$str = 'asdd/?';
7$len = strlen($str);
8for ($i = 0; $i < $len; $i++) {
9	switch ($str[$i]) {
10		case '?':
11			echo "OK\n";
12			break;
13	}
14}
15
16$str = '*';
17switch ($str[0]) {
18	case '*';
19		echo "OK\n";
20		break;
21	default:
22		echo 'Default RAN!';
23}
24
25?>
26--EXPECT--
27OK
28OK
29