1--TEST-- 2Bug #46614 (Extended MySQLi class gives incorrect empty() result) 3--SKIPIF-- 4<?php 5require_once('skipif.inc'); 6require_once('skipifconnectfailure.inc'); 7if (!defined("MYSQLI_ASYNC")) { 8 die("skip mysqlnd only"); 9} 10?> 11--FILE-- 12<?php 13class MySQL_Ext extends mysqli{ 14 protected $fooData = array(); 15 16 public function isEmpty() 17 { 18 $this->extData[] = 'Bar'; 19 return empty($this->extData); 20 } 21} 22 23include ("connect.inc"); 24$MySQL_Ext = new MySQL_Ext($host, $user, $passwd, $db, $port, $socket); 25 26$isEmpty = $MySQL_Ext->isEmpty(); 27var_dump($isEmpty); 28?> 29--EXPECT-- 30bool(false) 31