mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00

* 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
22 lines
356 B
PHP
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
|