xref: /PHP-5.3/ext/ereg/tests/eregi_basic_004.phpt (revision 1881091e)
1--TEST--
2Test eregi() function : basic functionality - a few non-matches
3--FILE--
4<?php
5/* Prototype  : proto int eregi(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(eregi('[A-Z]', '0', $regs));
14var_dump(eregi('(a){4}', 'aaa', $regs));
15var_dump(eregi('^a', 'ba', $regs));
16var_dump(eregi('b$', 'ba', $regs));
17var_dump(eregi('[:alpha:]', 'x', $regs));
18
19// Ensure $regs is unchanged
20var_dump($regs);
21
22echo "Done";
23?>
24--EXPECTF--
25Deprecated: Function eregi() is deprecated in %s on line %d
26bool(false)
27
28Deprecated: Function eregi() is deprecated in %s on line %d
29bool(false)
30
31Deprecated: Function eregi() is deprecated in %s on line %d
32bool(false)
33
34Deprecated: Function eregi() is deprecated in %s on line %d
35bool(false)
36
37Deprecated: Function eregi() is deprecated in %s on line %d
38bool(false)
39string(8) "original"
40Done
41