" then translate it into the function syntax if(strpos($file_name, '>')){ $file_name = str_replace('>', '__', $file_name); // Replace ">" with "__" $file_name = preg_replace('/-([a-z])/e', 'strtoupper("$1")', $file_name); // Translate into camelCase } $this->views_overrides[$file_name] = $file_path; }