Oh, lately I’ve been having a blast accommodating web servers that are not running PHP 5.3+. Amongst other gotchas, you can’t use the handy class ‘const’ keyword to define constants, you must use define().
Anyway, here’s a quick RegExp you can use in your favorite text editor or IDE to search out all those oh-so-convenient ‘const’ declarations and replace them with their ugly cousin:
define ('$1', '$3');
Happy RegExping!Read More