msgfmt_clone_bad_obj.phpt 356 B

12345678910111213141516171819
  1. --TEST--
  2. Cloning unconstructed MessageFormatter
  3. --SKIPIF--
  4. <?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
  5. --FILE--
  6. <?php
  7. class A extends MessageFormatter {
  8. function __construct() {}
  9. }
  10. $a = new A;
  11. try {
  12. $b = clone $a;
  13. } catch (Exception $e) {
  14. var_dump($e->getMessage());
  15. }
  16. --EXPECTF--
  17. string(%d) "Cannot clone unconstructed MessageFormatter"