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:
30.71 ms | 405 KiB | 5 Q