1--TEST--
2DateTimeImmutable::createFromMutable exception
3--INI--
4date.timezone=Europe/London
5--FILE--
6<?php
7class MyDateTime extends DateTime
8{
9	function __construct()
10	{
11	}
12}
13
14$i = new MyDateTime();
15
16try {
17	$m = DateTimeImmutable::createFromMutable( $i );
18} catch (\DateObjectError $e) {
19    echo $e::class, ': ', $e->getMessage(), "\n";
20}
21?>
22--EXPECTF--
23DateObjectError: Object of type MyDateTime (inheriting DateTime) has not been correctly initialized by calling parent::__construct() in its constructor
24