Download src/php/php-src/ext/pdo_dblib/tests/bug_54648.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 603 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/pdo_dblib/tests/bug_54648.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/ext/pdo_dblib/tests/bug_54648.phpt
-
curl -L -o bug_54648.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/pdo_dblib/tests/bug_54648.phpt
603 Bytes
| --TEST-- | |
| PDO_DBLIB: Does not force correct dateformat | |
| --EXTENSIONS-- | |
| pdo_dblib | |
| --SKIPIF-- | |
| require __DIR__ . '/config.inc'; | |
| getDbConnection(); | |
| --FILE-- | |
| require __DIR__ . '/config.inc'; | |
| $db = getDbConnection(); | |
| $db->query('set dateformat ymd'); | |
| $rs = $db->query("select cast('1950-01-18 23:00:00' as smalldatetime) as sdt, cast('2030-01-01 23:59:59' as datetime) as dt"); | |
| var_dump($rs->fetchAll(PDO::FETCH_ASSOC)); | |
| echo "Done.\n"; | |
| --EXPECT-- | |
| array(1) { | |
| [0]=> | |
| array(2) { | |
| ["sdt"]=> | |
| string(19) "1950-01-18 23:00:00" | |
| ["dt"]=> | |
| string(19) "2030-01-01 23:59:59" | |
| } | |
| } | |
| Done. | |