php-src/ext/intl/tests/timezone_clone_error.phpt
Gina Peter Banyard 33f1cf202e
ext/intl: Various refactoring (#14360)
* ext/intl: Small extension cleanup

* ext/intl: Normalize cloning error handling behaviour

Always throw a Error exception as we cannot progress from here

* ext/intl: idn.c use ValueErrors where appropriate

Drive-by refactoring

* ext/intl: Remove some unused headers

Probably more cleanup can be done
2024-05-30 12:51:36 +01:00

22 lines
356 B
PHP

--TEST--
IntlTimeZone clone handler: error test
--EXTENSIONS--
intl
--FILE--
<?php
class A extends IntlTimeZone {
public function __construct() {}
}
$tz = new A();
try {
$b = clone $tz;
var_dump($b);
} catch (Throwable $e) {
echo $e::class, ': ', $e->getMessage(), PHP_EOL;
}
?>
--EXPECT--
Error: Cannot clone uninitialized IntlTimeZone