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 = "12blah"; if ($b == 0) echo "b is zero\n"; else echo "<td>" . $a / $b . "</td>\n"; $b = 1e-999; if ($b == 0) echo "b is zero\n"; else echo "<td>" . $a / $b . "</td>\n";
Output for 7.1.0 - 7.3.0rc4
<td>6</td> b is zero Notice: A non well formed numeric value encountered in /in/K3fjO on line 16 <td>1</td> b is zero
Output for 4.3.0 - 7.0.20
<td>6</td> b is zero <td>1</td> b is zero