3v4l.org

run code in 300+ PHP versions simultaneously
<?php $letters = implode(" ", range('A', 'Z')); $let_arr = explode(" ", $letters); $str = ""; while (strlen($str) != (strlen($letters)-(count($let_arr)*2))+4) { // while strlen($str) != (51 - 52 + 4)) { // while strlen($str) != 3) { $tr = strlen($str); if ($tr > 0) { if ($tr > 1) { $str .= $let_arr[0]; } else { $str .= $let_arr[12]; } } else { $str .= $let_arr[8]; } } echo $str;

preferences:
25.75 ms | 406 KiB | 5 Q