3v4l.org

run code in 300+ PHP versions simultaneously
<?php $sFullPermComment = 'YNYNYNY'; preg_match("/^(Y|N).....(?<!\\1)$/", $sFullPermComment,$matches); echo print_r($matches, true);

preferences:
55.78 ms | 402 KiB | 5 Q