xref: /PHP-8.0/ext/mysqli/tests/bug73949.phpt (revision a03c1ed7)
1--TEST--
2Bug #73949 (leak in mysqli_fetch_object)
3--SKIPIF--
4<?php
5require_once('skipif.inc');
6require_once('skipifconnectfailure.inc');
7?>
8--FILE--
9<?php
10require_once("connect.inc");
11
12class cc{
13    function __construct($c=null){
14    }
15};
16$i=mysqli_connect('p:'.$host, $user, $passwd, $db);
17$res=mysqli_query($i, "SHOW STATUS LIKE 'Connections'");
18$t=array(new stdClass);
19while($db= mysqli_fetch_object($res,'cc',$t)){}
20print "done!";
21?>
22--EXPECT--
23done!
24