Busybox: Upgrade to 1.21.1 (stable). lsof active.
[tomato.git] / release / src / router / php / ext / ereg / tests / eregi_basic_002.phpt
blobf81821ab1bcabbce038f6b69609e8e0f910dc083
1 --TEST--
2 Test eregi() function : basic functionality  (without $regs)
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  */
12  * Test a number of simple, valid matches with eregi, without specifying $regs
13  */
15 echo "*** Testing eregi() : basic functionality ***\n";
17 include(dirname(__FILE__) . '/regular_expressions.inc');
19 foreach ($expressions as $re) {
20         list($pattern,$string) = $re;
21         echo "--> Pattern: '$pattern'; string: '$string'\n";
22         var_dump(eregi($pattern, $string));
25 echo "Done";
27 --EXPECTF--
28 *** Testing eregi() : basic functionality ***
29 --> Pattern: '..(a|b|c)(a|b|c)..'; string: '--- ab ---'
31 Deprecated: Function eregi() is deprecated in %s on line %d
32 int(1)
33 --> Pattern: '()'; string: ''
35 Deprecated: Function eregi() is deprecated in %s on line %d
36 int(1)
37 --> Pattern: '()'; string: 'abcdef'
39 Deprecated: Function eregi() is deprecated in %s on line %d
40 int(1)
41 --> Pattern: '[x]|[^x]'; string: 'abcdef'
43 Deprecated: Function eregi() is deprecated in %s on line %d
44 int(1)
45 --> Pattern: '(a{1})(a{1,}) (b{1,3}) (c+) (d?ddd|e)'; string: '--- aaa bbb ccc ddd ---'
47 Deprecated: Function eregi() is deprecated in %s on line %d
48 int(1)
49 --> Pattern: '\\\`\^\.\[\$\(\)\|\*\+\?\{\''; string: '\`^.[$()|*+?{''
51 Deprecated: Function eregi() is deprecated in %s on line %d
52 int(1)
53 --> Pattern: '\a'; string: 'a'
55 Deprecated: Function eregi() is deprecated in %s on line %d
56 int(1)
57 --> Pattern: '[0-9][^0-9]'; string: '2a'
59 Deprecated: Function eregi() is deprecated in %s on line %d
60 int(1)
61 --> Pattern: '^[[:alnum:]]{62,62}$'; string: '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
63 Deprecated: Function eregi() is deprecated in %s on line %d
64 int(1)
65 --> Pattern: '^[[:digit:]]{5}'; string: '0123456789'
67 Deprecated: Function eregi() is deprecated in %s on line %d
68 int(1)
69 --> Pattern: '[[:digit:]]{5}$'; string: '0123456789'
71 Deprecated: Function eregi() is deprecated in %s on line %d
72 int(1)
73 --> Pattern: '[[:blank:]]{1,10}'; string: '
74         '
76 Deprecated: Function eregi() is deprecated in %s on line %d
77 int(1)
78 --> Pattern: '[[:print:]]{3}'; string: ' a '
80 Deprecated: Function eregi() is deprecated in %s on line %d
81 int(1)
82 Done