1--TEST-- 2mysqli_embedded_connect() 3--SKIPIF-- 4<?php 5require_once('skipif.inc'); 6require_once('skipifnotemb.inc'); 7require_once('skipifconnectfailure.inc'); 8?> 9--FILE-- 10<?php 11 require_once("connect.inc"); 12 $tmp = NULL; 13 $link = NULL; 14 15 if (NULL !== ($tmp = @mysqli_embedded_connect())) 16 printf("[001] Expecting NULL/NULL, got %s/%s\n", gettype($tmp), $tmp); 17 18 if (!$link = mysqli_embedded_connect($db)) { 19 printf("[002] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n", 20 $host, $user, $db, $port, $socket); 21 } 22 23 if (!is_bool($tmp = mysqli_embedded_connect($db . '_unknown'))) 24 printf("[003] Expecting boolean/[true|false] value, got %s/%s\n", gettype($tmp), $tmp); 25 26 mysqli_close($link); 27 28 print "done!"; 29?> 30--EXPECTF-- 31Warning: mysqli_embedded_connect() expects parameter 1 to be mysqli, null given in %s on line %d 32done!