--TEST-- mysql_[p]connect() - max_links/max_persistent --SKIPIF-- --INI-- mysql.max_links=2 --FILE-- second open connection $links[0] = my_connect(50, $host, $user, $passwd, $db, $port, $socket); $links[2] = my_connect(60, $host, $user, $passwd, $db, $port, $socket); ksort($links); var_dump($links); mysql_close($links[0]); mysql_close($links[1]); print "done!\n"; ?> --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 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 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_connect(): Too many open links (2) in %s on line %s [030] Cannot connect using host '%s', user '%s', password '****', [0] 0 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 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_connect(): Too many open links (2) in %s on line %s [060] Cannot connect using host '%s', user '%s', password '****', [0] 0 array(3) { [0]=> resource(%d) of type (mysql link) [1]=> resource(%d) of type (mysql link) [2]=> bool(false) } done!