3v4l.org

run code in 300+ PHP versions simultaneously
<?php $messages = [ 'Fout in veld 1', 'Fout in veld 2', 'Fouten in veld 3' => [ 'titel', 'is niet uniek', 'moet minimaal 3 tekens lang zijn', ], 'Fout in veld 6' ]; function rec($messages, $i = 0) { foreach($messages as $title => $message) { if (is_array($message)) { $k = $i + 1; return rec($message, $k); } $output = ''; for ($j = -1; $j < $i; $j++) { $output .= ' - '; } echo $output . $message + "\n"; } } rec($messages);
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught TypeError: Unsupported operand types: string + string in /in/vOv2h:31 Stack trace: #0 /in/vOv2h(37): rec(Array) #1 {main} thrown in /in/vOv2h on line 31
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:
41.34 ms | 401 KiB | 8 Q