3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = 'FFFFRRFFFFFFFPPRRRRRRLLRLLRLLLPPFPPLPPLPPLFPPFFPFLRPFFRRLLRPFPRFFFFFFFLFDRRFRRFFFFFFFFRQEE'; $res = preg_split('/([PDQE])(?:.*\1)?/', $str); print_r($res);

preferences:
23.48 ms | 405 KiB | 5 Q