3v4l.org

run code in 300+ PHP versions simultaneously
<?php $vowels = array('a','e','i','o','u'); $other = array(); $prev = null; for ($x=0,$s=null,$s=null;$x<4;$x++) { if (in_array($prev, $other)) { $s .= $vowels[array_rand($vowels)]; } else { $s .= $other[array_rand($other)]; } $prev = $s; } echo $s;

preferences:
26.48 ms | 402 KiB | 5 Q