I have an old plugin that I am updating and I see ereg which was replaced by preg_match in php7.
Here is the code:
Would it be changed to?PHP Code:
if ( (!isset($_GET['sort'])) || (!ereg('[1-9][ad]', $_GET['sort'])) || (substr($_GET['sort'], 0, 1) > sizeof($define_list)) ) {
PHP Code:
if ( (!isset($_GET['sort'])) || (!preg_match('/[1-9][ad]', $_GET['sort'])) || (substr($_GET['sort'], 0, 1) > sizeof($define_list)) ) {
Bookmarks