Open
Description
Description
The following code:
<?php
class Demo extends DateTime
{
public function __debugInfo(): array
{
return ['value' => 'zzz'];
}
}
$d = new Demo();
var_dump($d);
Resulted in this output:
object(Demo)#1 (3) {
["date"]=>
string(26) "2023-05-24 15:59:35.014710"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
But I expected this output instead:
object(Demo)#1 (1) {
["value"]=>
string(3) "zzz"
}
PHP Version
PHP 8.2.6
Operating System
Windows 11