Download src/php/php-src/ext/odbc/tests/bug80147.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 697 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/odbc/tests/bug80147.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/ext/odbc/tests/bug80147.phpt
-
curl -L -o bug80147.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/odbc/tests/bug80147.phpt
697 Bytes
| --TEST-- | |
| Bug #80147 (BINARY strings may not be properly zero-terminated) | |
| --EXTENSIONS-- | |
| odbc | |
| --SKIPIF-- | |
| include 'skipif.inc'; | |
| --FILE-- | |
| include 'config.inc'; | |
| $conn = odbc_connect($dsn, $user, $pass); | |
| odbc_exec($conn, "CREATE TABLE bug80147 (id INT, whatever VARBINARY(50))"); | |
| odbc_exec($conn, "INSERT INTO bug80147 VALUES (1, CONVERT(VARBINARY(50), 'whatever'))"); | |
| $res = odbc_exec($conn, "SELECT * FROM bug80147"); | |
| odbc_binmode($res, ODBC_BINMODE_RETURN); | |
| odbc_fetch_row($res); | |
| var_dump(odbc_result($res, 'whatever')); | |
| --CLEAN-- | |
| include 'config.inc'; | |
| $conn = odbc_connect($dsn, $user, $pass); | |
| odbc_exec($conn, "DROP TABLE bug80147"); | |
| --EXPECT-- | |
| string(8) "whatever" | |