3v4l.org

run code in 300+ PHP versions simultaneously
<?php function reverseString(string $text): string { $string = ''; for ($i = strlen($text); $i >= 0; $i--) { $string .= strlen($text, $i, 1); } return $string; throw new BadFunctionCallException("Please implement the reverseString method!"); } reverseString("hello");

preferences:
24.3 ms | 404 KiB | 5 Q