summaryrefslogtreecommitdiff
path: root/ext/mysqli/tests/mysqli_get_info_deprecations.phpt
blob: 2dbbce0540c6de0480c59022b799b808fd8ece44 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
--TEST--
Deprecated messages for mysqli::get_client_info() method
--SKIPIF--
<?php
require_once 'skipif.inc';
require_once 'skipifconnectfailure.inc';
?>
--FILE--
<?php
require 'connect.inc';

if (!$mysqli = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
    printf("Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
        $host, $user, $db, $port, $socket);
    exit(1);
}

printf("client_info = '%s'\n", $mysqli->get_client_info());

printf("client_info = '%s'\n", mysqli_get_client_info($mysqli));

print "done!";
?>
--EXPECTF--

Deprecated: Method mysqli::get_client_info() is deprecated in %s
client_info = '%s'

Deprecated: mysqli_get_client_info(): Passing connection object as an argument is deprecated in %s
client_info = '%s'
done!