3v4l.org

run code in 300+ PHP versions simultaneously
<?php function reverse($string) { $substr1 = ""; $substr2 = ""; for ($i = 0; $i < (strlen($string) / 2); $i++) { $substr1 += $string[strlen($string)-$i]; $substr2 += $string[$i]; } return $string = $substr1 + $string2; } reverse('12345');
Output for git.master, git.master_jit, rfc.property-hooks
Warning: Uninitialized string offset 5 in /in/sq6jB on line 6 Fatal error: Uncaught TypeError: Unsupported operand types: string + string in /in/sq6jB:6 Stack trace: #0 /in/sq6jB(12): reverse('12345') #1 {main} thrown in /in/sq6jB on line 6
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:
45.63 ms | 401 KiB | 8 Q