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