1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00
Files
archived-php-src/ext/mysqli/tests/bug46614.phpt
2024-03-08 16:59:51 +01:00

30 lines
555 B
PHP

--TEST--
Bug #46614 (Extended MySQLi class gives incorrect empty() result)
--EXTENSIONS--
mysqli
--SKIPIF--
<?php
require_once 'skipifconnectfailure.inc';
?>
--FILE--
<?php
class MySQL_Ext extends mysqli{
protected $fooData = array();
private $extData;
public function isEmpty()
{
$this->extData[] = 'Bar';
return empty($this->extData);
}
}
include 'connect.inc';
$MySQL_Ext = new MySQL_Ext($host, $user, $passwd, $db, $port, $socket);
$isEmpty = $MySQL_Ext->isEmpty();
var_dump($isEmpty);
?>
--EXPECT--
bool(false)