3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class booHoo{ public function __construct($stupidNumber, $anotherStupidNumber) { $this->stupidNumber = $stupidNumber; $this->anotherStupidNumber = $anotherStupidNumber; } public function magic() { $suchFraction = fmod($this->stupidNumber, $this->anotherStupidNumber); if($suchFraction > 0) { echo 'such Float, much fraction. Wow'; } else { echo 'such Integer, much clean. Wow'; } } } $greeter = new booHoo($count, $multiple); $greeter->magic();
Output for 5.4.0 - 5.6.28, hhvm-3.10.0, 7.0.0 - 7.1.0
Notice: Undefined variable: count in /in/6Atr5 on line 21 Notice: Undefined variable: multiple in /in/6Atr5 on line 21 such Integer, much clean. Wow
Output for hhvm-3.12.0 - 3.13.2
Notice: Undefined variable: count in /in/6Atr5 on line 21 Notice: Undefined variable: multiple in /in/6Atr5 on line 21 Warning: fmod() expects parameter 1 to be double, null given in /in/6Atr5 on line 10 such Integer, much clean. Wow
Output for 5.0.4 - 5.3.29
Notice: Undefined variable: count in /in/6Atr5 on line 21 Notice: Undefined variable: multiple in /in/6Atr5 on line 21 such Float, much fraction. Wow
Output for 5.0.0 - 5.0.3
Notice: Undefined variable: count in /in/6Atr5 on line 21 Notice: Undefined variable: multiple in /in/6Atr5 on line 21 such Float, much fraction. Wow
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/6Atr5 on line 4
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/6Atr5 on line 4
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' in /in/6Atr5 on line 4
Process exited with code 255.