3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Test { private $booleanWert; public function setBooleanWert(bool $booleanWert) { $this->booleanWert = $booleanWert; } public function getBooleanWert() { return $this->booleanWert; } } $t = new Test(); $t->setBooleanWert(True); echo($t->getBooleanWert());
based on TXAWH
Output for 7.0.0 - 7.3.0beta1
1
Output for 5.6.0 - 5.6.26
Catchable fatal error: Argument 1 passed to Test::setBooleanWert() must be an instance of bool, boolean given, called in /in/KH4f4 on line 17 and defined in /in/KH4f4 on line 6
Process exited with code 255.