run code in 200+ php & hhvm versions
Bugs & Features
<?php declare(strict_types=true); class User { } function greet(User $u){ } greet(null);
Output for 7.0.0
Fatal error: strict_types declaration must have 0 or 1 as its value in /in/e8Ljd on line 3
Process exited with code 255.
Output for 5.3.20 - 5.6.16
Warning: Unsupported declare 'strict_types' in /in/e8Ljd on line 3 Catchable fatal error: Argument 1 passed to greet() must be an instance of User, null given, called in /in/e8Ljd on line 13 and defined in /in/e8Ljd on line 10
Process exited with code 255.