]> granicus.if.org Git - php/commitdiff
This commit was manufactured by cvs2svn to create branch 'PHP_4_3'.
authorSVN Migration <svn@php.net>
Mon, 28 Jul 2003 04:01:33 +0000 (04:01 +0000)
committerSVN Migration <svn@php.net>
Mon, 28 Jul 2003 04:01:33 +0000 (04:01 +0000)
ext/standard/tests/time/bug13142.phpt [new file with mode: 0644]
tests/lang/each_binary_safety.phpt [new file with mode: 0644]

diff --git a/ext/standard/tests/time/bug13142.phpt b/ext/standard/tests/time/bug13142.phpt
new file mode 100644 (file)
index 0000000..6e2bf87
--- /dev/null
@@ -0,0 +1,16 @@
+--TEST--
+Bug #13142 strtotime handling of "M d H:i:s Y" format
+--SKIPIF--
+<?php
+if (!@putenv("TZ=US/Eastern") || getenv("TZ") != 'US/Eastern') {
+       die("skip unable to change TZ enviroment variable\n");
+}
+?>
+--FILE--
+<?php
+echo date("r\n", strtotime("Sep 04 16:39:45 2001"));
+echo date("r\n", strtotime("Sep 04 2001 16:39:45"));   
+?>
+--EXPECT--
+Tue,  4 Sep 2001 16:39:45 -0400
+Tue,  4 Sep 2001 16:39:45 -0400
diff --git a/tests/lang/each_binary_safety.phpt b/tests/lang/each_binary_safety.phpt
new file mode 100644 (file)
index 0000000..bb13534
--- /dev/null
@@ -0,0 +1,13 @@
+--TEST--
+Binary safety of each() for both keys and values
+--FILE--
+<?php
+error_reporting(E_ALL);
+$arr = array ("foo\0bar" => "foo\0bar");
+while (list($key, $val) = each($arr)) {
+       echo strlen($key), ': ';
+       echo urlencode($key), ' => ', urlencode($val), "\n";
+}
+?>
+--EXPECT--
+7: foo%00bar => foo%00bar