1--TEST-- 2Bug #62915: cloning of several classes is defective 3--SKIPIF-- 4<?php 5if (!extension_loaded('intl')) 6 die('skip intl extension not enabled'); 7--FILE-- 8<?php 9class A extends IntlDateFormatter { 10 static $ARGS = array("en_US" ,IntlDateFormatter::FULL, IntlDateFormatter::FULL, 11 'America/Los_Angeles', IntlDateFormatter::GREGORIAN); 12} 13class B extends NumberFormatter { 14 static $ARGS = array('de_DE', NumberFormatter::DECIMAL); 15} 16class C extends MessageFormatter { 17 static $ARGS = array("en_US", "foo"); 18} 19 20foreach (range('A', 'C') as $subclass) { 21 $rc = new ReflectionClass($subclass); 22 $obj = $rc->newInstanceArgs($subclass::$ARGS); 23 $clone = clone $obj; 24 var_dump(get_class($clone)); 25} 26--EXPECT-- 27string(1) "A" 28string(1) "B" 29string(1) "C" 30