-
Notifications
You must be signed in to change notification settings - Fork 7.8k
/
Copy pathbug62915-2.phpt
36 lines (35 loc) · 958 Bytes
/
bug62915-2.phpt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
--TEST--
Bug #62915: cloning of several classes is defective
--EXTENSIONS--
intl
--SKIPIF--
<?php
if (!class_exists('Spoofchecker'))
die('skip intl extension does not have spoof checker');
--FILE--
<?php
class A extends IntlDateFormatter {
static $ARGS = array("en_US" ,IntlDateFormatter::FULL, IntlDateFormatter::FULL,
'America/Los_Angeles', IntlDateFormatter::GREGORIAN);
}
class B extends NumberFormatter {
static $ARGS = array('de_DE', NumberFormatter::DECIMAL);
}
class C extends MessageFormatter {
static $ARGS = array("en_US", "foo");
}
class D extends Spoofchecker {
static $ARGS = array();
}
foreach (range('A', 'D') as $subclass) {
$rc = new ReflectionClass($subclass);
$obj = $rc->newInstanceArgs($subclass::$ARGS);
$clone = clone $obj;
var_dump(get_class($clone));
}
?>
--EXPECT--
string(1) "A"
string(1) "B"
string(1) "C"
string(1) "D"