summaryrefslogtreecommitdiff
path: root/ext/date/tests/bug49700.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/date/tests/bug49700.phpt')
-rw-r--r--ext/date/tests/bug49700.phpt15
1 files changed, 15 insertions, 0 deletions
diff --git a/ext/date/tests/bug49700.phpt b/ext/date/tests/bug49700.phpt
new file mode 100644
index 000000000..a34705259
--- /dev/null
+++ b/ext/date/tests/bug49700.phpt
@@ -0,0 +1,15 @@
+--TEST--
+Bug #49700 (memory leaks in php_date.c if garbage collector is enabled)
+--INI--
+date.timezone=GMT
+--FILE--
+<?php
+gc_enable();
+$objs = array();
+$objs[1] = new DateTime();
+gc_collect_cycles();
+unset($objs);
+echo "OK\n";
+?>
+--EXPECT--
+OK