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
21 lines
352 B
PHP
21 lines
352 B
PHP
--TEST--
|
|
Cloning uninitialized MessageFormatter
|
|
--EXTENSIONS--
|
|
intl
|
|
--FILE--
|
|
<?php
|
|
|
|
class A extends MessageFormatter {
|
|
function __construct() {}
|
|
}
|
|
|
|
$a = new A;
|
|
try {
|
|
$b = clone $a;
|
|
var_dump($b);
|
|
} catch (Throwable $e) {
|
|
echo $e::class, ': ', $e->getMessage(), PHP_EOL;
|
|
}
|
|
?>
|
|
--EXPECT--
|
|
Error: Cannot clone uninitialized MessageFormatter
|