3v4l.org

run code in 150+ 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-34; if ($b == 0) echo "b is zero\n"; else echo "<td>" . $a / $b . "</td>\n";
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
<td>6</td> b is zero b is zero <td>1.2E+35</td>