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");
Output for git.master_jit, git.master
Fatal error: Uncaught ArgumentCountError: strlen() expects exactly 1 argument, 3 given in /in/bN5U7:8 Stack trace: #0 /in/bN5U7(8): strlen('hello', 5, 1) #1 /in/bN5U7(15): reverseString('hello') #2 {main} thrown in /in/bN5U7 on line 8
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
26.64 ms | 405 KiB | 5 Q