--TEST-- mysql_error() --SKIPIF-- --FILE-- ') == 1) && !is_unicode($tmp)) { printf("[007] Expecting Unicode error message!\n"); var_inspect($tmp); } mysql_close($link); var_dump(mysql_error($link)); if ($link = @mysql_connect($host . '_unknown', $user . '_unknown', $passwd, true)) { printf("[008] Can connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n", $host . '_unknown', $user . '_unknown', $db, $port, $socket); } if ('' == mysql_error()) printf("[009] Connect error should have been set\n"); print "done!"; ?> --CLEAN-- --EXPECTF-- Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d Warning: mysql_error(): %d is not a valid MySQL-Link resource in %s on line %d bool(false) done!