3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); function concat(string $separator = ' ', string ...$strings): string { return implode($separator, $strings); } echo concat(':', 'One', 'Two', 'Three') . "\n"; echo concat(default, '1', '2', '3');
Output for 5.5.24 - 5.5.30, 5.6.8 - 5.6.15
Warning: Unsupported declare 'strict_types' in /in/5mKNF on line 3 Fatal error: Default value for parameters with a class type hint can only be NULL in /in/5mKNF on line 5
Process exited with code 255.

preferences:
168 ms | 1395 KiB | 22 Q