debug_info-error-resource.phpt 451 B

12345678910111213141516171819202122
  1. --TEST--
  2. Testing __debugInfo() magic method with bad returns RESOURCE
  3. --INI--
  4. allow_url_fopen=1
  5. --FILE--
  6. <?php
  7. class C {
  8. public $val;
  9. public function __debugInfo() {
  10. return $this->val;
  11. }
  12. public function __construct($val) {
  13. $this->val = $val;
  14. }
  15. }
  16. $c = new C(fopen("data:text/plain,Foo", 'r'));
  17. var_dump($c);
  18. ?>
  19. --EXPECTF--
  20. Fatal error: __debuginfo() must return an array in %s%eZend%etests%edebug_info-error-resource.php on line %d