Download src/php/php-src/ext/pgsql/tests/10pg_convert.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 488 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/pgsql/tests/10pg_convert.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/ext/pgsql/tests/10pg_convert.phpt
-
curl -L -o 10pg_convert.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/pgsql/tests/10pg_convert.phpt
488 Bytes
| --TEST-- | |
| PostgreSQL pg_convert() | |
| --EXTENSIONS-- | |
| pgsql | |
| --SKIPIF-- | |
| include("inc/skipif.inc"); | |
| skip_bytea_not_escape(); | |
| --FILE-- | |
| error_reporting(E_ALL); | |
| include 'inc/config.inc'; | |
| $db = pg_connect($conn_str); | |
| $fields = array('num'=>'1234', 'str'=>'AAA', 'bin'=>'BBB'); | |
| $converted = pg_convert($db, $table_name, $fields); | |
| var_dump($converted); | |
| --EXPECT-- | |
| array(3) { | |
| [""num""]=> | |
| string(4) "1234" | |
| [""str""]=> | |
| string(6) "E'AAA'" | |
| [""bin""]=> | |
| string(6) "E'BBB'" | |
| } | |