Pig Latin via PHP

Pig Latin is a game of alterations played on the English language game. To create the Pig Latin form of an English word the initial consonant sound is transposed to the end of the word and an ay is affixed (Ex.: “banana” would yield anana-bay). Read Wikipedia for more information on rules.

function getPigLatin($word)
$first_pig_latin = preg_replace('#^([^aeiou]+)([aeiou]+)(.*)#', '$2$3$1ay', $word);
$result_pig_latin = preg_replace('#(^[aeiou].*)#', '$1way', $first_pig_latin);
return $result_pig_latin;
echo getPigLatin('banana');