Download src/php/php-src/ext/pdo/tests/bug_40285.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 899 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/pdo/tests/bug_40285.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/ext/pdo/tests/bug_40285.phpt
-
curl -L -o bug_40285.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/pdo/tests/bug_40285.phpt
899 Bytes
| --TEST-- | |
| PDO Common: Bug #40285 (The prepare parser goes into an infinite loop on ': or ":) | |
| --EXTENSIONS-- | |
| pdo | |
| --SKIPIF-- | |
| $dir = getenv('REDIR_TEST_DIR'); | |
| if (false == $dir) die('skip no driver'); | |
| require_once $dir . 'pdo_test.inc'; | |
| PDOTest::skip(); | |
| --FILE-- | |
| if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.__DIR__ . '/../../pdo/tests/'); | |
| require_once getenv('REDIR_TEST_DIR') . 'pdo_test.inc'; | |
| $db = PDOTest::factory(); | |
| $db->exec('CREATE TABLE test40285 (field1 VARCHAR(32), field2 VARCHAR(32), field3 VARCHAR(32), field4 INT)'); | |
| $db->setAttribute(PDO::ATTR_EMULATE_PREPARES, true); | |
| $s = $db->prepare("INSERT INTO test40285 VALUES( ':id', 'name', 'section', 22)" ); | |
| $s->execute(); | |
| echo "Done\n"; | |
| --CLEAN-- | |
| require_once getenv('REDIR_TEST_DIR') . 'pdo_test.inc'; | |
| $db = PDOTest::factory(); | |
| PDOTest::dropTableIfExists($db, "test40285"); | |
| --EXPECT-- | |
| Done | |