bug62081.phpt 452 B

12345678910111213141516
  1. --TEST--
  2. Bug #62081: IntlDateFormatter leaks memory if called twice
  3. --INI--
  4. date.timezone=Atlantic/Azores
  5. --SKIPIF--
  6. <?php
  7. if (!extension_loaded('intl'))
  8. die('skip intl extension not enabled');
  9. --FILE--
  10. <?php
  11. ini_set('intl.error_level', E_WARNING);
  12. $x = new IntlDateFormatter('en', 1, 1);
  13. var_dump($x->__construct('en', 1, 1));
  14. --EXPECTF--
  15. Warning: IntlDateFormatter::__construct(): datefmt_create: cannot call constructor twice in %s on line %d
  16. NULL