xref: /PHP-8.1/ext/date/tests/bug60302-001.phpt (revision 90434d7f)
1--TEST--
2Test for bug #60302: DateTime::createFromFormat should new static(), not new self()
3--FILE--
4<?php
5
6class MyDateTime extends DateTime { }
7
8$d = MyDateTime::createFromFormat('Y-m-d', '2011-01-01');
9
10echo get_class($d);
11?>
12--EXPECT--
13MyDateTime
14