mirror of
https://github.com/php/php-src.git
synced 2024-09-30 06:16:08 +00:00
a4cd950dc8
verbose explanation of changes: - take connection parameter from connect.inc - use proper UEXPECTF - have 'print "done!"' or similar at the end to detect crashes - whitespace changes where needed - take care of portability: PHP 5 vs. PHP 5, MySQL 4.1 - 6.0 - understand return value checking as sometime that makes you type more when you write but makes you happy when you debug
38 lines
661 B
PHP
38 lines
661 B
PHP
--TEST--
|
|
mysqli thread_id & kill
|
|
--SKIPIF--
|
|
<?php require_once('skipif.inc'); ?>
|
|
<?php require_once('skipifemb.inc'); ?>
|
|
--FILE--
|
|
<?php
|
|
include "connect.inc";
|
|
|
|
$mysql = new mysqli($host, $user, $passwd, $db, $port, $socket);
|
|
|
|
var_dump($mysql->ping());
|
|
|
|
var_dump($mysql->kill($mysql->thread_id));
|
|
|
|
var_dump($mysql->ping());
|
|
|
|
$mysql->close();
|
|
|
|
$mysql = new mysqli($host, $user, $passwd, $db, $port, $socket);
|
|
|
|
var_dump(mysqli_ping($mysql));
|
|
|
|
var_dump(mysqli_kill($mysql, mysqli_thread_id($mysql)));
|
|
|
|
var_dump(mysqli_ping($mysql));
|
|
|
|
$mysql->close();
|
|
print "done!";
|
|
?>
|
|
--EXPECT--
|
|
bool(true)
|
|
bool(true)
|
|
bool(false)
|
|
bool(true)
|
|
bool(true)
|
|
bool(false)
|
|
done!
|