<?php
/*
Bare bones, no extra connection or result checking, tried to mostly stick with the code example from php.net/mysqli_query() \
*/

global $link;

//$link = mysqli_connect("localhost", "my_user", "my_password", "world");
$link mysqli_connect("localhost""root""r00tz00""test");

function 
DoInsert($sql) { // Interested this function's "own execution time"
    
global $link;
    
mysqli_query($link$sql);
}

/* Insert 100,000 rows */
for ($i=0;$i<100000;$i++) {
    
DoInsert("INSERT INTO `BENCHMARK` (FOO,DUMMY1,DUMMY2,DUMMY3) VALUES ('abcd','efgh','01010101000','mnop')");
}

mysqli_query($link"TRUNCATE TABLE `BENCHMARK`");

?>