Annotation of embedaddon/php/ext/ereg/tests/eregi_replace_basic.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Test eregi_replace() function : basic functionality - confirm case insensitivity
! 3: --FILE--
! 4:
! 5: <?php
! 6: /* Prototype : proto string eregi_replace(string pattern, string replacement, string string)
! 7: * Description: Case insensitive replace regular expression
! 8: * Source code: ext/standard/reg.c
! 9: * Alias to functions:
! 10: */
! 11:
! 12: /*
! 13: * Test basic functionality of eregi_replace()
! 14: */
! 15:
! 16: echo "*** Testing eregi_replace() : basic functionality ***\n";
! 17:
! 18: $string = 'UPPERCASE WORDS, lowercase words, MIxED CaSe woRdS';
! 19:
! 20: echo "String Before...\n";
! 21: var_dump($string);
! 22: echo "\nString after...\n";
! 23:
! 24: var_dump(eregi_replace('([[:lower:]]+) word', '\\1_character', $string));
! 25:
! 26: echo "Done";
! 27: ?>
! 28:
! 29: --EXPECTF--
! 30: *** Testing eregi_replace() : basic functionality ***
! 31: String Before...
! 32: string(50) "UPPERCASE WORDS, lowercase words, MIxED CaSe woRdS"
! 33:
! 34: String after...
! 35:
! 36: Deprecated: Function eregi_replace() is deprecated in %s on line %d
! 37: string(65) "UPPERCASE_characterS, lowercase_characters, MIxED CaSe_characterS"
! 38: Done
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>