File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / tests / lang / bug26696.phpt
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Tue Feb 21 23:48:06 2012 UTC (12 years, 8 months ago) by misho
Branches: php, MAIN
CVS tags: v5_4_3elwix, v5_4_29p0, v5_4_29, v5_4_20p0, v5_4_20, v5_4_17p0, v5_4_17, v5_3_10, HEAD
php

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

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>