/hphp/test/slow/ext_preg/preg_replace_callback.php
PHP | 20 lines | 17 code | 3 blank | 0 comment | 0 complexity | c78ef7ef149a9788e6ac91cb5ca7ef8e MD5 | raw file
Possible License(s): LGPL-2.1, BSD-2-Clause, BSD-3-Clause, MPL-2.0-no-copyleft-exception, MIT, LGPL-2.0, Apache-2.0
- <?hh
- function preg_replace_callback_main() {
- $count = -1;
- var_dump(preg_replace_callback(
- '/(a)/',
- function ($matches) {
- return str_repeat($matches[0], 500);
- },
- 'aaaaaaaaaaaaaaaaaaaa',
- -1,
- inout $count
- ));
- }
- <<__EntryPoint>>
- function main_preg_replace_callback() {
- preg_replace_callback_main();
- }