$link = NULL;
$mysqli = new mysqli();
- if (!is_null($tmp = @$mysqli->errno))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+ if (0 !== ($tmp = @$mysqli->errno))
+ printf("[001] Expecting int/0, got %s/%s\n", gettype($tmp), $tmp);
if (!$mysqli = new mysqli($host, $user, $passwd, $db, $port, $socket))
printf("[002] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
$link = NULL;
$mysqli = new mysqli();
- if (!is_null($tmp = @$mysqli->error))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+ if ('' !== ($tmp = @$mysqli->error))
+ printf("[001] Expecting empty string, got %s/'%s'\n", gettype($tmp), $tmp);
if (!$mysqli = new mysqli($host, $user, $passwd, $db, $port, $socket))
printf("[002] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",