3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Filter { // A constructor in PHP 4 and 5 function __construct(int $a) { echo $a; } } $o1 = new Filter(5); $o2 = new Filter('5');
based on fgqg7
Output for 7.0.0 - 7.2.0
55
Output for 5.3.19 - 5.6.28
Catchable fatal error: Argument 1 passed to Filter::__construct() must be an instance of int, integer given, called in /in/DrUWp on line 10 and defined in /in/DrUWp on line 5
Process exited with code 255.