3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function foo($compatibility) { return min(28, intval(round(28 * $compatiblity))); } foreach (array(0, 0.05, 0.1, 0.15, 0.2, 0.3, 0.4, 0.5) as $compatibility) { var_dump(foo($compatibility)); }
Output for 5.0.4 - 7.2.0
Notice: Undefined variable: compatiblity in /in/a8Ov7 on line 4 int(0) Notice: Undefined variable: compatiblity in /in/a8Ov7 on line 4 int(0) Notice: Undefined variable: compatiblity in /in/a8Ov7 on line 4 int(0) Notice: Undefined variable: compatiblity in /in/a8Ov7 on line 4 int(0) Notice: Undefined variable: compatiblity in /in/a8Ov7 on line 4 int(0) Notice: Undefined variable: compatiblity in /in/a8Ov7 on line 4 int(0) Notice: Undefined variable: compatiblity in /in/a8Ov7 on line 4 int(0) Notice: Undefined variable: compatiblity in /in/a8Ov7 on line 4 int(0)
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: compatiblity in /in/a8Ov7 on line 4 int(0) Notice: Undefined variable: compatiblity in /in/a8Ov7 on line 4 int(0) Notice: Undefined variable: compatiblity in /in/a8Ov7 on line 4 int(0) Notice: Undefined variable: compatiblity in /in/a8Ov7 on line 4 int(0) Notice: Undefined variable: compatiblity in /in/a8Ov7 on line 4 int(0) Notice: Undefined variable: compatiblity in /in/a8Ov7 on line 4 int(0) Notice: Undefined variable: compatiblity in /in/a8Ov7 on line 4 int(0) Notice: Undefined variable: compatiblity in /in/a8Ov7 on line 4 int(0)