summaryrefslogtreecommitdiff
path: root/ext/intl/tests/formatter_clone_bad_obj.phpt
blob: 2c184f3d1fc697cc51235a1407b57a76ef5efea4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--TEST--
Cloning unconstructed numfmt
--SKIPIF--
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
--FILE--
<?php

class A extends NumberFormatter {
    function __construct() {}
}

$a = new A;
try {
    $b = clone $a;
} catch (Exception $e) {
    var_dump($e->getMessage());
}
?>
--EXPECT--
string(42) "Cannot clone unconstructed NumberFormatter"