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