3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = 'hello world!'; $output = ''; for ($i = 0; $i < strlen($string); $i++) { $output .= chr(substr($string, 1, $i)); } echo $output;

preferences:
65.11 ms | 402 KiB | 5 Q