3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $i = 1; echo '<table>'; while ($data = mysql_fetch_array($result)) { echo ' <tr>'; echo ' <td bgcolor="'; echo (($i % 2) == 0) ? '#eee' : '#ddd' ; echo '">'; echo $data['field']; echo ' </td>'; echo ' </tr>'; $i++; } echo '</table>';
Output for 7.0.0 - 7.1.0
<table> Fatal error: Uncaught Error: Call to undefined function mysql_fetch_array() in /in/pRdZk:4 Stack trace: #0 {main} thrown in /in/pRdZk on line 4
Process exited with code 255.
Output for hhvm-3.12.0
<table> Notice: Undefined variable: result in /in/pRdZk on line 4 Warning: mysql_fetch_array() expects parameter 1 to be resource, null given in /in/pRdZk on line 4 </table>
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.0.0 - 5.6.28
<table> Fatal error: Call to undefined function mysql_fetch_array() in /in/pRdZk on line 4
Process exited with code 255.
Output for 4.3.0 - 4.4.9
<table> Notice: Undefined variable: result in /in/pRdZk on line 4 Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /in/pRdZk on line 4 </table>