I'm trying to use NameCase a php class on code.google.com. When I run it I get this notice and I don't understand why.
PHP Notice: Use of undefined constant Mc - assumed 'Mc' in namecase.php(54) : regexp code on line 1
53 if( preg_match('/\bMac[A-Za-z]{2,}[^aciozj]\b/', $str) || preg_match('/\bMc/', $str) ) {
54 $str = preg_replace("/\b(Ma?c)([A-Za-z]+)/e", "$1.ucfirst('\\2')", $str);
55 // Now correct for "Mac" exceptions
56 $str = preg_replace('/\bMacEvicius/','Macevicius', $str); // Lithuanian
57 $str = preg_replace('/\bMacHado/', 'Machado', $str); // Portuguese
58 $str = preg_replace('/\bMacHar/', 'Machar', $str);
59 ...
Is there anything that can be done to correct the code so it doesn't produce the notice.
Thanks