3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Test { public $a; public $b; public function __construct ($a) { $this->a = $a; } public function __construct ($a, $b) { $this->a = $a; $this->b = $b; } } $var = new Test (1); $var1 = new Test (1, 2); vardump ($var); vardump ($var1);
Output for 5.3.0 - 5.4.24
Fatal error: Cannot redeclare Test::__construct() in /in/bgNgA on line 10
Process exited with code 255.