1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
|
--TEST--
Bug #72701 mysqli_get_host_info() wrong output
--EXTENSIONS--
mysqli
--SKIPIF--
<?php
require_once 'skipifconnectfailure.inc';
if ("127.0.0.1" != $host && "localhost" != $host) {
die("skip require 127.0.0.1 connection");
}
?>
--FILE--
<?php
require_once 'connect.inc';
$con = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
if (mysqli_connect_errno()) {
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
var_dump(preg_match(",(127.0.0.1|localhost) via .*,i", mysqli_get_host_info($con)));
mysqli_close($con);
?>
--EXPECT--
int(1)
|