Download src/php/php-src/ext/pdo/tests/bug_43663.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 731 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/pdo/tests/bug_43663.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/ext/pdo/tests/bug_43663.phpt
-
curl -L -o bug_43663.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/pdo/tests/bug_43663.phpt
731 Bytes
| --TEST-- | |
| PDO Common: Bug #43663 (__call on classes derived from PDO) | |
| --EXTENSIONS-- | |
| pdo | |
| --SKIPIF-- | |
| $dir = getenv('REDIR_TEST_DIR'); | |
| if (false == $dir) die('skip no driver'); | |
| require_once $dir . 'pdo_test.inc'; | |
| PDOTest::skip(); | |
| --FILE-- | |
| class TestClass extends PDO{ | |
| function __call($name, array $args) { | |
| echo "Called $name in ".__CLASS__."\n"; | |
| } | |
| function foo() { | |
| echo "Called foo in ".__CLASS__."\n"; | |
| } | |
| } | |
| if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.__DIR__ . '/../../pdo/tests/'); | |
| require_once getenv('REDIR_TEST_DIR') . 'pdo_test.inc'; | |
| $a = PDOTest::factory(TestClass::class); | |
| $a->foo(); | |
| $a->bar(); | |
| --EXPECT-- | |
| Called foo in TestClass | |
| Called bar in TestClass | |