3v4l.org

run code in 300+ PHP versions simultaneously
<?php $vowels = array('a','e','i','o','u'); $other = array('b','c','d','f','g','h','j','k','l','m', 'n', 'p', 'q', 'r', 's', 't', 'v', 'w', 'x', 'y', 'z'); $prev = null; for ($x=0,$s=null,$s=null;$x<5;$x++) { if (in_array($prev, $other)) { $s .= $vowels[array_rand($vowels)]; } else { $s .= $other[array_rand($other)]; } $prev = $s; } echo $s;

preferences:
34.09 ms | 402 KiB | 5 Q