pdo_036.phpt 608 B

123456789101112131415161718192021222324252627
  1. --TEST--
  2. Testing PDORow and PDOStatement instances with Reflection
  3. --SKIPIF--
  4. <?php if (!extension_loaded('pdo')) die('skip'); ?>
  5. --FILE--
  6. <?php
  7. $instance = new reflectionclass('pdostatement');
  8. $x = $instance->newInstance();
  9. var_dump($x);
  10. $instance = new reflectionclass('pdorow');
  11. $x = $instance->newInstance();
  12. var_dump($x);
  13. ?>
  14. --EXPECTF--
  15. object(PDOStatement)#%d (1) {
  16. ["queryString"]=>
  17. NULL
  18. }
  19. Fatal error: Uncaught PDOException: You may not create a PDORow manually in %spdo_036.php:8
  20. Stack trace:
  21. #0 %spdo_036.php(8): ReflectionClass->newInstance()
  22. #1 {main}
  23. thrown in %spdo_036.php on line 8