debug_info-error-object.phpt 400 B

1234567891011121314151617181920
  1. --TEST--
  2. Testing __debugInfo() magic method with bad returns OBJECT
  3. --FILE--
  4. <?php
  5. class C {
  6. public $val;
  7. public function __debugInfo() {
  8. return $this->val;
  9. }
  10. public function __construct($val) {
  11. $this->val = $val;
  12. }
  13. }
  14. $c = new C(new stdClass);
  15. var_dump($c);
  16. ?>
  17. --EXPECTF--
  18. Fatal error: __debuginfo() must return an array in %s%eZend%etests%edebug_info-error-object.php on line %d