summaryrefslogtreecommitdiff
path: root/ext/ereg/tests/eregi_basic_003.phpt
blob: f045ad42805bc3706ab8e650a56ed4c8b979706c (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
--TEST--
Test eregi() function : basic functionality - long RE
--FILE--
<?php
/* Prototype  : proto int eregi(string pattern, string string [, array registers])
 * Description: Regular expression match 
 * Source code: ext/standard/reg.c
 * Alias to functions: 
 */

/*
 * Test a long RE with lots of matches
 */

var_dump(eregi(str_repeat('(.)', 2048), str_repeat('x', 2048)));
var_dump(eregi(str_repeat('(.)', 2048), str_repeat('x', 2048), $regs));
var_dump(count($regs));

echo "Done";
?>
--EXPECTF--
Deprecated: Function eregi() is deprecated in %s on line %d
int(1)

Deprecated: Function eregi() is deprecated in %s on line %d
int(2048)
int(2049)
Done