3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function gimmeAnInt(): int { return PHP_INT_MAX + 1; } echo gimmeAnInt();
Output for 7.3.0alpha1 - 7.3.0rc3
Fatal error: Uncaught TypeError: Return value of gimmeAnInt() must be of the type int, float returned in /in/WtIFn:5 Stack trace: #0 /in/WtIFn(8): gimmeAnInt() #1 {main} thrown in /in/WtIFn on line 5
Process exited with code 255.
Output for 7.0.0 - 7.2.6
Fatal error: Uncaught TypeError: Return value of gimmeAnInt() must be of the type integer, float returned in /in/WtIFn:5 Stack trace: #0 /in/WtIFn(8): gimmeAnInt() #1 {main} thrown in /in/WtIFn on line 5
Process exited with code 255.
Output for hhvm-3.11.1 - 3.17.3
-9223372036854775808
Output for hhvm-3.10.1
Fatal error: Syntax only allowed in Hack files (<?hh) or with -v Eval.EnableHipHopSyntax=true in /in/WtIFn on line 3
Process exited with code 255.
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.6.30
Parse error: syntax error, unexpected ':', expecting '{' in /in/WtIFn on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected ':', expecting '{' in /in/WtIFn on line 3
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `'{'' in /in/WtIFn on line 3
Process exited with code 255.