implies more memory copy. The old method is still available and can be used.
It stays as default. Choosing the method is through a flag to mysqli_query()/mysqli_real_query()
New mode can be forced with an INI setting, for all extensions that support this mode
(ext/mysql and mysqli, because PDO due to it's architecture can't support it)
The setting is mysqlnd.fetch_data_copy=[0|1]
a result set in one array. This is handy if want to fetch all results and
pass the data directly to a template engine, for example. In this case
you save a loop.
1) Currently:
$all_rows = array();
while ($row = mysqli_fetch_assoc($res))
$all_rows[] = $row;
2) With mysqli_fetch_all:
$all_rows = mysqli_fetch_all($res, MYSQL_ASSOC)
Note: if you need the loop for processing each row, try variant 1) for
performance reasons.