@ 2015-11-22T17:42:57Z <?php
declare(strict_types=1);
function something(int $int, string $string): string {
return "{$string} {$int}";
}
echo something(9000, "Hello world >"); // Hello world > 9000
Enable javascript to submit You have javascript disabled. You will not be able to edit any code.
Output for 7.0.0 - 7.0.20 , 7.1.0 - 7.1.20 , 7.2.0 - 7.2.33 , 7.3.16 - 7.3.33 , 7.4.0 - 7.4.33 , 8.0.0 - 8.0.30 , 8.1.0 - 8.1.27 , 8.2.0 - 8.2.17 , 8.3.0 - 8.3.4 Hello world > 9000 Output for 5.5.0 - 5.5.38 , 5.6.0 - 5.6.30 Warning: Unsupported declare 'strict_types' in /in/tZCRh on line 3
Parse error: syntax error, unexpected ':', expecting '{' in /in/tZCRh on line 4
Process exited with code 255 . preferences:dark mode live preview
209.24 ms | 401 KiB | 238 Q