Tuesday, March 2, 2010

Programmer - Can someone explain this code snippet in PHP?

Programmer Question

preg_replace(array('#/(.?)#e', '/(^|_|-)+(.)/e'), 
array("'::'.strtoupper('\\1')", "strtoupper('\\2')"), $text);


I've never used regex this way,how does it work?



Find the answer here

No comments:

Post a Comment

LinkWithin

Related Posts with Thumbnails