I have an error with phpstorm when I want to change this function
$callback = create_function('$matches', 'return strtoupper($matches[1]);');
by
callback = function('$matches', 'return strtoupper($matches[1]);');
How to resolve that if it's an error.
Thank you.
function()needs to have a body and any argument definitions need to be variables, not strings. The code above is simply invalid PHP. Are you trying to make an anonymous function? If yes, then here's the documentation about those.