mysql请求用PHP 7.1返回null,而5.3用ok

I'm facing a weird trouble.

I just installed a new virtual server with apache / php 7.1 in order to prepare the migration of my old virtual webserver running php 5.3.3. The reason is I need to install prestashop that requires php 5.4 (minimum requirement).

Both virtual servers are running centos 6 on the same HN.

PHP 7.1 comes from remi repos.

I ran this code on both VMs (CLI):

<?php
$mysql = new mysqli($mysql_adress, $mysql_login, $mysql_pwd, $mysql_database);
if($mysql->connect_error){
    echo 'connect error : '.$mysql->connect_error;
} else {
    $return = $mysql->query("SELECT DATABASE()");
    $row = mysqli_fetch_array($return, MYSQL_ASSOC);
    var_dump($row);
}
?>

My 'old' server returns the name of the database i am connected to (it is the expected result) but the new server returns NULL !

I suspect the mysqlnd client to be responsible for this behaviour but not sure.

Any idea appreciated !

Problem solved ! Thank to @yanman1234.

MYSQL_ASSOC used to work with a mysqli object in the previous versions of php . This time is over and i should now use MYSQLI_ASSOC instead.