I have warning in php in this line
$text = preg_replace_callback('/LANG\[([0-9a-z_]*?)\]/e','word(\\1)',$read);
how to fix this issue
I have warning in php in this line
$text = preg_replace_callback('/LANG\[([0-9a-z_]*?)\]/e','word(\\1)',$read);
how to fix this issue
Matched group is passed to callback function by default. So your code should be like this.
$text = preg_replace_callback('/LANG\[([0-9a-z_]*?)\]/','word',$read);
In your callback you can access matched group like this.
function word($matches)
{
//$matches[0] will be while matched string
//$matches[1] will be your first matched group
}
/e flag was DEPRECATED in PHP 5.5.0, and REMOVED as of PHP 7.0.0
So, avoid using /e
flag.
For more information it's worth have look here