3v4l.org

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

preferences:
28.7 ms | 402 KiB | 5 Q