PHP 5.5 vs HHVM vs Node.js Benchmark part 4

In this set of benchmarks I am comparing the performance of node vs hhvm in doing what a lot of web apps do: Adding something to a database and reading something from a database and then making a webpage out of. As expected given most of the time is spent waiting on the database node and hhvm perform similarly.

function main(){$db=new PDO("mysql:host=localhost;dbname=test","nothing","nothing",array(
PDO::ATTR_PERSISTENT=>true));$stmt=$db->query("select * from users");$res=$stmt->fetchAll();#print_r($res);
echo createTable($res);$db->query("update `users` set `age`=FLOOR(RAND()*100) where 1");$stmt=$db->query("select * from users");$res=$stmt->fetchAll();echo createTable($res);}function createTable(array$results=array()){if(empty($results)){return'<table><tr><td>Empty Result Set</td></tr></table>';}// dynamically create the header information from the keys// of the result array from mysql$table='<table>';$keys=array_keys(reset($results));$table.='<thead><tr>';$keys_fixed=array();for($i=0;$i<count($keys);$i+=2){$table.='<th>'.$keys[$i].'</th>';$keys_fixed[]=$keys[$i];}$table.='</tr></thead>';// populate the main table body$table.='<tbody>';foreach($resultsas$result){$table.='<tr>';foreach($keys_fixedas$key){$table.='<td>'.$result[$key].'</td>';}$table.='</tr>';}$table.='</tbody></table>';return$table;}
main();