What is the difference between ereg_replace() and eregi_replace()?

  • ereg_replace() is case-sensitive, while eregi_replace() is case-insensitive
  • ereg_replace() supports regular expressions, while eregi_replace() does not support regular expressions
  • They perform the same operation
  • eregi_replace() returns a Boolean value, while ereg_replace() returns a string value
The ereg_replace() function in PHP performs a case-sensitive regular expression search and replace, while eregi_replace() is case-insensitive. They differ in case-sensitivity and support for regular expressions. Learn more: http://php.net/manual/en/function.ereg-replace.php
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *