3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = 12; $b = 2; if ($b == 0) echo "b is zero\n"; else echo "<td>" . $a / $b . "</td>\n"; $b = 0; if ($b == 0) echo "b is zero\n"; else echo "<td>" . $a / $b . "</td>\n"; $b = "blah"; if ($b == 0) echo "b is zero\n"; else echo "<td>" . $a / $b . "</td>\n"; $b = 1e-99; if ($b == 0) echo "b is zero\n"; else echo "<td>" . $a / $b . "</td>\n";
Output for 4.3.0 - 5.6.30, hhvm-3.10.1 - 3.17.3, 7.0.0 - 7.1.10
<td>6</td> b is zero b is zero <td>1.2E+100</td>