--TEST-- mysqli_debug() - mysqlnd only control strings --EXTENSIONS-- mysqli --SKIPIF-- --FILE-- $line) { $line = trim($line); if (preg_match("@^[|\s]*>([\w:]+)@ism", $line, $matches)) { $functions_trace[$matches[1]] = $matches[1]; } } $found = 0; foreach ($memory_funcs as $k => $name) if (isset($functions_trace[$name])) $found++; if ($found < 1) { printf("[016] Only %d memory functions have been found, expecting at least %d.\n", $found, 1); var_dump($trace); } $trace = try_control_string($link, 't:O,' . $trace_file, $trace_file, 20); if (!strstr($trace, 'SELECT * FROM test') && !strstr($trace, 'mysql_real_query')) printf("[025] SELECT query cannot be found in trace. Trace contents seems wrong.\n"); $lines_trace = explode("\n", $trace); $functions_trace = array(); foreach ($lines_trace as $k => $line) { $line = trim($line); if (preg_match("@^[|\s]*>([\w:]+)@ism", $line, $matches)) { $functions_trace[$matches[1]] = $matches[1]; } } $found = 0; foreach ($memory_funcs as $k => $name) if (isset($functions_trace[$name])) $found++; if ($found > 2) { printf("[026] More than %d memory functions have been recorded, that's strange.\n", $found); var_dump($trace); } mysqli_close($link); @unlink($trace_file); print "done!"; ?> --CLEAN-- --EXPECT-- done!