xref: /PHP-5.6/ext/ereg/tests/ereg_basic_003.phpt (revision 1881091e)
1--TEST--
2Test ereg() function : basic functionality - long RE
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/*
12 * Test a long RE with lots of matches
13 */
14
15var_dump(ereg(str_repeat('(.)', 2048), str_repeat('x', 2048)));
16var_dump(ereg(str_repeat('(.)', 2048), str_repeat('x', 2048), $regs));
17var_dump(count($regs));
18
19echo "Done";
20?>
21--EXPECTF--
22Deprecated: Function ereg() is deprecated in %s on line %d
23int(1)
24
25Deprecated: Function ereg() is deprecated in %s on line %d
26int(2048)
27int(2049)
28Done
29