summaryrefslogtreecommitdiff
path: root/ext/date/tests/bug52063.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/date/tests/bug52063.phpt')
-rw-r--r--ext/date/tests/bug52063.phpt15
1 files changed, 15 insertions, 0 deletions
diff --git a/ext/date/tests/bug52063.phpt b/ext/date/tests/bug52063.phpt
new file mode 100644
index 0000000..af9da9e
--- /dev/null
+++ b/ext/date/tests/bug52063.phpt
@@ -0,0 +1,15 @@
+--TEST--
+Bug #52063 (DateTime constructor's second argument doesn't have a null default value)
+--FILE--
+<?php
+date_default_timezone_set("Europe/Lisbon");
+$a = new DateTime("2009-01-01", null);
+echo $a->format(DateTime::COOKIE);
+echo "\n";
+$a = date_create("2009-01-01", null);
+echo $a->format(DateTime::COOKIE);
+echo "\n";
+?>
+--EXPECTF--
+Thursday, 01-Jan-09 00:00:00 WET
+Thursday, 01-Jan-09 00:00:00 WET