$tmp = NULL;
$link = NULL;
- if (!is_null($tmp = @mysqli_change_user()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_change_user($link)))
- printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_change_user($link, $link)))
- printf("[003] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_change_user($link, $link, $link)))
- printf("[004] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_change_user($link, $link, $link, $link, $link)))
- printf("[005] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[006] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
$host, $user, $db, $port, $socket);
mysqli_close($link);
- if (NULL !== ($tmp = @mysqli_change_user($link, $user, $passwd, $db)))
- printf("[026] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+ if (false !== ($tmp = @mysqli_change_user($link, $user, $passwd, $db)))
+ printf("[026] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
print "done!";
?>
printf("[001] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
$host, $user, $db, $port, $socket);
- if (!is_null($tmp = @$mysqli->change_user()))
- printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @$mysqli->change_user($link)))
- printf("[003] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @$mysqli->change_user($link, $link)))
- printf("[004] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @$mysqli->change_user($link, $link, $link, $link)))
- printf("[005] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
if (false !== ($tmp = $mysqli->change_user($user . '_unknown_really', $passwd . 'non_empty', $db)))
printf("[006] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
$mysqli->close();
- if (NULL !== ($tmp = @$mysqli->change_user($user, $passwd, $db)))
- printf("[018] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+ if (false !== ($tmp = @$mysqli->change_user($user, $passwd, $db)))
+ printf("[018] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
print "done!";
?>
$tmp = NULL;
$link = NULL;
- if (NULL !== ($tmp = @mysqli_report()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
if (true !== ($tmp = mysqli_report(-1)))
printf("[002] Expecting boolean/true even for invalid flags, got %s/%s\n", gettype($tmp), $tmp);