mirror of
https://github.com/php/php-src.git
synced 2024-12-02 22:34:55 +08:00
7aacc705d0
Closes GH-5958
21 lines
400 B
PHP
21 lines
400 B
PHP
--TEST--
|
|
Testing __debugInfo() magic method with bad returns OBJECT
|
|
--FILE--
|
|
<?php
|
|
|
|
class C {
|
|
public $val;
|
|
public function __debugInfo() {
|
|
return $this->val;
|
|
}
|
|
public function __construct($val) {
|
|
$this->val = $val;
|
|
}
|
|
}
|
|
|
|
$c = new C(new stdClass);
|
|
var_dump($c);
|
|
?>
|
|
--EXPECTF--
|
|
Fatal error: __debuginfo() must return an array in %s%eZend%etests%edebug_info-error-object.php on line %d
|