Possible Duplicate:
How can I convert ereg expressions to preg in PHP?
How can I convert ereg expressions to preg in PHP?
Apr 21, 2014 split is deprecated as of PHP 5.3.0. Pregsplit is the suggested alternative to this function. If you don't require the power of regular expressions, it is faster to use explode, which doesn't incur the overhead of the regular expression engine. If you are going to split in ' ' you might consider explode to be a better alternative. Aug 02, 2017 5 Answers. Deprecated in general means 'don't use it'. A deprecated function may or may not work, but it is not guaranteed to work.
My contact form is othervise working but I keep getting the following error:
Deprecated: Function ereg() is deprecated in/home/.....
I'm really lost here but I figure this is the part that needs some adjusting.
Finding a solution would be highly appreciated
![Deprecated Deprecated](http://files.vbulletin.com/doc_images/humanverification/recaptcha_complete.png)
Community♦
no0neno0ne
![Deprecated: Function Split Is Deprecated Vbulletin Deprecated: Function Split Is Deprecated Vbulletin](https://klevoclub.com/uploads/monthly_2019_02/339071298_2019-02-1916_10_01.png.6e948386063a7cb7fb329e137d4211b1.png)
1,2617 gold badges20 silver badges37 bronze badges
marked as duplicate by Álvaro González, Leri, Michael Berkowski, Azhar Shaikh, user960481 Nov 28 '12 at 5:42
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
3 Answers
You must use
preg_match
instead of ereg
because the last one is deprecated.
Replacing it is not a big deal:
will become:
p.s. I had to modify more than one hundred files while I was porting my old project to PHP 5.3 to avoid manually modifying I've used following script to do it for me:
I hope it helps.
LeriLeri
10.2k5 gold badges35 silver badges55 bronze badges
The function
KaiKai
ereg()
is deprecated and should not be used any more. The documentation tells you what to do (to use preg_match
instead).
31.6k9 gold badges80 silver badges99 bronze badges
Like you said - no bigie, it works like a charm:
Thank you guys
no0neno0ne
1,2617 gold badges20 silver badges37 bronze badges