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===DONE=== 20--EXPECT-- 21a-s-d-d-/-?+ 22===DONE=== 23