2008-04-11 08:57:17 +00:00
|
|
|
--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--
|
2008-11-18 17:55:07 +00:00
|
|
|
Deprecated: Function eregi() is deprecated in %s on line %d
|
2008-04-11 08:57:17 +00:00
|
|
|
int(1)
|
2008-11-18 17:55:07 +00:00
|
|
|
|
|
|
|
Deprecated: Function eregi() is deprecated in %s on line %d
|
2008-04-11 08:57:17 +00:00
|
|
|
int(2048)
|
|
|
|
int(2049)
|
2008-11-18 17:55:07 +00:00
|
|
|
Done
|