--TEST-- Bug #61411 (PDO Segfaults with PERSISTENT == TRUE && EMULATE_PREPARES == FALSE) --SKIPIF-- query('SELECT VERSION() as _version')->fetch(PDO::FETCH_ASSOC); $matches = array(); if (!preg_match('/^(\d+)\.(\d+)\.(\d+)/ismU', $row['_version'], $matches)) die(sprintf("skip Cannot determine MySQL Server version\n")); $version = $matches[1] * 10000 + $matches[2] * 100 + $matches[3]; if ($version < 40106) die(sprintf("skip Need MySQL Server 4.1.6+, found %d.%02d.%02d (%d)\n", $matches[1], $matches[2], $matches[3], $version)); ?> --FILE-- prepare("SELECT 1"); $stmt->execute(); foreach ($stmt as $line) { var_dump($line); } print "done!"; ?> --EXPECT-- array(2) { [1]=> int(1) [0]=> int(1) } done!