summaryrefslogtreecommitdiff
path: root/ext/ereg/tests/ereg_basic_004.phpt
blob: 20bdf80073095741115949d72b2ceeb26e0ac674 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
--TEST--
Test ereg() function : basic functionality - a few non-matches
--FILE--
<?php
/* Prototype  : proto int ereg(string pattern, string string [, array registers])
 * Description: Regular expression match 
 * Source code: ext/standard/reg.c
 * Alias to functions: 
 */

$regs = 'original';

var_dump(ereg('A', 'a', $regs));
var_dump(ereg('[A-Z]', '0', $regs));
var_dump(ereg('(a){4}', 'aaa', $regs));
var_dump(ereg('^a', 'ba', $regs));
var_dump(ereg('b$', 'ba', $regs));
var_dump(ereg('[:alpha:]', 'x', $regs));

// Ensure $regs is unchanged
var_dump($regs);

echo "Done";
?>
--EXPECTF--
Deprecated: Function ereg() is deprecated in %s on line %d
bool(false)

Deprecated: Function ereg() is deprecated in %s on line %d
bool(false)

Deprecated: Function ereg() is deprecated in %s on line %d
bool(false)

Deprecated: Function ereg() is deprecated in %s on line %d
bool(false)

Deprecated: Function ereg() is deprecated in %s on line %d
bool(false)

Deprecated: Function ereg() is deprecated in %s on line %d
bool(false)
string(8) "original"
Done