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
Loading...
Related Quiz
- An object in PHP is created using the new keyword followed by the class name.
- You have a PHP script and you are getting an error when trying to create a MySQL table. How would you troubleshoot this issue?
- How can you include a file in PHP?
- How are variables in PHP declared?
- You are writing a PHP script and you need to find the highest value in a list of numbers. How would you do this?