mirror of
https://github.com/php/php-src.git
synced 2026-03-27 17:52:16 +01:00
This is a minor BC break, because classes inheriting from DateTime and overriding __set_state() now have to specify the additional parameter as well. However, adding the additional parameter also continues to work on previous versions of PHP, so this change is acceptable for master.
13 lines
353 B
PHP
13 lines
353 B
PHP
--TEST--
|
|
Extendig DatTime and calling __set_state without args
|
|
--CREDITS--
|
|
Gabriel Caruso (carusogabriel34@gmail.com)
|
|
--FILE--
|
|
<?php
|
|
class MyDateTime extends DateTime {
|
|
public static function __set_state() {}
|
|
}
|
|
?>
|
|
--EXPECTF--
|
|
Warning: Declaration of MyDateTime::__set_state() should be compatible with DateTime::__set_state($array) in %s on line %d
|