--TEST-- GitHub issue 900 - output parameter displays data from memory when not finalized --DESCRIPTION-- This test verifies that when there is an active resultset and output parameter not finalized, it should not show any data from client memory. This test does not work with AlwaysEncrypted because the output param is not assigned in the stored procedure. --ENV-- PHPT_EXEC=true --SKIPIF-- --FILE-- "UTF-8")); if (!$conn) { fatalError("Could not connect.\n"); } $dataTypes = array("VARCHAR(256)", "VARCHAR(512)", "VARCHAR(max)", "NVARCHAR(256)", "NVARCHAR(512)", "NVARCHAR(max)"); for ($i = 0, $p = 3; $i < count($dataTypes); $i++, $p++) { // Create the stored procedure first $storedProcName = "spNullOutputParam" . $i; $procArgs = "@OUTPUT $dataTypes[$i] OUTPUT"; $procCode = "SELECT 1, 2, 3"; createProc($conn, $storedProcName, $procArgs, $procCode); getOutputParam($conn, $storedProcName, false, ($i < 3)); getOutputParam($conn, $storedProcName, true, ($i < 3)); // Drop the stored procedure dropProc($conn, $storedProcName); } echo "Done\n"; sqlsrv_close($conn); ?> --EXPECT-- Done