3v4l.org

run code in 500+ PHP versions simultaneously
<?php $array = [ 'Nartinez', 'Drantch', 'Dratch', 'Xtmnprwq', 'Yelendez', 'Boldberg', 'Yelenovich', 'Allash', 'Mohamed', 'Li', ]; $regex = <<<REGEX / ^ (?![aeiou]{3,}) (?: \D(?![^aeiou]{5,}[aeiou]*) (?![aeiou]{4,}) ){2,} $ /ix REGEX; var_export(preg_grep($regex, $array));
Output for 8.1.0 - 8.1.34, 8.2.0 - 8.2.32, 8.3.0 - 8.3.33, 8.4.1 - 8.4.24, 8.5.0 - 8.5.9
array ( 0 => 'Nartinez', 1 => 'Drantch', 2 => 'Dratch', 4 => 'Yelendez', 5 => 'Boldberg', 6 => 'Yelenovich', 7 => 'Allash', 8 => 'Mohamed', 9 => 'Li', )

preferences:
91.11 ms | 1050 KiB | 4 Q