File:
[ELWIX - Embedded LightWeight unIX -] /
embedaddon /
php /
ext /
mysqli /
tests /
bug34785.phpt
Revision
1.1.1.1 (vendor branch):
download - view:
text,
annotated -
select for diffs -
revision graph
Tue Feb 21 23:47:58 2012 UTC (13 years, 1 month ago) by
misho
Branches:
php,
MAIN
CVS tags:
v5_4_3elwix,
v5_4_29p0,
v5_4_29,
v5_4_20p0,
v5_4_20,
v5_4_17p0,
v5_4_17,
v5_3_10,
HEAD
php
--TEST--
Bug #34785 (Can not properly subclass mysqli_stmt)
--SKIPIF--
<?php
require_once('skipif.inc');
require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
include ("connect.inc");
class my_stmt extends mysqli_stmt
{
public function __construct($link, $query) {
parent::__construct($link, $query);
}
}
class my_result extends mysqli_result
{
public function __construct($link, $query) {
parent::__construct($link, $query);
}
}
/*** test mysqli_connect 127.0.0.1 ***/
$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
mysqli_query($link, "SET sql_mode=''");
$stmt = new my_stmt($link, "SELECT 'foo' FROM DUAL");
$stmt->execute();
$stmt->bind_result($var);
$stmt->fetch();
$stmt->close();
var_dump($var);
mysqli_real_query($link, "SELECT 'bar' FROM DUAL");
$result = new my_result($link, MYSQLI_STORE_RESULT);
$row = $result->fetch_row();
$result->close();
var_dump($row[0]);
mysqli_close($link);
?>
--EXPECTF--
%s(3) "foo"
%s(3) "bar"
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>