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 = "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
<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 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.0.14
<td>6</td> b is zero <td>1</td> b is zero