3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function fun(boolean $bool): boolean { return $bool; } fun((bool) true);
based on 5vpOc
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught TypeError: Argument 1 passed to fun() must be an instance of boolean, boolean given, called in /in/Le0lo on line 4 and defined in /in/Le0lo:3 Stack trace: #0 /in/Le0lo(4): fun(true) #1 {main} thrown in /in/Le0lo on line 3
Process exited with code 255.
Output for 5.3.20 - 5.6.28
Parse error: syntax error, unexpected ':', expecting '{' in /in/Le0lo on line 3
Process exited with code 255.