3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function test(string $a): string { var_dump($a); return round($a, 2); } var_dump(test(2.3445545));
based on TCFFq
Output for hhvm-3.15.4, 7.0.0 - 7.2.6
string(9) "2.3445545" string(4) "2.34"
Output for 5.6.0 - 5.6.30
Parse error: syntax error, unexpected ':', expecting '{' in /in/Qf1rv on line 3
Process exited with code 255.