mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Also fixes similar issues for DateTimeImmutable::createFromFormat, DateTime::createFromImmmutable, DateTime::createFromInterface, DateTimeImmutable::createFromMutable, and DateTimeImmutable::createFromInterface.
14 lines
252 B
PHP
14 lines
252 B
PHP
--TEST--
|
|
Test for bug #60302: DateTime::createFromFormat should new static(), not new self()
|
|
--FILE--
|
|
<?php
|
|
|
|
class MyDateTime extends DateTime { }
|
|
|
|
$d = MyDateTime::createFromFormat('Y-m-d', '2011-01-01');
|
|
|
|
echo get_class($d);
|
|
?>
|
|
--EXPECT--
|
|
MyDateTime
|