--TEST-- testing the quote method with different inputs and then test with a empty query --SKIPIF-- --FILE-- quote("1'2'3'4'5'6'7'8", PDO::PARAM_INT); var_dump($output1); $output2 = $conn->quote("{ABCD}'{EFGH}", PDO::PARAM_STR); var_dump($output2); $output3 = $conn->quote("The quick brown fox jumps over the lazy dog0123456789"); var_dump($output3); if (PHP_MAJOR_VERSION < 8) { $stmt = $conn->query(""); if ($stmt != false) { echo("Empty query was expected to fail!\n"); } unset($stmt); } else { try { $stmt = $conn->query(""); echo("Empty query was expected to fail!\n"); } catch (ValueError $ve) { $error = '*PDO::query(): Argument #1 ($query) cannot be empty'; if (!fnmatch($error, $ve->getMessage())) { var_dump($ve->getMessage()); } } } $stmt1 = $conn->prepare($output2); $result = $stmt1->execute(); if ($result != false) { echo("This query was expected to fail!\n"); } unset($stmt1); $stmt2 = $conn->query($output3); if ($stmt2 != false) { echo("This query was expected to fail!\n"); } unset($stmt2); unset($conn); } catch (Exception $e) { echo $e->getMessage(); } ?> --EXPECT-- string(24) "'1''2''3''4''5''6''7''8'" string(16) "'{ABCD}''{EFGH}'" string(118) "'The quick brown fox jumps over the lazy dog0123456789'"