While this function is only available if you're using the PHP MySQL Native Driver, you can get the same statistics without this function by using the MySQL SHOW STATUS Query.
Use 'SHOW SESSION STATUS;' for statistics about the current MySQL session.
Use 'SHOW GLOBAL STATUS;' for totals since the server was started.
After you have established a connection with the MySQL Server:
<?php
$result = $mysqli->query('SHOW SESSION STATUS;', MYSQLI_USE_RESULT);
while ($row = $result->fetch_assoc()) {
$array[$row['Variable_name']] = $row['Value'];
}
$result->close();
print_r($array);
?>