3v4l.org

run code in 300+ PHP versions simultaneously
<?php $texts = [ 3 => 'Fizz', 5 => 'Buzz', 7 => 'Gezz' ]; echo join(', ', array_map($x) use ($texts) { $y = ''; foreach($texts as $d=>$text) { if($x%$d==0) $y .= $text; } return $y?:$x; }, range(1, 100));
Output for 5.4.0 - 5.4.27
Parse error: syntax error, unexpected 'use' (T_USE) in /in/gRYkm on line 8
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected '[' in /in/gRYkm on line 2
Process exited with code 255.

preferences:
182.24 ms | 1395 KiB | 64 Q