3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php //$myarray= Array // ( // [0] => Array // ( // [id] => '3', // [first_name] => 'Jim', // [last_name] => 'Dude', // ), // [1] => Array // ( // [id] => '4', // [first_name] => 'John', // [last_name] => 'Dude2', // ) // ); foreach ($result as $row) { echo '<tr>'; echo '<td>' . $row['id'] . '</td>'; echo '<td>' . $row['first_name'] . '</td>'; echo '<td>' . $row['last_name'] . '</td>'; echo '</tr>'; } ?> ?>
based on U57uk
Output for 5.1.0 - 5.6.28, 7.0.0 - 7.1.0
Notice: Undefined variable: result in /in/JYXtX on line 19 Warning: Invalid argument supplied for foreach() in /in/JYXtX on line 19 ?>
Output for hhvm-3.12.0
Notice: Undefined variable: result in /in/JYXtX on line 26 Warning: Invalid argument supplied for foreach() in /in/JYXtX on line 26 ?>
Output for hhvm-3.10.0
Notice: Undefined variable: result in /in/JYXtX on line 3 Warning: Invalid argument supplied for foreach() in /in/JYXtX on line 3 ?>
Output for 4.3.0 - 4.3.10, 4.4.0 - 5.0.5
Warning: Invalid argument supplied for foreach() in /in/JYXtX on line 19 ?>
Output for 4.3.11
?>