php-src/Zend/tests/debug_info-error-str.phpt
2014-02-20 12:10:00 -08:00

20 lines
384 B
PHP

--TEST--
Testing __debugInfo() magic method with bad returns STRING
--FILE--
<?php
class C {
public $val;
public function __debugInfo() {
return $this->val;
}
public function __construct($val) {
$this->val = $val;
}
}
$c = new C("foo");
var_dump($c);
--EXPECTF--
Fatal error: __debuginfo() must return an array in %s/Zend/tests/debug_info-error-str.php on line %d