1--TEST-- 2Test ereg() function : basic functionality - a few non-matches 3--FILE-- 4<?php 5/* Prototype : proto int ereg(string pattern, string string [, array registers]) 6 * Description: Regular expression match 7 * Source code: ext/standard/reg.c 8 * Alias to functions: 9 */ 10 11$regs = 'original'; 12 13var_dump(ereg('A', 'a', $regs)); 14var_dump(ereg('[A-Z]', '0', $regs)); 15var_dump(ereg('(a){4}', 'aaa', $regs)); 16var_dump(ereg('^a', 'ba', $regs)); 17var_dump(ereg('b$', 'ba', $regs)); 18var_dump(ereg('[:alpha:]', 'x', $regs)); 19 20// Ensure $regs is unchanged 21var_dump($regs); 22 23echo "Done"; 24?> 25--EXPECTF-- 26Deprecated: Function ereg() is deprecated in %s on line %d 27bool(false) 28 29Deprecated: Function ereg() is deprecated in %s on line %d 30bool(false) 31 32Deprecated: Function ereg() is deprecated in %s on line %d 33bool(false) 34 35Deprecated: Function ereg() is deprecated in %s on line %d 36bool(false) 37 38Deprecated: Function ereg() is deprecated in %s on line %d 39bool(false) 40 41Deprecated: Function ereg() is deprecated in %s on line %d 42bool(false) 43string(8) "original" 44Done 45