xref: /php-src/ext/intl/tests/bug62915.phpt (revision 33f1cf20)
1--TEST--
2Bug #62915: incomplete cloning of IntlTimeZone objects
3--EXTENSIONS--
4intl
5--FILE--
6<?php
7
8class foo extends IntlTimeZone {
9        public $foo = 'test';
10        public function __construct() { }
11}
12
13$x = new foo;
14
15try {
16    $z = clone $x;
17    var_dump($z);
18} catch (Throwable $e) {
19    echo $e::class, ': ', $e->getMessage(), PHP_EOL;
20}
21?>
22--EXPECT--
23Error: Cannot clone uninitialized IntlTimeZone
24