3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = 'ADJKANKNAKLNKALNFKLANFKLNAKLFNKALN'; [$first5, $string] = preg_split('~.{5}\K~', $string, 2); var_export([$first5, $string]);

preferences:
115.36 ms | 2690 KiB | 5 Q