--TEST-- PDO Exec Test --DESCRIPTION-- Basic verification for PDO::exec(). --ENV-- PHPT_EXEC=true --SKIPIF-- --FILE-- exec($tsql); if ($actual === $expected) { $ret = true; } else { printf("[%03d] Expecting '%s' (%s) instead of '%s' (%s) when executing '%s', [%s] %s\n", $offset, $expected, gettype($expected), $actual, gettype($actual), $tsql, $conn->errorCode(), implode(' ', $conn->errorInfo())); } } catch (PDOException $e) { printf("[%03d] Execution of '%s' has failed, [%s] %s\n", $offset, $tsql, $conn->errorCode(), implode(' ', $conn->errorInfo())); } return ($ret); } //-------------------------------------------------------------------- // Repro // //-------------------------------------------------------------------- function Repro() { try { ExecStmt(); } catch (Exception $e) { echo $e->getMessage(); } } Repro(); ?> --EXPECT-- Test "PDO Connection - Exec" completed successfully.