mirror of
https://github.com/bdnugget/php-src.git
synced 2026-11-10 10:40:50 +00:00
Compare commits
344
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
756184bb59 | ||
|
|
05763e18bb | ||
|
|
3dafd9549d | ||
|
|
85bf6f0329 | ||
|
|
aa2ec7517e | ||
|
|
819be8a3b2 | ||
|
|
1b416caeb1 | ||
|
|
0c2ee427d7 | ||
|
|
e788932a91 | ||
|
|
cf6b208cab | ||
|
|
93fcf04fc1 | ||
|
|
c9a0fbe122 | ||
|
|
c1d43480cc | ||
|
|
92ef080a2e | ||
|
|
f5b05ce162 | ||
|
|
0d7226ed60 | ||
|
|
778edca904 | ||
|
|
f8e21c395b | ||
|
|
d70a9f988d | ||
|
|
10c20ceaf4 | ||
|
|
6c07bc8004 | ||
|
|
08ddf683fc | ||
|
|
71a5c3d7ec | ||
|
|
bbe8518456 | ||
|
|
12081f5659 | ||
|
|
113e304dcf | ||
|
|
d10755c0e6 | ||
|
|
955b801fea | ||
|
|
887f30dc61 | ||
|
|
8d6e997315 | ||
|
|
0806f78f77 | ||
|
|
f4554096e1 | ||
|
|
3964ddd1c4 | ||
|
|
e3da6ac3da | ||
|
|
6481440f3f | ||
|
|
23a5f873fb | ||
|
|
6e1f77ef6b | ||
|
|
606d61bd1c | ||
|
|
2b309c8f9e | ||
|
|
22be55e6da | ||
|
|
370d483bcb | ||
|
|
249667f9e3 | ||
|
|
fd0009d8d6 | ||
|
|
cff7a300d1 | ||
|
|
52cc62d825 | ||
|
|
21abc2f1c1 | ||
|
|
4b9857e7a4 | ||
|
|
f7ee12e928 | ||
|
|
ccae79a2c3 | ||
|
|
262492a187 | ||
|
|
06d5c9a8f0 | ||
|
|
0ff4d7d811 | ||
|
|
23c4c46b36 | ||
|
|
b498b5dfe5 | ||
|
|
ba3498ea33 | ||
|
|
c2ca352598 | ||
|
|
d42a0aee91 | ||
|
|
e854b05aea | ||
|
|
6210bf0dba | ||
|
|
209bfe82e5 | ||
|
|
9d80c25005 | ||
|
|
1a615eeaa2 | ||
|
|
75fa63b57f | ||
|
|
bb16e23891 | ||
|
|
0ec1758381 | ||
|
|
86ed2eeb5d | ||
|
|
a54847a0fb | ||
|
|
6a504c6f6b | ||
|
|
55aab4e6de | ||
|
|
9b1ba00a1e | ||
|
|
c92904d160 | ||
|
|
a76f790b58 | ||
|
|
17af8b0179 | ||
|
|
c776180f6e | ||
|
|
0e37aa144f | ||
|
|
c7a8bd6a4c | ||
|
|
f4009b52a3 | ||
|
|
bc0d535f5a | ||
|
|
60857e013b | ||
|
|
ae2e75a657 | ||
|
|
21fb2a42cc | ||
|
|
3b37e152c3 | ||
|
|
25adf56921 | ||
|
|
cca899148a | ||
|
|
0bcbaa1750 | ||
|
|
9277da7d9d | ||
|
|
cd7681d273 | ||
|
|
031085e0a9 | ||
|
|
f75714650b | ||
|
|
14ed144318 | ||
|
|
baf834a00a | ||
|
|
68ff1463e7 | ||
|
|
d846d0e80a | ||
|
|
10da251565 | ||
|
|
f472141549 | ||
|
|
0afd4bd18b | ||
|
|
087a134b50 | ||
|
|
00a6dd29b7 | ||
|
|
14e7d404d9 | ||
|
|
a62829c09e | ||
|
|
479a47d8af | ||
|
|
7af15a41d9 | ||
|
|
47315dfdf6 | ||
|
|
f7cdabd118 | ||
|
|
e6c9a31c54 | ||
|
|
83d01bd81b | ||
|
|
f4f2aa7583 | ||
|
|
cb7f656de7 | ||
|
|
b903587268 | ||
|
|
b97e76d512 | ||
|
|
e69b73e0b8 | ||
|
|
e2ac61225f | ||
|
|
c989a36927 | ||
|
|
3d7a201eb4 | ||
|
|
e91cecb1d3 | ||
|
|
b7eefa0af7 | ||
|
|
a65eba016e | ||
|
|
3b030ec75f | ||
|
|
07bcf1080d | ||
|
|
69a12bfb3f | ||
|
|
ef74038d1d | ||
|
|
6ff2f7040e | ||
|
|
490b75d170 | ||
|
|
8267eaf1bf | ||
|
|
885357a711 | ||
|
|
983cedfd94 | ||
|
|
4bf9334a82 | ||
|
|
35c42425fa | ||
|
|
e2caad5f96 | ||
|
|
6814cbec4b | ||
|
|
bed49c931d | ||
|
|
e38369c532 | ||
|
|
5cf61f4d8b | ||
|
|
86eae702f2 | ||
|
|
0d8e83532a | ||
|
|
ee920e12ec | ||
|
|
e9f4cfd6af | ||
|
|
00169ec00f | ||
|
|
508f926604 | ||
|
|
ba8ce4a6d4 | ||
|
|
f7e6e6cedf | ||
|
|
6f3c7a8b70 | ||
|
|
00842d6996 | ||
|
|
e40c470c9d | ||
|
|
221a07b669 | ||
|
|
8e314ae7fc | ||
|
|
edcc7dce4e | ||
|
|
8f71a6f673 | ||
|
|
9aa379c724 | ||
|
|
2ee837aa5e | ||
|
|
a417820be3 | ||
|
|
1eb7704974 | ||
|
|
2ea7c05d75 | ||
|
|
85de397a23 | ||
|
|
66d5eb12a9 | ||
|
|
f551ed4189 | ||
|
|
23cab07e4f | ||
|
|
36fde4043b | ||
|
|
a944f7a663 | ||
|
|
c61d125986 | ||
|
|
38c1181cfa | ||
|
|
2957b7cbb6 | ||
|
|
e9efaea7c4 | ||
|
|
2f5dc540e0 | ||
|
|
76425aaca1 | ||
|
|
c4e6beebb3 | ||
|
|
9ea582a76c | ||
|
|
df2ca16fa8 | ||
|
|
3e17b49008 | ||
|
|
9e5bc2c138 | ||
|
|
d257aa42ff | ||
|
|
78a15091f9 | ||
|
|
24be7e2106 | ||
|
|
2ce1fd71ea | ||
|
|
4ab19212e5 | ||
|
|
d91d06af30 | ||
|
|
6613fefb80 | ||
|
|
74b8f72017 | ||
|
|
27fc1b889a | ||
|
|
66ce68e7a4 | ||
|
|
df0ce635e4 | ||
|
|
a0857d56ac | ||
|
|
2954832b97 | ||
|
|
c2a245f582 | ||
|
|
5dcdf5c467 | ||
|
|
cab76530e7 | ||
|
|
a7dbf5a29e | ||
|
|
229bdc7ccb | ||
|
|
20f4ea9de8 | ||
|
|
6242101f2b | ||
|
|
4a8eeb7afb | ||
|
|
8f77168384 | ||
|
|
cde80bd812 | ||
|
|
c11e307ae0 | ||
|
|
9bf9b88f20 | ||
|
|
3e46e95ac1 | ||
|
|
8f8a54ab37 | ||
|
|
176c6fe901 | ||
|
|
0bce4957e5 | ||
|
|
278392a10b | ||
|
|
5bac59b7d1 | ||
|
|
93ce043480 | ||
|
|
f3cd7fdda4 | ||
|
|
a2e0e2564d | ||
|
|
02302812e1 | ||
|
|
6df67ace20 | ||
|
|
7a80c3a0ed | ||
|
|
3841295b2a | ||
|
|
fc7ee596f6 | ||
|
|
6c564a7802 | ||
|
|
a44515caf9 | ||
|
|
3d347be242 | ||
|
|
8192ba2b60 | ||
|
|
1a4897c88e | ||
|
|
2d0ab7c98b | ||
|
|
cd4928c99a | ||
|
|
e510daf20b | ||
|
|
be3d70df4e | ||
|
|
be24877c84 | ||
|
|
e575557612 | ||
|
|
21f71027e3 | ||
|
|
e85c367bc7 | ||
|
|
1153eaf505 | ||
|
|
c157f4b4e6 | ||
|
|
1dd5690af2 | ||
|
|
5ca8ba7ab6 | ||
|
|
a0d805035c | ||
|
|
339f46237d | ||
|
|
1b6dd18082 | ||
|
|
92e5b10c41 | ||
|
|
833ec62d7c | ||
|
|
782c00d744 | ||
|
|
2e206e0761 | ||
|
|
0e80f26207 | ||
|
|
047ed8dfbb | ||
|
|
f2cfb997de | ||
|
|
def1ab1e60 | ||
|
|
3e36ecd98f | ||
|
|
03b6daed4f | ||
|
|
840308cfd0 | ||
|
|
f9721d03f7 | ||
|
|
cd2cdd256a | ||
|
|
2975308e1a | ||
|
|
e8486cc374 | ||
|
|
47012ccd8f | ||
|
|
4919f3286b | ||
|
|
2c76af8538 | ||
|
|
689268a0ba | ||
|
|
88c1755a14 | ||
|
|
dd5781bcdf | ||
|
|
ef777fc18e | ||
|
|
1dbfe6e310 | ||
|
|
3c6104e180 | ||
|
|
f335f27b7b | ||
|
|
4551bd57f7 | ||
|
|
4ad6108b7d | ||
|
|
9aec0c6806 | ||
|
|
4929964a5d | ||
|
|
018013e579 | ||
|
|
8b33e6fae0 | ||
|
|
a270348c24 | ||
|
|
f2ce3e0201 | ||
|
|
0ab7f1cebf | ||
|
|
8ca08487b7 | ||
|
|
3c364cbe52 | ||
|
|
13a91f86b7 | ||
|
|
8307f9e892 | ||
|
|
5b85234b37 | ||
|
|
660aa6701d | ||
|
|
0dd448cbf1 | ||
|
|
5572becc81 | ||
|
|
3595f09c28 | ||
|
|
081b001ca1 | ||
|
|
9484248c0a | ||
|
|
c5c87c5f37 | ||
|
|
334d2df892 | ||
|
|
68811c473d | ||
|
|
95a3bfb1bc | ||
|
|
f06e3ba5c1 | ||
|
|
8a48311a60 | ||
|
|
ab7992fab2 | ||
|
|
5b55a18622 | ||
|
|
5a53a74304 | ||
|
|
be87834321 | ||
|
|
8bbd451647 | ||
|
|
d37dea8b7b | ||
|
|
1e86e8e12c | ||
|
|
07aa25b442 | ||
|
|
2b8d0edb45 | ||
|
|
5fb54640c9 | ||
|
|
56cdee2def | ||
|
|
27e640fdea | ||
|
|
f5687db392 | ||
|
|
6f15da050e | ||
|
|
6e35b40b4c | ||
|
|
0778bedbe1 | ||
|
|
e90ac23f58 | ||
|
|
b78ac8df82 | ||
|
|
d7b8f23e2b | ||
|
|
50b56c2c0f | ||
|
|
6da18ca967 | ||
|
|
8d816ed0ef | ||
|
|
e68e2893c0 | ||
|
|
ee832705d1 | ||
|
|
7e34334d84 | ||
|
|
94b3d60a4f | ||
|
|
dd68a6239a | ||
|
|
39d814a205 | ||
|
|
5009770d65 | ||
|
|
c7e7de3485 | ||
|
|
2843030fa1 | ||
|
|
e1a746faec | ||
|
|
4653ef06f9 | ||
|
|
06e475e537 | ||
|
|
c256372636 | ||
|
|
3986e515da | ||
|
|
2f3f629fd4 | ||
|
|
bf5a3715f4 | ||
|
|
0ec8364402 | ||
|
|
a497999481 | ||
|
|
53b1c76efe | ||
|
|
5d83ad8c44 | ||
|
|
f657ba978b | ||
|
|
1f991c8e42 | ||
|
|
a5348bed31 | ||
|
|
2eb5b0fe4e | ||
|
|
d4a1f5ac06 | ||
|
|
113cd9dc0f | ||
|
|
e79bf567e8 | ||
|
|
a82a9e8f74 | ||
|
|
f15452af96 | ||
|
|
0448336c2c | ||
|
|
7a1f54ff42 | ||
|
|
00b10c6aa3 | ||
|
|
69ba87b183 | ||
|
|
7deec592fd | ||
|
|
5261861d77 | ||
|
|
3242016f28 | ||
|
|
1b2d14c5e1 | ||
|
|
54a7e5d7c3 | ||
|
|
5b442c82f0 | ||
|
|
e78a5127c8 | ||
|
|
5bef6665f9 | ||
|
|
18127da570 |
No files matched your search
@@ -1,6 +1,237 @@
|
||||
PHP NEWS
|
||||
PHP NEWS
|
||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||
17 Feb 2011, PHP 5.3.6RC1
|
||||
30 Jun 2011, PHP 5.3.7 RC2
|
||||
- Core:
|
||||
. Fixed crash in error_log(). (Felipe) Reported by Mateusz Kocielski.
|
||||
. Fixed bug #55082 (var_export() doesn't escape properties properly).
|
||||
(Gustavo)
|
||||
|
||||
- DateTime extension:
|
||||
. Fixed bug where the DateTime object got changed while using date_diff().
|
||||
(Derick)
|
||||
|
||||
- DBA extension:
|
||||
. Supress warning on non-existent file open with Berkeley DB 5.2 (Chris Jones)
|
||||
|
||||
- PDO ODBC driver:
|
||||
. Fixed data type usage in 64bit. (leocsilva at gmail dot com)
|
||||
|
||||
- SPL extension:
|
||||
. Fixed bug #54971 (Wrong result when using iterator_to_array with use_keys
|
||||
on true). (Pierrick)
|
||||
|
||||
16 Jun 2011, PHP 5.3.7 RC1
|
||||
- Upgraded bundled SQLite to version 3.7.6.3. (Scott)
|
||||
- Upgraded bundled PCRE to version 8.12. (Scott)
|
||||
- Increased the backtrack limit from 100000 to 1000000 (Rasmus)
|
||||
|
||||
- Zend Engine:
|
||||
. Fixed bug #55007 (compiler fail after previous fail). (Felipe)
|
||||
. Fixed bug #54910 (Crash when calling call_user_func with unknown function
|
||||
name). (Dmitry)
|
||||
. Fixed bug #54804 (__halt_compiler and imported namespaces).
|
||||
(Pierrick, Felipe)
|
||||
. Fixed bug #54624 (class_alias and type hint). (Felipe)
|
||||
. Fixed bug #54585 (track_errors causes segfault). (Dmitry)
|
||||
. Fixed bug #54423 (classes from dl()'ed extensions are not destroyed).
|
||||
(Tony, Dmitry)
|
||||
. Fixed bug #54372 (Crash accessing global object itself returned from its
|
||||
__get() handle). (Dmitry)
|
||||
. Fixed bug #54358 (Closure, use and reference). (Dmitry)
|
||||
. Fixed bug #54367 (Use of closure causes problem in ArrayAccess). (Dmitry)
|
||||
. Fixed bug #54039 (use() of static variables in lambda functions can break
|
||||
staticness). (Dmitry)
|
||||
. Fixed bug #54262 (Crash when assigning value to a dimension in a non-array).
|
||||
(Dmitry)
|
||||
|
||||
- Core:
|
||||
. Implemented FR #54459 (Range function accuracy). (Adam)
|
||||
. Added PHP_MANDIR constant telling where the manpages were installed into,
|
||||
and an --man-dir argument to php-config. (Hannes)
|
||||
|
||||
. Fixed a crash inside dtor for error handling. (Ilia)
|
||||
. Fixed bug #54939 (File path injection vulnerability in RFC1867 File upload
|
||||
filename). (Felipe) Reported by Krzysztof Kotowicz. (CVE-2011-2202)
|
||||
|
||||
. Fixed bug #54935 php_win_err can lead to crash. (Pierre)
|
||||
. Fixed bug #54924 (assert.* is not being reset upon request shutdown). (Ilia)
|
||||
. Fixed bug #54895 (Fix compiling with older gcc version without need for
|
||||
membar_producer macro). (mhei at heimpold dot de)
|
||||
. Fixed bug #54723 (getimagesize() doesn't check the full ico signature).
|
||||
(Scott)
|
||||
. Fixed bug #54580 (get_browser() segmentation fault when browscap ini
|
||||
directive is set through php_admin_value). (Gustavo)
|
||||
. Fixed bug #54238 (use-after-free in substr_replace()). (Stas)
|
||||
(CVE-2011-1148)
|
||||
. Fixed bug #54180 (parse_url() incorrectly parses path when ? in fragment).
|
||||
(tomas dot brastavicius at quantum dot lt, Pierrick)
|
||||
. Fixed bug #54137 (file_get_contents POST request sends additional line
|
||||
break). (maurice-php at mertinkat dot net, Ilia)
|
||||
. Fixed bug #54866 (incorrect accounting for realpath_cache_size).
|
||||
(Dustin Ward)
|
||||
. Fixed bug #54721 (Different Hashes on Windows, BSD and Linux on wrong Salt
|
||||
size). (Pierre, os at irj dot ru)
|
||||
. Fixed bug #53848 (fgetcsv() ignores spaces at beginnings of fields). (Ilia)
|
||||
. Alternative fix for bug #52550, as applied to the round() function (signed
|
||||
overflow), as the old fix impacted the algorithm for numbers with magnitude
|
||||
smaller than 0. (Gustavo)
|
||||
. Fixed bug #51997 (SEEK_CUR with 0 value, returns a warning). (Ilia)
|
||||
. Fixed bug #50363 (Invalid parsing in convert.quoted-printable-decode
|
||||
filter). (slusarz at curecanti dot org)
|
||||
. Fixed bug #48465 (sys_get_temp_dir() possibly inconsistent when using
|
||||
TMPDIR on Windows). (Pierre)
|
||||
|
||||
- Apache2 Handler SAPI:
|
||||
. Fixed bug #54529 (SAPI crashes on apache_config.c:197).
|
||||
(hebergement at riastudio dot fr)
|
||||
|
||||
- CLI SAPI:
|
||||
. Fixed bug #52496 (Zero exit code on option parsing failure). (Ilia)
|
||||
|
||||
- cURL:
|
||||
. Added ini option curl.cainfo (support for custom cert db). (Pierre)
|
||||
. Added CURLINFO_REDIRECT_URL support. (Daniel Stenberg, Pierre)
|
||||
. Added support for CURLOPT_MAX_RECV_SPEED_LARGE and
|
||||
CURLOPT_MAX_SEND_SPEED_LARGE. FR #51815. (Pierrick)
|
||||
|
||||
- DateTime extension:
|
||||
. Fixed bug #54340 (DateTime::add() method bug). (Adam)
|
||||
. Fixed bug #54316 (DateTime::createFromFormat does not handle trailing '|'
|
||||
correctly). (Adam)
|
||||
. Fixed bug #54283 (new DatePeriod(NULL) causes crash). (Felipe)
|
||||
. Fixed bug #51819 (Case discrepancy in timezone names cause Uncaught
|
||||
exception and fatal error). (Hannes)
|
||||
|
||||
- DBA extension:
|
||||
. Fixed bug #54242 (dba_insert returns true if key already exists). (Felipe)
|
||||
|
||||
- Exif extesion:
|
||||
. Fixed bug #54121 (error message format string typo). (Ilia)
|
||||
|
||||
- Fileinfo extension:
|
||||
. Fixed bug #54934 (Unresolved symbol strtoull in HP-UX 11.11). (Felipe)
|
||||
|
||||
- Filter extension:
|
||||
. Added 3rd parameter to filter_var_array() and filter_input_array()
|
||||
functions that allows disabling addition of empty elements. (Ilia)
|
||||
. Fixed bug #53037 (FILTER_FLAG_EMPTY_STRING_NULL is not implemented). (Ilia)
|
||||
|
||||
- Interbase extension:
|
||||
. Fixed bug #54269 (Short exception message buffer causes crash). (Felipe)
|
||||
|
||||
- intl extension:
|
||||
. Implemented FR #54540 (Allow loading of arbitrary resource bundles when
|
||||
fallback is disabled). (David Zuelke, Stas)
|
||||
. Implemented FR #54561 (Expose ICU version info). (David Zuelke, Ilia)
|
||||
|
||||
- json extension:
|
||||
. Fixed bug #54484 (Empty string in json_decode doesn't reset
|
||||
json_last_error()). (Ilia)
|
||||
|
||||
- LDAP extension:
|
||||
. Fixed bug #53339 (Fails to build when compilng with gcc 4.5 and DSO
|
||||
libraries). (Clint Byrum, Raphael)
|
||||
|
||||
- libxml extension:
|
||||
. Fixed bug #54601 (Removing the doctype node segfaults). (Hannes)
|
||||
. Fixed bug #54440 (libxml extension ignores default context). (Gustavo)
|
||||
|
||||
- mbstring extension:
|
||||
. Fixed bug #54494 (mb_substr() mishandles UTF-32LE and UCS-2LE). (Gustavo)
|
||||
|
||||
- MySQL Improved extension:
|
||||
. Fixed Bug #54221 (mysqli::get_warnings segfault when used in multi queries).
|
||||
(Andrey)
|
||||
|
||||
- mysqlnd
|
||||
. Fixed crash when using more than 28,000 bound parameters. Workaround is to
|
||||
set mysqlnd.net_cmd_buffer_size to at least 9000. (Andrey)
|
||||
. Fixed bug #54674 mysqlnd valid_sjis_(head|tail) is using invalid operator
|
||||
and range). (nihen at megabbs dot com, Andrey)
|
||||
|
||||
- OpenSSL extension
|
||||
. Fixed bug #54992 (Stream not closed and error not returned when SSL
|
||||
CN_match fails). (Gustavo, laird_ngrps at dodo dot com dot au)
|
||||
|
||||
- Oracle Database extension (OCI8):
|
||||
. Added oci_client_version() returning the runtime Oracle client library
|
||||
version (Chris Jones)
|
||||
|
||||
- PDO extension:
|
||||
. Fixed bug #54929 (Parse error with single quote in sql comment). (Felipe)
|
||||
. Fixed bug #52104 (bindColumn creates Warning regardless of ATTR_ERRMODE
|
||||
settings). (Ilia)
|
||||
|
||||
- PDO DBlib driver:
|
||||
. Fixed bug #54167 (PDO_DBLIB returns null on SQLUNIQUE field).
|
||||
(mjh at hodginsmedia dot com, Felipe)
|
||||
|
||||
- PDO MySQL driver:
|
||||
. Fixed bug #54644 (wrong pathes in php_pdo_mysql_int.h). (Tony, Johannes)
|
||||
. Fixed bug #53782 (foreach throws irrelevant exception). (Johannes, Andrey)
|
||||
. Implemented FR #48587 (MySQL PDO driver doesn't support SSL connections).
|
||||
(Rob)
|
||||
|
||||
- PDO PostgreSQL driver:
|
||||
. Fixed bug #54318 (Non-portable grep option used in PDO pgsql
|
||||
configuration). (bwalton at artsci dot utoronto dot ca)
|
||||
|
||||
- PDO Oracle driver:
|
||||
. Fixed bug #44989 (64bit Oracle RPMs still not supported by pdo-oci).
|
||||
(jbnance at tresgeek dot net)
|
||||
|
||||
- Phar extension:
|
||||
. Fixed bug #54395 (Phar::mount() crashes when calling with wrong parameters).
|
||||
(Felipe)
|
||||
|
||||
- PHP-FPM SAPI:
|
||||
. Added xml format to the status page. (fat)
|
||||
. Removed timestamp in logs written by children processes. (fat)
|
||||
. Fixed exit at FPM startup on fpm_resources_prepare() errors. (fat)
|
||||
. Added master rlimit_files and rlimit_core in the global configuration
|
||||
settings. (fat)
|
||||
. Removed pid in debug logs written by chrildren processes. (fat)
|
||||
. Added custom access log (also added per request %CPU and memory
|
||||
mesurement). (fat)
|
||||
. Added a real scoreboard and several improvements to the status page. (fat)
|
||||
|
||||
- Reflection extension:
|
||||
. Fixed bug #54347 (reflection_extension does not lowercase module function
|
||||
name). (Felipe, laruence at yahoo dot com dot cn)
|
||||
|
||||
- SOAP extension:
|
||||
. Fixed bug #54312 (soap_version logic bug). (tom at samplonius dot org)
|
||||
|
||||
- Sockets extension:
|
||||
. Fixed stack buffer overflow in socket_connect(). (CVE-2011-1938)
|
||||
Found by Mateusz Kocielski, Marek Kroemeke and Filip Palian. (Felipe)
|
||||
. Changed socket_set_block() and socket_set_nonblock() so they emit warnings
|
||||
on error. (Gustavo)
|
||||
. Fixed bug #51958 (socket_accept() fails on IPv6 server sockets). (Gustavo)
|
||||
|
||||
- SPL extension:
|
||||
. Fixed bug #54970 (SplFixedArray::setSize() isn't resizing). (Felipe)
|
||||
. Fixed bug #54609 (Certain implementation(s) of SplFixedArray cause hard
|
||||
crash). (Felipe)
|
||||
. Fixed bug #54384 (Dual iterators, GlobIterator, SplFileObject and
|
||||
SplTempFileObject crash when user-space classes don't call the paren
|
||||
constructor). (Gustavo)
|
||||
. Fixed bug #54292 (Wrong parameter causes crash in
|
||||
SplFileObject::__construct()). (Felipe)
|
||||
. Fixed bug #54291 (Crash iterating DirectoryIterator for dir name starting
|
||||
with \0). (Gustavo)
|
||||
. Fixed bug #54281 (Crash in non-initialized RecursiveIteratorIterator).
|
||||
(Felipe)
|
||||
|
||||
- Streams:
|
||||
. Fixed bug #54946 (stream_get_contents infinite loop). (Hannes)
|
||||
. Fixed bug #54623 (Segfault when writing to a persistent socket after
|
||||
closing a copy of the socket). (Gustavo)
|
||||
|
||||
. Zip extension:
|
||||
. Fixed bug #54681 (addGlob() crashes on invalid flags). (Felipe)
|
||||
|
||||
17 Mar 2011, PHP 5.3.6
|
||||
- Upgraded bundled Sqlite3 to version 3.7.4. (Ilia)
|
||||
- Upgraded bundled PCRE to version 8.11. (Ilia)
|
||||
|
||||
@@ -8,6 +239,8 @@
|
||||
. Indirect reference to $this fails to resolve if direct $this is never used
|
||||
in method. (Scott)
|
||||
. Added options to debug backtrace functions. (Stas)
|
||||
. Fixed bug numerous crashes due to setlocale (crash on error, pcre, mysql
|
||||
etc.) on Windows in thread safe mode. (Pierre)
|
||||
. Fixed Bug #53971 (isset() and empty() produce apparently spurious runtime
|
||||
error). (Dmitry)
|
||||
. Fixed Bug #53958 (Closures can't 'use' shared variables by value and by
|
||||
@@ -16,12 +249,16 @@
|
||||
. Fixed Bug #51458 (Lack of error context with nested exceptions). (Stas)
|
||||
. Fixed Bug #47143 (Throwing an exception in a destructor causes a fatal
|
||||
error). (Stas)
|
||||
. Fixed bug #43512 (same parameter name can be used multiple times in
|
||||
method/function definition). (Felipe)
|
||||
|
||||
- Core:
|
||||
. Added ability to connect to HTTPS sites through proxy with basic
|
||||
authentication using stream_context/http/header/Proxy-Authorization (Dmitry)
|
||||
. Changed default value of ini directive serialize_precision from 100 to 17.
|
||||
(Gustavo)
|
||||
. Fixed bug #54055 (buffer overrun with high values for precision ini
|
||||
setting). (Gustavo)
|
||||
. Fixed bug #53959 (reflection data for fgetcsv out-of-date). (Richard)
|
||||
. Fixed bug #53577 (Regression introduced in 5.3.4 in open_basedir with a
|
||||
trailing forward slash). (lekensteyn at gmail dot com, Pierre)
|
||||
@@ -53,6 +290,10 @@
|
||||
. Fixed bug #52063 (DateTime constructor's second argument doesn't have a
|
||||
null default value). (Gustavo, Stas)
|
||||
|
||||
- Exif extension:
|
||||
. Fixed bug #54002 (crash on crafted tag, reported by Luca Carettoni).
|
||||
(Pierre) (CVE-2011-0708)
|
||||
|
||||
- Filter extension:
|
||||
. Fixed bug #53924 (FILTER_VALIDATE_URL doesn't validate port number).
|
||||
(Ilia, Gustavo)
|
||||
@@ -107,6 +348,8 @@
|
||||
- OpenSSL extension:
|
||||
. Fixed stream_socket_enable_crypto() not honoring the socket timeout in
|
||||
server mode. (Gustavo)
|
||||
. Fixed bug #54060 (Memory leaks when openssl_encrypt). (Pierre)
|
||||
. Fixed bug #54061 (Memory leaks when openssl_decrypt). (Pierre)
|
||||
. Fixed bug #53592 (stream_socket_enable_crypto() busy-waits in client mode).
|
||||
(Gustavo)
|
||||
. Implemented FR #53447 (Cannot disable SessionTicket extension for servers
|
||||
@@ -128,6 +371,8 @@
|
||||
(gyp at balabit dot hu)
|
||||
|
||||
- Phar extension:
|
||||
. Fixed bug #54247 (format-string vulnerability on Phar). (Felipe)
|
||||
(CVE-2011-1153)
|
||||
. Fixed bug #53541 (format string bug in ext/phar).
|
||||
(crrodriguez at opensuse dot org, Ilia)
|
||||
. Fixed bug #53898 (PHAR reports invalid error message, when the directory
|
||||
@@ -148,6 +393,10 @@
|
||||
. Fixed bug #53915 (ReflectionClass::getConstant(s) emits fatal error on
|
||||
constants with self::). (Gustavo)
|
||||
|
||||
- Shmop extension:
|
||||
. Fixed bug #54193 (Integer overflow in shmop_read()). (Felipe)
|
||||
Reported by Jose Carlos Norte <jose at eyeos dot org> (CVE-2011-1092)
|
||||
|
||||
- SNMP extension:
|
||||
. Fixed bug #51336 (snmprealwalk (snmp v1) does not handle end of OID tree
|
||||
correctly). (Boris Lytochkin)
|
||||
@@ -157,9 +406,14 @@
|
||||
(Mateusz Kocielski, Pierre)
|
||||
|
||||
- SPL extension:
|
||||
. Fixed memory leak in DirectoryIterator::getExtension() and
|
||||
SplFileInfo::getExtension(). (Felipe)
|
||||
. Fixed bug #53914 (SPL assumes HAVE_GLOB is defined). (Chris Jones)
|
||||
. Fixed bug #53515 (property_exists incorrect on ArrayObject null and 0
|
||||
values). (Felipe)
|
||||
. Fixed bug #49608 (Using CachingIterator on DirectoryIterator instance
|
||||
segfaults). (Felipe)
|
||||
|
||||
. Added SplFileInfo::getExtension(). FR #48767. (Peter Cowburn)
|
||||
|
||||
- SQLite3 extension:
|
||||
@@ -173,12 +427,18 @@
|
||||
all of the rows have been fetched). (Scott)
|
||||
|
||||
- Streams:
|
||||
. Fixed bug #54092 (Segmentation fault when using HTTP proxy with the FTP
|
||||
wrapper). (Gustavo)
|
||||
. Fixed bug #53913 (Streams functions assume HAVE_GLOB is defined). (Chris
|
||||
Jones)
|
||||
. Fixed bug #53903 (userspace stream stat callback does not separate the
|
||||
elements of the returned array before converting them). (Gustavo)
|
||||
. Implemented FR #26158 (open arbitrary file descriptor with fopen). (Gustavo)
|
||||
|
||||
- Tokenizer Extension
|
||||
. Fixed bug #54089 (token_get_all() does not stop after __halt_compiler).
|
||||
(Ilia)
|
||||
|
||||
- XSL extension:
|
||||
. Fixed memory leaked introduced by the NULL poisoning patch.
|
||||
(Mateusz Kocielski, Pierre)
|
||||
|
||||
+10
-14
@@ -100,16 +100,14 @@ Derick) run the following commands for you:
|
||||
|
||||
``sudo -u ezmlm ezmlm-sub ~ezmlm/primary-qa-tester/mod moderator-email-address``
|
||||
|
||||
3. Update the MD5 sums in ``web/qa/trunk/include/rc-md5sums.txt`` (no empty lines).
|
||||
3. Update ``web/qa/trunk/include/release-qa.php`` with the appropriate information.
|
||||
See the documentation within release-qa.php for more information, but all releases
|
||||
and RCs are configured here. Only $QA_RELEASES needs to be edited.
|
||||
|
||||
4. Update in ``web/qa/trunk/include/release-qa.php`` constants with the new RC and
|
||||
commit this.
|
||||
Example: When rolling an RC, set the 'rc' with appropriate information for the
|
||||
given version.
|
||||
|
||||
a. ``$BUILD_TEST_RELEASES`` = array("4.4.7RC1", "5.2.2RC1")
|
||||
|
||||
b. ``$CURRENT_QA_RELEASE_4`` = "4.4.7RC1" (``$CURRENT_QA_RELEASE_5`` for PHP5)
|
||||
|
||||
c. ``$RELEASE_PROCESS`` = array(4 => true, 5 => true)
|
||||
Note: Remember to update the MD5 checksum information.
|
||||
|
||||
1. Update in ``php-bugs/trunk/include/functions.inc`` the ``show_version_option``
|
||||
function to include the new RC and commit.
|
||||
@@ -244,13 +242,11 @@ number, and remove the RC from there.
|
||||
|
||||
11. Update ``qaweb/include/release-qa.php``
|
||||
|
||||
a. Update the $BUILD_TEST_RELEASES array with the release name
|
||||
- Update $QA_RELEASES with the appropriate information, which means bumping
|
||||
the version number to an upcoming version.
|
||||
|
||||
b. Update $RELEASE_PROCESS array (set to false)
|
||||
|
||||
I. For PHP4: Set $CURRENT_QA_RELEASE_4 to false
|
||||
|
||||
II. For PHP5: Set $CURRENT_QA_RELEASE_5 to false
|
||||
Example: If PHP 5.3.7 is being released, then PHP 5.3.8 is the next QA version,
|
||||
so replace 5.3.7 with 5.3.8 within $QA_RELEASES.
|
||||
|
||||
Re-releasing the same version (or -pl)
|
||||
--------------------------------------
|
||||
|
||||
+17
-2
@@ -629,7 +629,14 @@ CWD_API void realpath_cache_del(const char *path, int path_len TSRMLS_DC) /* {{{
|
||||
memcmp(path, (*bucket)->path, path_len) == 0) {
|
||||
realpath_cache_bucket *r = *bucket;
|
||||
*bucket = (*bucket)->next;
|
||||
CWDG(realpath_cache_size) -= sizeof(realpath_cache_bucket) + r->path_len + 1 + r->realpath_len + 1;
|
||||
|
||||
/* if the pointers match then only subtract the length of the path */
|
||||
if(r->path == r->realpath) {
|
||||
CWDG(realpath_cache_size) -= sizeof(realpath_cache_bucket) + r->path_len + 1;
|
||||
} else {
|
||||
CWDG(realpath_cache_size) -= sizeof(realpath_cache_bucket) + r->path_len + 1 + r->realpath_len + 1;
|
||||
}
|
||||
|
||||
free(r);
|
||||
return;
|
||||
} else {
|
||||
@@ -704,7 +711,14 @@ static inline realpath_cache_bucket* realpath_cache_find(const char *path, int p
|
||||
if (CWDG(realpath_cache_ttl) && (*bucket)->expires < t) {
|
||||
realpath_cache_bucket *r = *bucket;
|
||||
*bucket = (*bucket)->next;
|
||||
CWDG(realpath_cache_size) -= sizeof(realpath_cache_bucket) + r->path_len + 1 + r->realpath_len + 1;
|
||||
|
||||
/* if the pointers match then only subtract the length of the path */
|
||||
if(r->path == r->realpath) {
|
||||
CWDG(realpath_cache_size) -= sizeof(realpath_cache_bucket) + r->path_len + 1;
|
||||
} else {
|
||||
CWDG(realpath_cache_size) -= sizeof(realpath_cache_bucket) + r->path_len + 1 + r->realpath_len + 1;
|
||||
}
|
||||
|
||||
free(r);
|
||||
} else if (key == (*bucket)->key && path_len == (*bucket)->path_len &&
|
||||
memcmp(path, (*bucket)->path, path_len) == 0) {
|
||||
@@ -1079,6 +1093,7 @@ static int tsrm_realpath_r(char *path, int start, int len, int *ll, time_t *t, i
|
||||
}
|
||||
if (is_dir && !directory) {
|
||||
/* not a directory */
|
||||
tsrm_free_alloca(tmp, use_heap);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ dnl This file contains local autoconf functions.
|
||||
|
||||
AC_DEFUN([LIBZEND_BISON_CHECK],[
|
||||
# we only support certain bison versions
|
||||
bison_version_list="1.28 1.35 1.75 1.875 2.0 2.1 2.2 2.3 2.4 2.4.1 2.4.2 2.4.3"
|
||||
bison_version_list="1.28 1.35 1.75 1.875 2.0 2.1 2.2 2.3 2.4 2.4.1 2.4.2 2.4.3 2.5"
|
||||
|
||||
# for standalone build of Zend Engine
|
||||
test -z "$SED" && SED=sed
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
--TEST--
|
||||
Bug #54013 (ReflectionParam for duplicate parameter contains garbage)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class a
|
||||
{
|
||||
function b($aaaaaaaa, $aaaaaaaa)
|
||||
{
|
||||
$params = func_get_args();
|
||||
}
|
||||
}
|
||||
|
||||
$c = new a;
|
||||
$c->b('waa?', 'meukee!');
|
||||
|
||||
$reflectionClass = new ReflectionClass($c);
|
||||
$params = $reflectionClass->getMethod('b')->getParameters();
|
||||
|
||||
var_dump($params[0], $params[1]);
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
object(ReflectionParameter)#%d (1) {
|
||||
["name"]=>
|
||||
string(8) "aaaaaaaa"
|
||||
}
|
||||
object(ReflectionParameter)#%d (1) {
|
||||
["name"]=>
|
||||
string(8) "aaaaaaaa"
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
--TEST--
|
||||
Bug #54039 (use() of static variables in lambda functions can break staticness)
|
||||
--FILE--
|
||||
<?php
|
||||
function test_1() {
|
||||
static $v = 0;
|
||||
++$v;
|
||||
echo "Outer function increments \$v to $v\n";
|
||||
$f = function() use($v) {
|
||||
echo "Inner function reckons \$v is $v\n";
|
||||
};
|
||||
return $f;
|
||||
}
|
||||
|
||||
$f = test_1(); $f();
|
||||
$f = test_1(); $f();
|
||||
|
||||
function test_2() {
|
||||
static $v = 0;
|
||||
$f = function() use($v) {
|
||||
echo "Inner function reckons \$v is $v\n";
|
||||
};
|
||||
++$v;
|
||||
echo "Outer function increments \$v to $v\n";
|
||||
return $f;
|
||||
}
|
||||
|
||||
$f = test_2(); $f();
|
||||
$f = test_2(); $f();
|
||||
|
||||
function test_3() {
|
||||
static $v = "";
|
||||
$v .= 'b';
|
||||
echo "Outer function catenates 'b' onto \$v to give $v\n";
|
||||
$f = function() use($v) {
|
||||
echo "Inner function reckons \$v is $v\n";
|
||||
};
|
||||
$v .= 'a';
|
||||
echo "Outer function catenates 'a' onto \$v to give $v\n";
|
||||
return $f;
|
||||
}
|
||||
$f = test_3(); $f();
|
||||
$f = test_3(); $f();
|
||||
--EXPECT--
|
||||
Outer function increments $v to 1
|
||||
Inner function reckons $v is 1
|
||||
Outer function increments $v to 2
|
||||
Inner function reckons $v is 2
|
||||
Outer function increments $v to 1
|
||||
Inner function reckons $v is 0
|
||||
Outer function increments $v to 2
|
||||
Inner function reckons $v is 1
|
||||
Outer function catenates 'b' onto $v to give b
|
||||
Outer function catenates 'a' onto $v to give ba
|
||||
Inner function reckons $v is b
|
||||
Outer function catenates 'b' onto $v to give bab
|
||||
Outer function catenates 'a' onto $v to give baba
|
||||
Inner function reckons $v is bab
|
||||
@@ -0,0 +1,17 @@
|
||||
--TEST--
|
||||
Bug #54262 (Crash when assigning value to a dimension in a non-array)
|
||||
--FILE--
|
||||
<?php
|
||||
$a = '0';
|
||||
var_dump(isset($a['b']));
|
||||
$simpleString = preg_match('//', '', $a->a);
|
||||
$simpleString["wrong"] = "f";
|
||||
echo "ok\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
bool(true)
|
||||
|
||||
Warning: Attempt to modify property of non-object in %s/Zend/tests/bug54262.php on line 4
|
||||
|
||||
Warning: Cannot use a scalar value as an array in %s/Zend/tests/bug54262.php on line 5
|
||||
ok
|
||||
@@ -0,0 +1,17 @@
|
||||
--TEST--
|
||||
Bug #54265 (crash when variable gets reassigned in error handler)
|
||||
--FILE--
|
||||
<?php
|
||||
function my_errorhandler($errno,$errormsg) {
|
||||
global $my_var;
|
||||
$my_var = 0;
|
||||
echo "EROOR: $errormsg\n";
|
||||
}
|
||||
set_error_handler("my_errorhandler");
|
||||
$my_var = str_repeat("A",$my_var[0]->errormsg = "xyz");
|
||||
echo "ok\n";
|
||||
?>
|
||||
--EXPECT--
|
||||
EROOR: Creating default object from empty value
|
||||
ok
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
--TEST--
|
||||
Bug #54268 (Double free when destroy_zend_class fails)
|
||||
--INI--
|
||||
memory_limit=8M
|
||||
--SKIPIF--
|
||||
<?php
|
||||
$zend_mm_enabled = getenv("USE_ZEND_ALLOC");
|
||||
if ($zend_mm_enabled === "0") {
|
||||
die("skip Zend MM disabled");
|
||||
}
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
class DestructableObject
|
||||
{
|
||||
public function __destruct()
|
||||
{
|
||||
DestructableObject::__destruct();
|
||||
}
|
||||
}
|
||||
class DestructorCreator
|
||||
{
|
||||
public function __destruct()
|
||||
{
|
||||
$this->test = new DestructableObject;
|
||||
}
|
||||
}
|
||||
class Test
|
||||
{
|
||||
public static $mystatic;
|
||||
}
|
||||
$x = new Test();
|
||||
Test::$mystatic = new DestructorCreator();
|
||||
--EXPECTF--
|
||||
Fatal error: Allowed memory size of %s bytes exhausted%s(tried to allocate %s bytes) in %s on line %d
|
||||
@@ -0,0 +1,39 @@
|
||||
--TEST--
|
||||
Bug #54358 (Closure, use and reference)
|
||||
--FILE--
|
||||
<?php
|
||||
class asserter {
|
||||
public function call($function) {
|
||||
}
|
||||
}
|
||||
|
||||
$asserter = new asserter();
|
||||
|
||||
$closure = function() use ($asserter, &$function) {
|
||||
$asserter->call($function = 'md5');
|
||||
};
|
||||
|
||||
$closure();
|
||||
|
||||
var_dump($function);
|
||||
|
||||
$closure = function() use ($asserter, $function) {
|
||||
$asserter->call($function);
|
||||
};
|
||||
|
||||
$closure();
|
||||
|
||||
var_dump($function);
|
||||
|
||||
$closure = function() use ($asserter, $function) {
|
||||
$asserter->call($function);
|
||||
};
|
||||
|
||||
$closure();
|
||||
|
||||
var_dump($function);
|
||||
?>
|
||||
--EXPECT--
|
||||
string(3) "md5"
|
||||
string(3) "md5"
|
||||
string(3) "md5"
|
||||
@@ -0,0 +1,24 @@
|
||||
--TEST--
|
||||
Bug #54367 (Use of closure causes problem in ArrayAccess)
|
||||
--FILE--
|
||||
<?php
|
||||
class MyObjet implements ArrayAccess
|
||||
{
|
||||
public function offsetSet($offset, $value) { }
|
||||
public function offsetExists($offset) { }
|
||||
public function offsetUnset($offset) { }
|
||||
|
||||
public function offsetGet ($offset)
|
||||
{
|
||||
return function ($var) use ($offset) { // here is the problem
|
||||
var_dump($offset, $var);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
$a = new MyObjet();
|
||||
echo $a['p']('foo');
|
||||
?>
|
||||
--EXPECT--
|
||||
string(1) "p"
|
||||
string(3) "foo"
|
||||
@@ -0,0 +1,23 @@
|
||||
--TEST--
|
||||
Bug #54372 (Crash accessing global object itself returned from its __get() handle)
|
||||
--FILE--
|
||||
<?php
|
||||
class test_class
|
||||
{
|
||||
public function __get($name)
|
||||
{
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function b()
|
||||
{
|
||||
echo "ok\n";
|
||||
}
|
||||
}
|
||||
|
||||
global $test3;
|
||||
$test3 = new test_class();
|
||||
$test3->a->b();
|
||||
?>
|
||||
--EXPECT--
|
||||
ok
|
||||
@@ -0,0 +1,15 @@
|
||||
--TEST--
|
||||
Bug #54585 (track_errors causes segfault)
|
||||
--INI--
|
||||
track_errors=On
|
||||
--FILE--
|
||||
<?php
|
||||
function testing($source) {
|
||||
unset($source[$cos]);
|
||||
}
|
||||
testing($_GET);
|
||||
echo "ok\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Notice: Undefined variable: cos in %sbug54585.php on line 3
|
||||
ok
|
||||
@@ -0,0 +1,26 @@
|
||||
--TEST--
|
||||
Bug #54624 (class_alias and type hint)
|
||||
--FILE--
|
||||
<?php
|
||||
class A
|
||||
{
|
||||
function foo(A $param) {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class_alias('A', 'AliasA');
|
||||
|
||||
eval('
|
||||
class B extends A
|
||||
{
|
||||
function foo(AliasA $param) {
|
||||
}
|
||||
|
||||
}
|
||||
');
|
||||
|
||||
echo "DONE\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
DONE
|
||||
@@ -0,0 +1,3 @@
|
||||
<?php
|
||||
namespace b\c {}
|
||||
namespace b\d {}
|
||||
@@ -0,0 +1,11 @@
|
||||
--TEST--
|
||||
Bug #54804 (__halt_compiler and imported namespaces)
|
||||
--FILE--
|
||||
<?php
|
||||
namespace a;
|
||||
require __DIR__ . '/bug54804.inc';
|
||||
echo 'DONE';
|
||||
__halt_compiler();
|
||||
?>
|
||||
--EXPECT--
|
||||
DONE
|
||||
@@ -0,0 +1,28 @@
|
||||
--TEST--
|
||||
Bug #54910 (Crash when calling call_user_func with unknown function name)
|
||||
--FILE--
|
||||
<?php
|
||||
class A {
|
||||
public function __call($method, $args) {
|
||||
if (stripos($method, 'get') === 0) {
|
||||
return $this->get();
|
||||
}
|
||||
die("No such method - '$method'\n");
|
||||
}
|
||||
|
||||
protected function get() {
|
||||
$class = get_class($this);
|
||||
$call = array($class, 'noSuchMethod');
|
||||
|
||||
if (is_callable($call)) {
|
||||
call_user_func($call);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class B extends A {}
|
||||
|
||||
$input = new B();
|
||||
echo $input->getEmail();
|
||||
--EXPECT--
|
||||
No such method - 'noSuchMethod'
|
||||
@@ -0,0 +1,23 @@
|
||||
--TEST--
|
||||
Bug #55007 (compiler fail after previous fail)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
function __autoload($classname) {
|
||||
if ('CompileErrorClass'==$classname) eval('class CompileErrorClass { function foo() { $a[] } }');
|
||||
if ('MyErrorHandler'==$classname) eval('class MyErrorHandler { function __construct() { print "My error handler runs.\n"; } }');
|
||||
}
|
||||
|
||||
function shutdown() {
|
||||
new MyErrorHandler();
|
||||
}
|
||||
|
||||
|
||||
register_shutdown_function('shutdown');
|
||||
|
||||
new CompileErrorClass();
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Cannot use [] for reading in %s(%d) : eval()'d code on line %d
|
||||
My error handler runs.
|
||||
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
concat difffent types
|
||||
concat different types
|
||||
--INI--
|
||||
precision=14
|
||||
--FILE--
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
Persistent case insensetive and user defined constants
|
||||
Persistent case insensitive and user defined constants
|
||||
--FILE--
|
||||
<?php
|
||||
var_dump(ZEND_THREAD_safe);
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
--TEST--
|
||||
Argument parsing error #001
|
||||
--FILE--
|
||||
<?php
|
||||
function foo($arg1 string) {}
|
||||
?>
|
||||
--EXPECTF--
|
||||
Parse error: syntax error, unexpected T_STRING, expecting ')' in %sfunction_arguments_001.php on line %d
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
--TEST--
|
||||
Argument parsing error #002
|
||||
--FILE--
|
||||
<?php
|
||||
function foo($arg1/) {}
|
||||
?>
|
||||
--EXPECTF--
|
||||
Parse error: syntax error, unexpected '/', expecting ')' in %sfunction_arguments_002.php on line %d
|
||||
|
||||
@@ -808,6 +808,7 @@ ZEND_API void _zend_bailout(char *filename, uint lineno) /* {{{ */
|
||||
exit(-1);
|
||||
}
|
||||
CG(unclean_shutdown) = 1;
|
||||
CG(active_class_entry) = NULL;
|
||||
CG(in_compilation) = EG(in_execution) = 0;
|
||||
EG(current_execute_data) = NULL;
|
||||
LONGJMP(*EG(bailout), FAILURE);
|
||||
|
||||
@@ -2082,6 +2082,22 @@ ZEND_API int zend_get_module_started(const char *module_name) /* {{{ */
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
static int clean_module_class(const zend_class_entry **ce, int *module_number TSRMLS_DC) /* {{{ */
|
||||
{
|
||||
if ((*ce)->type == ZEND_INTERNAL_CLASS && (*ce)->module->module_number == *module_number) {
|
||||
return ZEND_HASH_APPLY_REMOVE;
|
||||
} else {
|
||||
return ZEND_HASH_APPLY_KEEP;
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
static void clean_module_classes(int module_number TSRMLS_DC) /* {{{ */
|
||||
{
|
||||
zend_hash_apply_with_argument(EG(class_table), (apply_func_arg_t) clean_module_class, (void *) &module_number TSRMLS_CC);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
void module_destructor(zend_module_entry *module) /* {{{ */
|
||||
{
|
||||
TSRMLS_FETCH();
|
||||
@@ -2089,6 +2105,7 @@ void module_destructor(zend_module_entry *module) /* {{{ */
|
||||
if (module->type == MODULE_TEMPORARY) {
|
||||
zend_clean_module_rsrc_dtors(module->module_number TSRMLS_CC);
|
||||
clean_module_constants(module->module_number TSRMLS_CC);
|
||||
clean_module_classes(module->module_number TSRMLS_CC);
|
||||
}
|
||||
|
||||
if (module->module_started && module->module_shutdown_func) {
|
||||
@@ -2573,6 +2590,11 @@ get_function_via_handler:
|
||||
if (fcc->function_handler) {
|
||||
retval = 1;
|
||||
call_via_handler = (fcc->function_handler->common.fn_flags & ZEND_ACC_CALL_VIA_HANDLER) != 0;
|
||||
if (call_via_handler && !fcc->object_ptr && EG(This) &&
|
||||
Z_OBJ_HT_P(EG(This))->get_class_entry &&
|
||||
instanceof_function(Z_OBJCE_P(EG(This)), fcc->calling_scope TSRMLS_CC)) {
|
||||
fcc->object_ptr = EG(This);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
int zend_startup_builtin_functions(TSRMLS_D);
|
||||
|
||||
BEGIN_EXTERN_C()
|
||||
ZEND_API void zend_fetch_debug_backtrace(zval *return_value, int skip_last, int provide_object TSRMLS_DC);
|
||||
ZEND_API void zend_fetch_debug_backtrace(zval *return_value, int skip_last, int options TSRMLS_DC);
|
||||
END_EXTERN_C()
|
||||
|
||||
#endif /* ZEND_BUILTIN_FUNCTIONS_H */
|
||||
|
||||
@@ -347,6 +347,7 @@ static int zval_copy_static_var(zval **p TSRMLS_DC, int num_args, va_list args,
|
||||
} else if (Z_ISREF_PP(p)) {
|
||||
ALLOC_INIT_ZVAL(tmp);
|
||||
*tmp = **p;
|
||||
zval_copy_ctor(tmp);
|
||||
Z_SET_REFCOUNT_P(tmp, 0);
|
||||
Z_UNSET_ISREF_P(tmp);
|
||||
} else {
|
||||
@@ -372,6 +373,7 @@ ZEND_API void zend_create_closure(zval *res, zend_function *func TSRMLS_DC) /* {
|
||||
closure = (zend_closure *)zend_object_store_get_object(res TSRMLS_CC);
|
||||
|
||||
closure->func = *func;
|
||||
closure->func.common.prototype = NULL;
|
||||
|
||||
if (closure->func.type == ZEND_USER_FUNCTION) {
|
||||
if (closure->func.op_array.static_variables) {
|
||||
|
||||
+30
-14
@@ -387,6 +387,7 @@ void fetch_simple_variable_ex(znode *result, znode *varname, int bp, zend_uchar
|
||||
result->op_type = IS_CV;
|
||||
result->u.var = lookup_cv(CG(active_op_array), varname->u.constant.value.str.val, varname->u.constant.value.str.len);
|
||||
result->u.EA.type = 0;
|
||||
varname->u.constant.value.str.val = CG(active_op_array)->vars[result->u.var].name;
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -2528,7 +2529,7 @@ static void do_inherit_method(zend_function *function) /* {{{ */
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
static zend_bool zend_do_perform_implementation_check(const zend_function *fe, const zend_function *proto) /* {{{ */
|
||||
static zend_bool zend_do_perform_implementation_check(const zend_function *fe, const zend_function *proto TSRMLS_DC) /* {{{ */
|
||||
{
|
||||
zend_uint i;
|
||||
|
||||
@@ -2571,11 +2572,24 @@ static zend_bool zend_do_perform_implementation_check(const zend_function *fe, c
|
||||
&& strcasecmp(fe->common.arg_info[i].class_name, proto->common.arg_info[i].class_name)!=0) {
|
||||
char *colon;
|
||||
|
||||
if (fe->common.type != ZEND_USER_FUNCTION ||
|
||||
strchr(proto->common.arg_info[i].class_name, '\\') != NULL ||
|
||||
(colon = zend_memrchr(fe->common.arg_info[i].class_name, '\\', fe->common.arg_info[i].class_name_len)) == NULL ||
|
||||
strcasecmp(colon+1, proto->common.arg_info[i].class_name) != 0) {
|
||||
if (fe->common.type != ZEND_USER_FUNCTION) {
|
||||
return 0;
|
||||
} else if (strchr(proto->common.arg_info[i].class_name, '\\') != NULL ||
|
||||
(colon = zend_memrchr(fe->common.arg_info[i].class_name, '\\', fe->common.arg_info[i].class_name_len)) == NULL ||
|
||||
strcasecmp(colon+1, proto->common.arg_info[i].class_name) != 0) {
|
||||
zend_class_entry **fe_ce, **proto_ce;
|
||||
int found, found2;
|
||||
|
||||
found = zend_lookup_class(fe->common.arg_info[i].class_name, fe->common.arg_info[i].class_name_len, &fe_ce TSRMLS_CC);
|
||||
found2 = zend_lookup_class(proto->common.arg_info[i].class_name, proto->common.arg_info[i].class_name_len, &proto_ce TSRMLS_CC);
|
||||
|
||||
/* Check for class alias */
|
||||
if (found != SUCCESS || found2 != SUCCESS ||
|
||||
(*fe_ce)->type == ZEND_INTERNAL_CLASS ||
|
||||
(*proto_ce)->type == ZEND_INTERNAL_CLASS ||
|
||||
*fe_ce != *proto_ce) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (fe->common.arg_info[i].array_type_hint != proto->common.arg_info[i].array_type_hint) {
|
||||
@@ -2667,11 +2681,11 @@ static zend_bool do_inherit_method_check(HashTable *child_function_table, zend_f
|
||||
}
|
||||
|
||||
if (child->common.prototype && (child->common.prototype->common.fn_flags & ZEND_ACC_ABSTRACT)) {
|
||||
if (!zend_do_perform_implementation_check(child, child->common.prototype)) {
|
||||
if (!zend_do_perform_implementation_check(child, child->common.prototype TSRMLS_CC)) {
|
||||
zend_error(E_COMPILE_ERROR, "Declaration of %s::%s() must be compatible with that of %s::%s()", ZEND_FN_SCOPE_NAME(child), child->common.function_name, ZEND_FN_SCOPE_NAME(child->common.prototype), child->common.prototype->common.function_name);
|
||||
}
|
||||
} else if (EG(error_reporting) & E_STRICT || EG(user_error_handler)) { /* Check E_STRICT (or custom error handler) before the check so that we save some time */
|
||||
if (!zend_do_perform_implementation_check(child, parent)) {
|
||||
if (!zend_do_perform_implementation_check(child, parent TSRMLS_CC)) {
|
||||
zend_error(E_STRICT, "Declaration of %s::%s() should be compatible with that of %s::%s()", ZEND_FN_SCOPE_NAME(child), child->common.function_name, ZEND_FN_SCOPE_NAME(parent), parent->common.function_name);
|
||||
}
|
||||
}
|
||||
@@ -3748,6 +3762,10 @@ void zend_do_halt_compiler_register(TSRMLS_D) /* {{{ */
|
||||
zend_mangle_property_name(&name, &len, haltoff, sizeof(haltoff) - 1, cfilename, clen, 0);
|
||||
zend_register_long_constant(name, len+1, zend_get_scanned_file_offset(TSRMLS_C), CONST_CS, 0 TSRMLS_CC);
|
||||
pefree(name, 0);
|
||||
|
||||
if (CG(in_namespace)) {
|
||||
zend_do_end_namespace(TSRMLS_C);
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
@@ -4896,14 +4914,12 @@ void zend_do_extended_fcall_end(TSRMLS_D) /* {{{ */
|
||||
|
||||
void zend_do_ticks(TSRMLS_D) /* {{{ */
|
||||
{
|
||||
if (Z_LVAL(CG(declarables).ticks)) {
|
||||
zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC);
|
||||
zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC);
|
||||
|
||||
opline->opcode = ZEND_TICKS;
|
||||
opline->op1.u.constant = CG(declarables).ticks;
|
||||
opline->op1.op_type = IS_CONST;
|
||||
SET_UNUSED(opline->op2);
|
||||
}
|
||||
opline->opcode = ZEND_TICKS;
|
||||
opline->op1.u.constant = CG(declarables).ticks;
|
||||
opline->op1.op_type = IS_CONST;
|
||||
SET_UNUSED(opline->op2);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
#define INC_BPC(op_array) if (op_array->fn_flags & ZEND_ACC_INTERACTIVE) { ((op_array)->backpatch_count++); }
|
||||
#define DEC_BPC(op_array) if (op_array->fn_flags & ZEND_ACC_INTERACTIVE) { ((op_array)->backpatch_count--); }
|
||||
#define HANDLE_INTERACTIVE() if (CG(active_op_array)->fn_flags & ZEND_ACC_INTERACTIVE) { execute_new_code(TSRMLS_C); }
|
||||
#define DO_TICKS() if (Z_LVAL(CG(declarables).ticks)) { zend_do_ticks(TSRMLS_C); }
|
||||
|
||||
#define RESET_DOC_COMMENT() \
|
||||
{ \
|
||||
|
||||
+14
-2
@@ -536,10 +536,22 @@ static inline void zend_assign_to_object(znode *result, zval **object_ptr, zval
|
||||
(Z_TYPE_P(object) == IS_BOOL && Z_LVAL_P(object) == 0) ||
|
||||
(Z_TYPE_P(object) == IS_STRING && Z_STRLEN_P(object) == 0)) {
|
||||
SEPARATE_ZVAL_IF_NOT_REF(object_ptr);
|
||||
zval_dtor(*object_ptr);
|
||||
object_init(*object_ptr);
|
||||
object = *object_ptr;
|
||||
Z_ADDREF_P(object);
|
||||
zend_error(E_STRICT, "Creating default object from empty value");
|
||||
if (Z_REFCOUNT_P(object) == 1) {
|
||||
/* object was removed by error handler, nothing to assign to */
|
||||
zval_ptr_dtor(&object);
|
||||
if (retval) {
|
||||
*retval = &EG(uninitialized_zval);
|
||||
PZVAL_LOCK(*retval);
|
||||
}
|
||||
FREE_OP(free_value);
|
||||
return;
|
||||
}
|
||||
Z_DELREF_P(object);
|
||||
zval_dtor(object);
|
||||
object_init(object);
|
||||
} else {
|
||||
zend_error(E_WARNING, "Attempt to assign property of non-object");
|
||||
if (!RETURN_VALUE_UNUSED(result)) {
|
||||
|
||||
+13
-9
@@ -296,7 +296,9 @@ void shutdown_executor(TSRMLS_D) /* {{{ */
|
||||
zend_hash_reverse_apply(EG(function_table), (apply_func_t) zend_cleanup_function_data TSRMLS_CC);
|
||||
}
|
||||
zend_hash_apply(EG(class_table), (apply_func_t) zend_cleanup_class_data TSRMLS_CC);
|
||||
} zend_end_try();
|
||||
|
||||
zend_try {
|
||||
zend_vm_stack_destroy(TSRMLS_C);
|
||||
|
||||
zend_objects_store_free_object_storage(&EG(objects_store) TSRMLS_CC);
|
||||
@@ -431,26 +433,28 @@ ZEND_API zend_bool zend_is_executing(TSRMLS_D) /* {{{ */
|
||||
|
||||
ZEND_API void _zval_ptr_dtor(zval **zval_ptr ZEND_FILE_LINE_DC) /* {{{ */
|
||||
{
|
||||
zval *zv = *zval_ptr;
|
||||
|
||||
#if DEBUG_ZEND>=2
|
||||
printf("Reducing refcount for %x (%x): %d->%d\n", *zval_ptr, zval_ptr, Z_REFCOUNT_PP(zval_ptr), Z_REFCOUNT_PP(zval_ptr) - 1);
|
||||
#endif
|
||||
Z_DELREF_PP(zval_ptr);
|
||||
if (Z_REFCOUNT_PP(zval_ptr) == 0) {
|
||||
Z_DELREF_P(zv);
|
||||
if (Z_REFCOUNT_P(zv) == 0) {
|
||||
TSRMLS_FETCH();
|
||||
|
||||
if (*zval_ptr != &EG(uninitialized_zval)) {
|
||||
GC_REMOVE_ZVAL_FROM_BUFFER(*zval_ptr);
|
||||
zval_dtor(*zval_ptr);
|
||||
efree_rel(*zval_ptr);
|
||||
if (zv != &EG(uninitialized_zval)) {
|
||||
GC_REMOVE_ZVAL_FROM_BUFFER(zv);
|
||||
zval_dtor(zv);
|
||||
efree_rel(zv);
|
||||
}
|
||||
} else {
|
||||
TSRMLS_FETCH();
|
||||
|
||||
if (Z_REFCOUNT_PP(zval_ptr) == 1) {
|
||||
Z_UNSET_ISREF_PP(zval_ptr);
|
||||
if (Z_REFCOUNT_P(zv) == 1) {
|
||||
Z_UNSET_ISREF_P(zv);
|
||||
}
|
||||
|
||||
GC_ZVAL_CHECK_POSSIBLE_ROOT(*zval_ptr);
|
||||
GC_ZVAL_CHECK_POSSIBLE_ROOT(zv);
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
+8
-10
@@ -545,9 +545,15 @@ ZEND_API void zend_hash_clean(HashTable *ht)
|
||||
|
||||
IS_CONSISTENT(ht);
|
||||
|
||||
SET_INCONSISTENT(HT_CLEANING);
|
||||
|
||||
p = ht->pListHead;
|
||||
|
||||
memset(ht->arBuckets, 0, ht->nTableSize*sizeof(Bucket *));
|
||||
ht->pListHead = NULL;
|
||||
ht->pListTail = NULL;
|
||||
ht->nNumOfElements = 0;
|
||||
ht->nNextFreeElement = 0;
|
||||
ht->pInternalPointer = NULL;
|
||||
|
||||
while (p != NULL) {
|
||||
q = p;
|
||||
p = p->pListNext;
|
||||
@@ -559,14 +565,6 @@ ZEND_API void zend_hash_clean(HashTable *ht)
|
||||
}
|
||||
pefree(q, ht->persistent);
|
||||
}
|
||||
memset(ht->arBuckets, 0, ht->nTableSize*sizeof(Bucket *));
|
||||
ht->pListHead = NULL;
|
||||
ht->pListTail = NULL;
|
||||
ht->nNumOfElements = 0;
|
||||
ht->nNextFreeElement = 0;
|
||||
ht->pInternalPointer = NULL;
|
||||
|
||||
SET_INCONSISTENT(HT_OK);
|
||||
}
|
||||
|
||||
/* This function is used by the various apply() functions.
|
||||
|
||||
@@ -211,7 +211,7 @@ inner_statement:
|
||||
|
||||
|
||||
statement:
|
||||
unticked_statement { zend_do_ticks(TSRMLS_C); }
|
||||
unticked_statement { DO_TICKS(); }
|
||||
| T_STRING ':' { zend_do_label(&$1 TSRMLS_CC); }
|
||||
;
|
||||
|
||||
@@ -291,11 +291,11 @@ unset_variable:
|
||||
;
|
||||
|
||||
function_declaration_statement:
|
||||
unticked_function_declaration_statement { zend_do_ticks(TSRMLS_C); }
|
||||
unticked_function_declaration_statement { DO_TICKS(); }
|
||||
;
|
||||
|
||||
class_declaration_statement:
|
||||
unticked_class_declaration_statement { zend_do_ticks(TSRMLS_C); }
|
||||
unticked_class_declaration_statement { DO_TICKS(); }
|
||||
;
|
||||
|
||||
|
||||
|
||||
@@ -374,7 +374,11 @@ zval *zend_std_read_property(zval *object, zval *member, int type TSRMLS_DC) /*
|
||||
} else {
|
||||
retval = &EG(uninitialized_zval_ptr);
|
||||
}
|
||||
zval_ptr_dtor(&object);
|
||||
if (EXPECTED(*retval != object)) {
|
||||
zval_ptr_dtor(&object);
|
||||
} else {
|
||||
Z_DELREF_P(object);
|
||||
}
|
||||
} else {
|
||||
if (zobj->ce->__get && guard && guard->in_get == 1) {
|
||||
if (Z_STRVAL_P(member)[0] == '\0') {
|
||||
|
||||
+78
-59
@@ -2087,14 +2087,20 @@ ZEND_VM_HANDLER(59, ZEND_INIT_FCALL_BY_NAME, ANY, CONST|TMP|VAR|CV)
|
||||
} else {
|
||||
function_name = GET_OP2_ZVAL_PTR(BP_VAR_R);
|
||||
|
||||
if (OP2_TYPE != IS_CONST &&
|
||||
if (OP2_TYPE != IS_CONST && OP2_TYPE != IS_TMP_VAR &&
|
||||
Z_TYPE_P(function_name) == IS_OBJECT &&
|
||||
Z_OBJ_HANDLER_P(function_name, get_closure) &&
|
||||
Z_OBJ_HANDLER_P(function_name, get_closure)(function_name, &EX(called_scope), &EX(fbc), &EX(object) TSRMLS_CC) == SUCCESS) {
|
||||
if (EX(object)) {
|
||||
Z_ADDREF_P(EX(object));
|
||||
}
|
||||
FREE_OP2();
|
||||
if (OP2_TYPE == IS_VAR && OP2_FREE &&
|
||||
EX(fbc)->common.fn_flags & ZEND_ACC_CLOSURE) {
|
||||
/* Delay closure destruction until its invocation */
|
||||
EX(fbc)->common.prototype = (zend_function*)function_name;
|
||||
} else {
|
||||
FREE_OP2();
|
||||
}
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
@@ -2159,6 +2165,10 @@ ZEND_VM_HELPER(zend_leave_helper, ANY, ANY)
|
||||
}
|
||||
}
|
||||
|
||||
if ((op_array->fn_flags & ZEND_ACC_CLOSURE) && op_array->prototype) {
|
||||
zval_ptr_dtor((zval**)&op_array->prototype);
|
||||
}
|
||||
|
||||
nested = EX(nested);
|
||||
|
||||
zend_vm_stack_free(execute_data TSRMLS_CC);
|
||||
@@ -2694,10 +2704,9 @@ ZEND_VM_HANDLER(67, ZEND_SEND_REF, VAR|CV, ANY)
|
||||
}
|
||||
|
||||
if (OP1_TYPE == IS_VAR && *varptr_ptr == EG(error_zval_ptr)) {
|
||||
Z_DELREF_PP(varptr_ptr);
|
||||
ALLOC_ZVAL(*varptr_ptr);
|
||||
INIT_ZVAL(**varptr_ptr);
|
||||
Z_SET_REFCOUNT_PP(varptr_ptr, 0);
|
||||
ALLOC_INIT_ZVAL(varptr);
|
||||
zend_vm_stack_push(varptr TSRMLS_CC);
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
if (EX(function_state).function->type == ZEND_INTERNAL_FUNCTION && !ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->op2.u.opline_num)) {
|
||||
@@ -3220,59 +3229,67 @@ ZEND_VM_HANDLER(73, ZEND_INCLUDE_OR_EVAL, CONST|TMP|VAR|CV, ANY)
|
||||
}
|
||||
|
||||
return_value_used = RETURN_VALUE_USED(opline);
|
||||
|
||||
if (Z_LVAL(opline->op2.u.constant) != ZEND_EVAL && strlen(Z_STRVAL_P(inc_filename)) != Z_STRLEN_P(inc_filename)) {
|
||||
if (Z_LVAL(opline->op2.u.constant)==ZEND_INCLUDE_ONCE || Z_LVAL(opline->op2.u.constant)==ZEND_INCLUDE) {
|
||||
zend_message_dispatcher(ZMSG_FAILED_INCLUDE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC);
|
||||
} else {
|
||||
zend_message_dispatcher(ZMSG_FAILED_REQUIRE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC);
|
||||
}
|
||||
} else {
|
||||
switch (Z_LVAL(opline->op2.u.constant)) {
|
||||
case ZEND_INCLUDE_ONCE:
|
||||
case ZEND_REQUIRE_ONCE: {
|
||||
zend_file_handle file_handle;
|
||||
char *resolved_path;
|
||||
|
||||
switch (Z_LVAL(opline->op2.u.constant)) {
|
||||
case ZEND_INCLUDE_ONCE:
|
||||
case ZEND_REQUIRE_ONCE: {
|
||||
zend_file_handle file_handle;
|
||||
char *resolved_path;
|
||||
|
||||
resolved_path = zend_resolve_path(Z_STRVAL_P(inc_filename), Z_STRLEN_P(inc_filename) TSRMLS_CC);
|
||||
if (resolved_path) {
|
||||
failure_retval = zend_hash_exists(&EG(included_files), resolved_path, strlen(resolved_path)+1);
|
||||
} else {
|
||||
resolved_path = Z_STRVAL_P(inc_filename);
|
||||
}
|
||||
|
||||
if (failure_retval) {
|
||||
/* do nothing, file already included */
|
||||
} else if (SUCCESS == zend_stream_open(resolved_path, &file_handle TSRMLS_CC)) {
|
||||
|
||||
if (!file_handle.opened_path) {
|
||||
file_handle.opened_path = estrdup(resolved_path);
|
||||
}
|
||||
|
||||
if (zend_hash_add_empty_element(&EG(included_files), file_handle.opened_path, strlen(file_handle.opened_path)+1)==SUCCESS) {
|
||||
new_op_array = zend_compile_file(&file_handle, (Z_LVAL(opline->op2.u.constant)==ZEND_INCLUDE_ONCE?ZEND_INCLUDE:ZEND_REQUIRE) TSRMLS_CC);
|
||||
zend_destroy_file_handle(&file_handle TSRMLS_CC);
|
||||
resolved_path = zend_resolve_path(Z_STRVAL_P(inc_filename), Z_STRLEN_P(inc_filename) TSRMLS_CC);
|
||||
if (resolved_path) {
|
||||
failure_retval = zend_hash_exists(&EG(included_files), resolved_path, strlen(resolved_path)+1);
|
||||
} else {
|
||||
zend_file_handle_dtor(&file_handle TSRMLS_CC);
|
||||
failure_retval=1;
|
||||
resolved_path = Z_STRVAL_P(inc_filename);
|
||||
}
|
||||
} else {
|
||||
if (Z_LVAL(opline->op2.u.constant)==ZEND_INCLUDE_ONCE) {
|
||||
zend_message_dispatcher(ZMSG_FAILED_INCLUDE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC);
|
||||
} else {
|
||||
zend_message_dispatcher(ZMSG_FAILED_REQUIRE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC);
|
||||
}
|
||||
}
|
||||
if (resolved_path != Z_STRVAL_P(inc_filename)) {
|
||||
efree(resolved_path);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case ZEND_INCLUDE:
|
||||
case ZEND_REQUIRE:
|
||||
new_op_array = compile_filename(Z_LVAL(opline->op2.u.constant), inc_filename TSRMLS_CC);
|
||||
break;
|
||||
case ZEND_EVAL: {
|
||||
char *eval_desc = zend_make_compiled_string_description("eval()'d code" TSRMLS_CC);
|
||||
|
||||
new_op_array = zend_compile_string(inc_filename, eval_desc TSRMLS_CC);
|
||||
efree(eval_desc);
|
||||
}
|
||||
break;
|
||||
EMPTY_SWITCH_DEFAULT_CASE()
|
||||
if (failure_retval) {
|
||||
/* do nothing, file already included */
|
||||
} else if (SUCCESS == zend_stream_open(resolved_path, &file_handle TSRMLS_CC)) {
|
||||
|
||||
if (!file_handle.opened_path) {
|
||||
file_handle.opened_path = estrdup(resolved_path);
|
||||
}
|
||||
|
||||
if (zend_hash_add_empty_element(&EG(included_files), file_handle.opened_path, strlen(file_handle.opened_path)+1)==SUCCESS) {
|
||||
new_op_array = zend_compile_file(&file_handle, (Z_LVAL(opline->op2.u.constant)==ZEND_INCLUDE_ONCE?ZEND_INCLUDE:ZEND_REQUIRE) TSRMLS_CC);
|
||||
zend_destroy_file_handle(&file_handle TSRMLS_CC);
|
||||
} else {
|
||||
zend_file_handle_dtor(&file_handle TSRMLS_CC);
|
||||
failure_retval=1;
|
||||
}
|
||||
} else {
|
||||
if (Z_LVAL(opline->op2.u.constant)==ZEND_INCLUDE_ONCE) {
|
||||
zend_message_dispatcher(ZMSG_FAILED_INCLUDE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC);
|
||||
} else {
|
||||
zend_message_dispatcher(ZMSG_FAILED_REQUIRE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC);
|
||||
}
|
||||
}
|
||||
if (resolved_path != Z_STRVAL_P(inc_filename)) {
|
||||
efree(resolved_path);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case ZEND_INCLUDE:
|
||||
case ZEND_REQUIRE:
|
||||
new_op_array = compile_filename(Z_LVAL(opline->op2.u.constant), inc_filename TSRMLS_CC);
|
||||
break;
|
||||
case ZEND_EVAL: {
|
||||
char *eval_desc = zend_make_compiled_string_description("eval()'d code" TSRMLS_CC);
|
||||
|
||||
new_op_array = zend_compile_string(inc_filename, eval_desc TSRMLS_CC);
|
||||
efree(eval_desc);
|
||||
}
|
||||
break;
|
||||
EMPTY_SWITCH_DEFAULT_CASE()
|
||||
}
|
||||
}
|
||||
if (inc_filename==&tmp_inc_filename) {
|
||||
zval_dtor(&tmp_inc_filename);
|
||||
@@ -3421,12 +3438,14 @@ ZEND_VM_HANDLER(75, ZEND_UNSET_DIM, VAR|UNUSED|CV, CONST|TMP|VAR|CV)
|
||||
zend_op *opline = EX(opline);
|
||||
zend_free_op free_op1, free_op2;
|
||||
zval **container = GET_OP1_OBJ_ZVAL_PTR_PTR(BP_VAR_UNSET);
|
||||
zval *offset = GET_OP2_ZVAL_PTR(BP_VAR_R);
|
||||
zval *offset;
|
||||
|
||||
if (OP1_TYPE == IS_CV && container != &EG(uninitialized_zval_ptr)) {
|
||||
SEPARATE_ZVAL_IF_NOT_REF(container);
|
||||
}
|
||||
offset = GET_OP2_ZVAL_PTR(BP_VAR_R);
|
||||
|
||||
if (OP1_TYPE != IS_VAR || container) {
|
||||
if (OP1_TYPE == IS_CV && container != &EG(uninitialized_zval_ptr)) {
|
||||
SEPARATE_ZVAL_IF_NOT_REF(container);
|
||||
}
|
||||
switch (Z_TYPE_PP(container)) {
|
||||
case IS_ARRAY: {
|
||||
HashTable *ht = Z_ARRVAL_PP(container);
|
||||
|
||||
+317
-279
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2011 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2010 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
@@ -163,6 +163,10 @@ static int ZEND_FASTCALL zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS)
|
||||
}
|
||||
}
|
||||
|
||||
if ((op_array->fn_flags & ZEND_ACC_CLOSURE) && op_array->prototype) {
|
||||
zval_ptr_dtor((zval**)&op_array->prototype);
|
||||
}
|
||||
|
||||
nested = EX(nested);
|
||||
|
||||
zend_vm_stack_free(execute_data TSRMLS_CC);
|
||||
@@ -750,14 +754,20 @@ static int ZEND_FASTCALL ZEND_INIT_FCALL_BY_NAME_SPEC_CONST_HANDLER(ZEND_OPCODE
|
||||
} else {
|
||||
function_name = &opline->op2.u.constant;
|
||||
|
||||
if (IS_CONST != IS_CONST &&
|
||||
if (IS_CONST != IS_CONST && IS_CONST != IS_TMP_VAR &&
|
||||
Z_TYPE_P(function_name) == IS_OBJECT &&
|
||||
Z_OBJ_HANDLER_P(function_name, get_closure) &&
|
||||
Z_OBJ_HANDLER_P(function_name, get_closure)(function_name, &EX(called_scope), &EX(fbc), &EX(object) TSRMLS_CC) == SUCCESS) {
|
||||
if (EX(object)) {
|
||||
Z_ADDREF_P(EX(object));
|
||||
}
|
||||
if (IS_CONST == IS_VAR && 0 &&
|
||||
EX(fbc)->common.fn_flags & ZEND_ACC_CLOSURE) {
|
||||
/* Delay closure destruction until its invocation */
|
||||
EX(fbc)->common.prototype = (zend_function*)function_name;
|
||||
} else {
|
||||
|
||||
}
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
@@ -944,14 +954,20 @@ static int ZEND_FASTCALL ZEND_INIT_FCALL_BY_NAME_SPEC_TMP_HANDLER(ZEND_OPCODE_H
|
||||
} else {
|
||||
function_name = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
|
||||
|
||||
if (IS_TMP_VAR != IS_CONST &&
|
||||
if (IS_TMP_VAR != IS_CONST && IS_TMP_VAR != IS_TMP_VAR &&
|
||||
Z_TYPE_P(function_name) == IS_OBJECT &&
|
||||
Z_OBJ_HANDLER_P(function_name, get_closure) &&
|
||||
Z_OBJ_HANDLER_P(function_name, get_closure)(function_name, &EX(called_scope), &EX(fbc), &EX(object) TSRMLS_CC) == SUCCESS) {
|
||||
if (EX(object)) {
|
||||
Z_ADDREF_P(EX(object));
|
||||
}
|
||||
zval_dtor(free_op2.var);
|
||||
if (IS_TMP_VAR == IS_VAR && 1 &&
|
||||
EX(fbc)->common.fn_flags & ZEND_ACC_CLOSURE) {
|
||||
/* Delay closure destruction until its invocation */
|
||||
EX(fbc)->common.prototype = (zend_function*)function_name;
|
||||
} else {
|
||||
zval_dtor(free_op2.var);
|
||||
}
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
@@ -1045,14 +1061,20 @@ static int ZEND_FASTCALL ZEND_INIT_FCALL_BY_NAME_SPEC_VAR_HANDLER(ZEND_OPCODE_H
|
||||
} else {
|
||||
function_name = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
|
||||
|
||||
if (IS_VAR != IS_CONST &&
|
||||
if (IS_VAR != IS_CONST && IS_VAR != IS_TMP_VAR &&
|
||||
Z_TYPE_P(function_name) == IS_OBJECT &&
|
||||
Z_OBJ_HANDLER_P(function_name, get_closure) &&
|
||||
Z_OBJ_HANDLER_P(function_name, get_closure)(function_name, &EX(called_scope), &EX(fbc), &EX(object) TSRMLS_CC) == SUCCESS) {
|
||||
if (EX(object)) {
|
||||
Z_ADDREF_P(EX(object));
|
||||
}
|
||||
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
|
||||
if (IS_VAR == IS_VAR && (free_op2.var != NULL) &&
|
||||
EX(fbc)->common.fn_flags & ZEND_ACC_CLOSURE) {
|
||||
/* Delay closure destruction until its invocation */
|
||||
EX(fbc)->common.prototype = (zend_function*)function_name;
|
||||
} else {
|
||||
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
|
||||
}
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
@@ -1169,14 +1191,20 @@ static int ZEND_FASTCALL ZEND_INIT_FCALL_BY_NAME_SPEC_CV_HANDLER(ZEND_OPCODE_HA
|
||||
} else {
|
||||
function_name = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC);
|
||||
|
||||
if (IS_CV != IS_CONST &&
|
||||
if (IS_CV != IS_CONST && IS_CV != IS_TMP_VAR &&
|
||||
Z_TYPE_P(function_name) == IS_OBJECT &&
|
||||
Z_OBJ_HANDLER_P(function_name, get_closure) &&
|
||||
Z_OBJ_HANDLER_P(function_name, get_closure)(function_name, &EX(called_scope), &EX(fbc), &EX(object) TSRMLS_CC) == SUCCESS) {
|
||||
if (EX(object)) {
|
||||
Z_ADDREF_P(EX(object));
|
||||
}
|
||||
if (IS_CV == IS_VAR && 0 &&
|
||||
EX(fbc)->common.fn_flags & ZEND_ACC_CLOSURE) {
|
||||
/* Delay closure destruction until its invocation */
|
||||
EX(fbc)->common.prototype = (zend_function*)function_name;
|
||||
} else {
|
||||
|
||||
}
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
@@ -1881,69 +1909,66 @@ static int ZEND_FASTCALL ZEND_INCLUDE_OR_EVAL_SPEC_CONST_HANDLER(ZEND_OPCODE_HA
|
||||
return_value_used = RETURN_VALUE_USED(opline);
|
||||
|
||||
if (Z_LVAL(opline->op2.u.constant) != ZEND_EVAL && strlen(Z_STRVAL_P(inc_filename)) != Z_STRLEN_P(inc_filename)) {
|
||||
if (Z_LVAL(opline->op2.u.constant)==ZEND_INCLUDE_ONCE ||
|
||||
Z_LVAL(opline->op2.u.constant)==ZEND_INCLUDE) {
|
||||
if (Z_LVAL(opline->op2.u.constant)==ZEND_INCLUDE_ONCE || Z_LVAL(opline->op2.u.constant)==ZEND_INCLUDE) {
|
||||
zend_message_dispatcher(ZMSG_FAILED_INCLUDE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC);
|
||||
} else {
|
||||
zend_message_dispatcher(ZMSG_FAILED_REQUIRE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC);
|
||||
}
|
||||
goto done;
|
||||
}
|
||||
} else {
|
||||
switch (Z_LVAL(opline->op2.u.constant)) {
|
||||
case ZEND_INCLUDE_ONCE:
|
||||
case ZEND_REQUIRE_ONCE: {
|
||||
zend_file_handle file_handle;
|
||||
char *resolved_path;
|
||||
|
||||
switch (Z_LVAL(opline->op2.u.constant)) {
|
||||
case ZEND_INCLUDE_ONCE:
|
||||
case ZEND_REQUIRE_ONCE: {
|
||||
zend_file_handle file_handle;
|
||||
char *resolved_path;
|
||||
|
||||
resolved_path = zend_resolve_path(Z_STRVAL_P(inc_filename), Z_STRLEN_P(inc_filename) TSRMLS_CC);
|
||||
if (resolved_path) {
|
||||
failure_retval = zend_hash_exists(&EG(included_files), resolved_path, strlen(resolved_path)+1);
|
||||
} else {
|
||||
resolved_path = Z_STRVAL_P(inc_filename);
|
||||
}
|
||||
|
||||
if (failure_retval) {
|
||||
/* do nothing, file already included */
|
||||
} else if (SUCCESS == zend_stream_open(resolved_path, &file_handle TSRMLS_CC)) {
|
||||
|
||||
if (!file_handle.opened_path) {
|
||||
file_handle.opened_path = estrdup(resolved_path);
|
||||
}
|
||||
|
||||
if (zend_hash_add_empty_element(&EG(included_files), file_handle.opened_path, strlen(file_handle.opened_path)+1)==SUCCESS) {
|
||||
new_op_array = zend_compile_file(&file_handle, (Z_LVAL(opline->op2.u.constant)==ZEND_INCLUDE_ONCE?ZEND_INCLUDE:ZEND_REQUIRE) TSRMLS_CC);
|
||||
zend_destroy_file_handle(&file_handle TSRMLS_CC);
|
||||
resolved_path = zend_resolve_path(Z_STRVAL_P(inc_filename), Z_STRLEN_P(inc_filename) TSRMLS_CC);
|
||||
if (resolved_path) {
|
||||
failure_retval = zend_hash_exists(&EG(included_files), resolved_path, strlen(resolved_path)+1);
|
||||
} else {
|
||||
zend_file_handle_dtor(&file_handle TSRMLS_CC);
|
||||
failure_retval=1;
|
||||
resolved_path = Z_STRVAL_P(inc_filename);
|
||||
}
|
||||
} else {
|
||||
if (Z_LVAL(opline->op2.u.constant)==ZEND_INCLUDE_ONCE) {
|
||||
zend_message_dispatcher(ZMSG_FAILED_INCLUDE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC);
|
||||
} else {
|
||||
zend_message_dispatcher(ZMSG_FAILED_REQUIRE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC);
|
||||
}
|
||||
}
|
||||
if (resolved_path != Z_STRVAL_P(inc_filename)) {
|
||||
efree(resolved_path);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case ZEND_INCLUDE:
|
||||
case ZEND_REQUIRE:
|
||||
new_op_array = compile_filename(Z_LVAL(opline->op2.u.constant), inc_filename TSRMLS_CC);
|
||||
break;
|
||||
case ZEND_EVAL: {
|
||||
char *eval_desc = zend_make_compiled_string_description("eval()'d code" TSRMLS_CC);
|
||||
|
||||
new_op_array = zend_compile_string(inc_filename, eval_desc TSRMLS_CC);
|
||||
efree(eval_desc);
|
||||
}
|
||||
break;
|
||||
EMPTY_SWITCH_DEFAULT_CASE()
|
||||
if (failure_retval) {
|
||||
/* do nothing, file already included */
|
||||
} else if (SUCCESS == zend_stream_open(resolved_path, &file_handle TSRMLS_CC)) {
|
||||
|
||||
if (!file_handle.opened_path) {
|
||||
file_handle.opened_path = estrdup(resolved_path);
|
||||
}
|
||||
|
||||
if (zend_hash_add_empty_element(&EG(included_files), file_handle.opened_path, strlen(file_handle.opened_path)+1)==SUCCESS) {
|
||||
new_op_array = zend_compile_file(&file_handle, (Z_LVAL(opline->op2.u.constant)==ZEND_INCLUDE_ONCE?ZEND_INCLUDE:ZEND_REQUIRE) TSRMLS_CC);
|
||||
zend_destroy_file_handle(&file_handle TSRMLS_CC);
|
||||
} else {
|
||||
zend_file_handle_dtor(&file_handle TSRMLS_CC);
|
||||
failure_retval=1;
|
||||
}
|
||||
} else {
|
||||
if (Z_LVAL(opline->op2.u.constant)==ZEND_INCLUDE_ONCE) {
|
||||
zend_message_dispatcher(ZMSG_FAILED_INCLUDE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC);
|
||||
} else {
|
||||
zend_message_dispatcher(ZMSG_FAILED_REQUIRE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC);
|
||||
}
|
||||
}
|
||||
if (resolved_path != Z_STRVAL_P(inc_filename)) {
|
||||
efree(resolved_path);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case ZEND_INCLUDE:
|
||||
case ZEND_REQUIRE:
|
||||
new_op_array = compile_filename(Z_LVAL(opline->op2.u.constant), inc_filename TSRMLS_CC);
|
||||
break;
|
||||
case ZEND_EVAL: {
|
||||
char *eval_desc = zend_make_compiled_string_description("eval()'d code" TSRMLS_CC);
|
||||
|
||||
new_op_array = zend_compile_string(inc_filename, eval_desc TSRMLS_CC);
|
||||
efree(eval_desc);
|
||||
}
|
||||
break;
|
||||
EMPTY_SWITCH_DEFAULT_CASE()
|
||||
}
|
||||
}
|
||||
done:
|
||||
if (inc_filename==&tmp_inc_filename) {
|
||||
zval_dtor(&tmp_inc_filename);
|
||||
}
|
||||
@@ -5166,69 +5191,66 @@ static int ZEND_FASTCALL ZEND_INCLUDE_OR_EVAL_SPEC_TMP_HANDLER(ZEND_OPCODE_HAND
|
||||
return_value_used = RETURN_VALUE_USED(opline);
|
||||
|
||||
if (Z_LVAL(opline->op2.u.constant) != ZEND_EVAL && strlen(Z_STRVAL_P(inc_filename)) != Z_STRLEN_P(inc_filename)) {
|
||||
if (Z_LVAL(opline->op2.u.constant)==ZEND_INCLUDE_ONCE ||
|
||||
Z_LVAL(opline->op2.u.constant)==ZEND_INCLUDE) {
|
||||
if (Z_LVAL(opline->op2.u.constant)==ZEND_INCLUDE_ONCE || Z_LVAL(opline->op2.u.constant)==ZEND_INCLUDE) {
|
||||
zend_message_dispatcher(ZMSG_FAILED_INCLUDE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC);
|
||||
} else {
|
||||
zend_message_dispatcher(ZMSG_FAILED_REQUIRE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC);
|
||||
}
|
||||
goto done;
|
||||
}
|
||||
} else {
|
||||
switch (Z_LVAL(opline->op2.u.constant)) {
|
||||
case ZEND_INCLUDE_ONCE:
|
||||
case ZEND_REQUIRE_ONCE: {
|
||||
zend_file_handle file_handle;
|
||||
char *resolved_path;
|
||||
|
||||
switch (Z_LVAL(opline->op2.u.constant)) {
|
||||
case ZEND_INCLUDE_ONCE:
|
||||
case ZEND_REQUIRE_ONCE: {
|
||||
zend_file_handle file_handle;
|
||||
char *resolved_path;
|
||||
|
||||
resolved_path = zend_resolve_path(Z_STRVAL_P(inc_filename), Z_STRLEN_P(inc_filename) TSRMLS_CC);
|
||||
if (resolved_path) {
|
||||
failure_retval = zend_hash_exists(&EG(included_files), resolved_path, strlen(resolved_path)+1);
|
||||
} else {
|
||||
resolved_path = Z_STRVAL_P(inc_filename);
|
||||
}
|
||||
|
||||
if (failure_retval) {
|
||||
/* do nothing, file already included */
|
||||
} else if (SUCCESS == zend_stream_open(resolved_path, &file_handle TSRMLS_CC)) {
|
||||
|
||||
if (!file_handle.opened_path) {
|
||||
file_handle.opened_path = estrdup(resolved_path);
|
||||
}
|
||||
|
||||
if (zend_hash_add_empty_element(&EG(included_files), file_handle.opened_path, strlen(file_handle.opened_path)+1)==SUCCESS) {
|
||||
new_op_array = zend_compile_file(&file_handle, (Z_LVAL(opline->op2.u.constant)==ZEND_INCLUDE_ONCE?ZEND_INCLUDE:ZEND_REQUIRE) TSRMLS_CC);
|
||||
zend_destroy_file_handle(&file_handle TSRMLS_CC);
|
||||
resolved_path = zend_resolve_path(Z_STRVAL_P(inc_filename), Z_STRLEN_P(inc_filename) TSRMLS_CC);
|
||||
if (resolved_path) {
|
||||
failure_retval = zend_hash_exists(&EG(included_files), resolved_path, strlen(resolved_path)+1);
|
||||
} else {
|
||||
zend_file_handle_dtor(&file_handle TSRMLS_CC);
|
||||
failure_retval=1;
|
||||
resolved_path = Z_STRVAL_P(inc_filename);
|
||||
}
|
||||
} else {
|
||||
if (Z_LVAL(opline->op2.u.constant)==ZEND_INCLUDE_ONCE) {
|
||||
zend_message_dispatcher(ZMSG_FAILED_INCLUDE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC);
|
||||
} else {
|
||||
zend_message_dispatcher(ZMSG_FAILED_REQUIRE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC);
|
||||
}
|
||||
}
|
||||
if (resolved_path != Z_STRVAL_P(inc_filename)) {
|
||||
efree(resolved_path);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case ZEND_INCLUDE:
|
||||
case ZEND_REQUIRE:
|
||||
new_op_array = compile_filename(Z_LVAL(opline->op2.u.constant), inc_filename TSRMLS_CC);
|
||||
break;
|
||||
case ZEND_EVAL: {
|
||||
char *eval_desc = zend_make_compiled_string_description("eval()'d code" TSRMLS_CC);
|
||||
|
||||
new_op_array = zend_compile_string(inc_filename, eval_desc TSRMLS_CC);
|
||||
efree(eval_desc);
|
||||
}
|
||||
break;
|
||||
EMPTY_SWITCH_DEFAULT_CASE()
|
||||
if (failure_retval) {
|
||||
/* do nothing, file already included */
|
||||
} else if (SUCCESS == zend_stream_open(resolved_path, &file_handle TSRMLS_CC)) {
|
||||
|
||||
if (!file_handle.opened_path) {
|
||||
file_handle.opened_path = estrdup(resolved_path);
|
||||
}
|
||||
|
||||
if (zend_hash_add_empty_element(&EG(included_files), file_handle.opened_path, strlen(file_handle.opened_path)+1)==SUCCESS) {
|
||||
new_op_array = zend_compile_file(&file_handle, (Z_LVAL(opline->op2.u.constant)==ZEND_INCLUDE_ONCE?ZEND_INCLUDE:ZEND_REQUIRE) TSRMLS_CC);
|
||||
zend_destroy_file_handle(&file_handle TSRMLS_CC);
|
||||
} else {
|
||||
zend_file_handle_dtor(&file_handle TSRMLS_CC);
|
||||
failure_retval=1;
|
||||
}
|
||||
} else {
|
||||
if (Z_LVAL(opline->op2.u.constant)==ZEND_INCLUDE_ONCE) {
|
||||
zend_message_dispatcher(ZMSG_FAILED_INCLUDE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC);
|
||||
} else {
|
||||
zend_message_dispatcher(ZMSG_FAILED_REQUIRE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC);
|
||||
}
|
||||
}
|
||||
if (resolved_path != Z_STRVAL_P(inc_filename)) {
|
||||
efree(resolved_path);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case ZEND_INCLUDE:
|
||||
case ZEND_REQUIRE:
|
||||
new_op_array = compile_filename(Z_LVAL(opline->op2.u.constant), inc_filename TSRMLS_CC);
|
||||
break;
|
||||
case ZEND_EVAL: {
|
||||
char *eval_desc = zend_make_compiled_string_description("eval()'d code" TSRMLS_CC);
|
||||
|
||||
new_op_array = zend_compile_string(inc_filename, eval_desc TSRMLS_CC);
|
||||
efree(eval_desc);
|
||||
}
|
||||
break;
|
||||
EMPTY_SWITCH_DEFAULT_CASE()
|
||||
}
|
||||
}
|
||||
done:
|
||||
if (inc_filename==&tmp_inc_filename) {
|
||||
zval_dtor(&tmp_inc_filename);
|
||||
}
|
||||
@@ -8364,10 +8386,9 @@ static int ZEND_FASTCALL ZEND_SEND_REF_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARG
|
||||
}
|
||||
|
||||
if (IS_VAR == IS_VAR && *varptr_ptr == EG(error_zval_ptr)) {
|
||||
Z_DELREF_PP(varptr_ptr);
|
||||
ALLOC_ZVAL(*varptr_ptr);
|
||||
INIT_ZVAL(**varptr_ptr);
|
||||
Z_SET_REFCOUNT_PP(varptr_ptr, 0);
|
||||
ALLOC_INIT_ZVAL(varptr);
|
||||
zend_vm_stack_push(varptr TSRMLS_CC);
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
if (EX(function_state).function->type == ZEND_INTERNAL_FUNCTION && !ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->op2.u.opline_num)) {
|
||||
@@ -8547,69 +8568,66 @@ static int ZEND_FASTCALL ZEND_INCLUDE_OR_EVAL_SPEC_VAR_HANDLER(ZEND_OPCODE_HAND
|
||||
return_value_used = RETURN_VALUE_USED(opline);
|
||||
|
||||
if (Z_LVAL(opline->op2.u.constant) != ZEND_EVAL && strlen(Z_STRVAL_P(inc_filename)) != Z_STRLEN_P(inc_filename)) {
|
||||
if (Z_LVAL(opline->op2.u.constant)==ZEND_INCLUDE_ONCE ||
|
||||
Z_LVAL(opline->op2.u.constant)==ZEND_INCLUDE) {
|
||||
if (Z_LVAL(opline->op2.u.constant)==ZEND_INCLUDE_ONCE || Z_LVAL(opline->op2.u.constant)==ZEND_INCLUDE) {
|
||||
zend_message_dispatcher(ZMSG_FAILED_INCLUDE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC);
|
||||
} else {
|
||||
zend_message_dispatcher(ZMSG_FAILED_REQUIRE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC);
|
||||
}
|
||||
goto done;
|
||||
}
|
||||
} else {
|
||||
switch (Z_LVAL(opline->op2.u.constant)) {
|
||||
case ZEND_INCLUDE_ONCE:
|
||||
case ZEND_REQUIRE_ONCE: {
|
||||
zend_file_handle file_handle;
|
||||
char *resolved_path;
|
||||
|
||||
switch (Z_LVAL(opline->op2.u.constant)) {
|
||||
case ZEND_INCLUDE_ONCE:
|
||||
case ZEND_REQUIRE_ONCE: {
|
||||
zend_file_handle file_handle;
|
||||
char *resolved_path;
|
||||
|
||||
resolved_path = zend_resolve_path(Z_STRVAL_P(inc_filename), Z_STRLEN_P(inc_filename) TSRMLS_CC);
|
||||
if (resolved_path) {
|
||||
failure_retval = zend_hash_exists(&EG(included_files), resolved_path, strlen(resolved_path)+1);
|
||||
} else {
|
||||
resolved_path = Z_STRVAL_P(inc_filename);
|
||||
}
|
||||
|
||||
if (failure_retval) {
|
||||
/* do nothing, file already included */
|
||||
} else if (SUCCESS == zend_stream_open(resolved_path, &file_handle TSRMLS_CC)) {
|
||||
|
||||
if (!file_handle.opened_path) {
|
||||
file_handle.opened_path = estrdup(resolved_path);
|
||||
}
|
||||
|
||||
if (zend_hash_add_empty_element(&EG(included_files), file_handle.opened_path, strlen(file_handle.opened_path)+1)==SUCCESS) {
|
||||
new_op_array = zend_compile_file(&file_handle, (Z_LVAL(opline->op2.u.constant)==ZEND_INCLUDE_ONCE?ZEND_INCLUDE:ZEND_REQUIRE) TSRMLS_CC);
|
||||
zend_destroy_file_handle(&file_handle TSRMLS_CC);
|
||||
resolved_path = zend_resolve_path(Z_STRVAL_P(inc_filename), Z_STRLEN_P(inc_filename) TSRMLS_CC);
|
||||
if (resolved_path) {
|
||||
failure_retval = zend_hash_exists(&EG(included_files), resolved_path, strlen(resolved_path)+1);
|
||||
} else {
|
||||
zend_file_handle_dtor(&file_handle TSRMLS_CC);
|
||||
failure_retval=1;
|
||||
resolved_path = Z_STRVAL_P(inc_filename);
|
||||
}
|
||||
} else {
|
||||
if (Z_LVAL(opline->op2.u.constant)==ZEND_INCLUDE_ONCE) {
|
||||
zend_message_dispatcher(ZMSG_FAILED_INCLUDE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC);
|
||||
} else {
|
||||
zend_message_dispatcher(ZMSG_FAILED_REQUIRE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC);
|
||||
}
|
||||
}
|
||||
if (resolved_path != Z_STRVAL_P(inc_filename)) {
|
||||
efree(resolved_path);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case ZEND_INCLUDE:
|
||||
case ZEND_REQUIRE:
|
||||
new_op_array = compile_filename(Z_LVAL(opline->op2.u.constant), inc_filename TSRMLS_CC);
|
||||
break;
|
||||
case ZEND_EVAL: {
|
||||
char *eval_desc = zend_make_compiled_string_description("eval()'d code" TSRMLS_CC);
|
||||
|
||||
new_op_array = zend_compile_string(inc_filename, eval_desc TSRMLS_CC);
|
||||
efree(eval_desc);
|
||||
}
|
||||
break;
|
||||
EMPTY_SWITCH_DEFAULT_CASE()
|
||||
if (failure_retval) {
|
||||
/* do nothing, file already included */
|
||||
} else if (SUCCESS == zend_stream_open(resolved_path, &file_handle TSRMLS_CC)) {
|
||||
|
||||
if (!file_handle.opened_path) {
|
||||
file_handle.opened_path = estrdup(resolved_path);
|
||||
}
|
||||
|
||||
if (zend_hash_add_empty_element(&EG(included_files), file_handle.opened_path, strlen(file_handle.opened_path)+1)==SUCCESS) {
|
||||
new_op_array = zend_compile_file(&file_handle, (Z_LVAL(opline->op2.u.constant)==ZEND_INCLUDE_ONCE?ZEND_INCLUDE:ZEND_REQUIRE) TSRMLS_CC);
|
||||
zend_destroy_file_handle(&file_handle TSRMLS_CC);
|
||||
} else {
|
||||
zend_file_handle_dtor(&file_handle TSRMLS_CC);
|
||||
failure_retval=1;
|
||||
}
|
||||
} else {
|
||||
if (Z_LVAL(opline->op2.u.constant)==ZEND_INCLUDE_ONCE) {
|
||||
zend_message_dispatcher(ZMSG_FAILED_INCLUDE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC);
|
||||
} else {
|
||||
zend_message_dispatcher(ZMSG_FAILED_REQUIRE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC);
|
||||
}
|
||||
}
|
||||
if (resolved_path != Z_STRVAL_P(inc_filename)) {
|
||||
efree(resolved_path);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case ZEND_INCLUDE:
|
||||
case ZEND_REQUIRE:
|
||||
new_op_array = compile_filename(Z_LVAL(opline->op2.u.constant), inc_filename TSRMLS_CC);
|
||||
break;
|
||||
case ZEND_EVAL: {
|
||||
char *eval_desc = zend_make_compiled_string_description("eval()'d code" TSRMLS_CC);
|
||||
|
||||
new_op_array = zend_compile_string(inc_filename, eval_desc TSRMLS_CC);
|
||||
efree(eval_desc);
|
||||
}
|
||||
break;
|
||||
EMPTY_SWITCH_DEFAULT_CASE()
|
||||
}
|
||||
}
|
||||
done:
|
||||
if (inc_filename==&tmp_inc_filename) {
|
||||
zval_dtor(&tmp_inc_filename);
|
||||
}
|
||||
@@ -10731,12 +10749,14 @@ static int ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HAND
|
||||
zend_op *opline = EX(opline);
|
||||
zend_free_op free_op1;
|
||||
zval **container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
|
||||
zval *offset = &opline->op2.u.constant;
|
||||
zval *offset;
|
||||
|
||||
if (IS_VAR == IS_CV && container != &EG(uninitialized_zval_ptr)) {
|
||||
SEPARATE_ZVAL_IF_NOT_REF(container);
|
||||
}
|
||||
offset = &opline->op2.u.constant;
|
||||
|
||||
if (IS_VAR != IS_VAR || container) {
|
||||
if (IS_VAR == IS_CV && container != &EG(uninitialized_zval_ptr)) {
|
||||
SEPARATE_ZVAL_IF_NOT_REF(container);
|
||||
}
|
||||
switch (Z_TYPE_PP(container)) {
|
||||
case IS_ARRAY: {
|
||||
HashTable *ht = Z_ARRVAL_PP(container);
|
||||
@@ -12480,12 +12500,14 @@ static int ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLE
|
||||
zend_op *opline = EX(opline);
|
||||
zend_free_op free_op1, free_op2;
|
||||
zval **container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
|
||||
zval *offset = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
|
||||
zval *offset;
|
||||
|
||||
if (IS_VAR == IS_CV && container != &EG(uninitialized_zval_ptr)) {
|
||||
SEPARATE_ZVAL_IF_NOT_REF(container);
|
||||
}
|
||||
offset = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
|
||||
|
||||
if (IS_VAR != IS_VAR || container) {
|
||||
if (IS_VAR == IS_CV && container != &EG(uninitialized_zval_ptr)) {
|
||||
SEPARATE_ZVAL_IF_NOT_REF(container);
|
||||
}
|
||||
switch (Z_TYPE_PP(container)) {
|
||||
case IS_ARRAY: {
|
||||
HashTable *ht = Z_ARRVAL_PP(container);
|
||||
@@ -14280,12 +14302,14 @@ static int ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLE
|
||||
zend_op *opline = EX(opline);
|
||||
zend_free_op free_op1, free_op2;
|
||||
zval **container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
|
||||
zval *offset = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
|
||||
zval *offset;
|
||||
|
||||
if (IS_VAR == IS_CV && container != &EG(uninitialized_zval_ptr)) {
|
||||
SEPARATE_ZVAL_IF_NOT_REF(container);
|
||||
}
|
||||
offset = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
|
||||
|
||||
if (IS_VAR != IS_VAR || container) {
|
||||
if (IS_VAR == IS_CV && container != &EG(uninitialized_zval_ptr)) {
|
||||
SEPARATE_ZVAL_IF_NOT_REF(container);
|
||||
}
|
||||
switch (Z_TYPE_PP(container)) {
|
||||
case IS_ARRAY: {
|
||||
HashTable *ht = Z_ARRVAL_PP(container);
|
||||
@@ -16666,12 +16690,14 @@ static int ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER
|
||||
zend_op *opline = EX(opline);
|
||||
zend_free_op free_op1;
|
||||
zval **container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
|
||||
zval *offset = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC);
|
||||
zval *offset;
|
||||
|
||||
if (IS_VAR == IS_CV && container != &EG(uninitialized_zval_ptr)) {
|
||||
SEPARATE_ZVAL_IF_NOT_REF(container);
|
||||
}
|
||||
offset = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC);
|
||||
|
||||
if (IS_VAR != IS_VAR || container) {
|
||||
if (IS_VAR == IS_CV && container != &EG(uninitialized_zval_ptr)) {
|
||||
SEPARATE_ZVAL_IF_NOT_REF(container);
|
||||
}
|
||||
switch (Z_TYPE_PP(container)) {
|
||||
case IS_ARRAY: {
|
||||
HashTable *ht = Z_ARRVAL_PP(container);
|
||||
@@ -17858,12 +17884,14 @@ static int ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_H
|
||||
zend_op *opline = EX(opline);
|
||||
|
||||
zval **container = _get_obj_zval_ptr_ptr_unused(TSRMLS_C);
|
||||
zval *offset = &opline->op2.u.constant;
|
||||
zval *offset;
|
||||
|
||||
if (IS_UNUSED == IS_CV && container != &EG(uninitialized_zval_ptr)) {
|
||||
SEPARATE_ZVAL_IF_NOT_REF(container);
|
||||
}
|
||||
offset = &opline->op2.u.constant;
|
||||
|
||||
if (IS_UNUSED != IS_VAR || container) {
|
||||
if (IS_UNUSED == IS_CV && container != &EG(uninitialized_zval_ptr)) {
|
||||
SEPARATE_ZVAL_IF_NOT_REF(container);
|
||||
}
|
||||
switch (Z_TYPE_PP(container)) {
|
||||
case IS_ARRAY: {
|
||||
HashTable *ht = Z_ARRVAL_PP(container);
|
||||
@@ -18915,12 +18943,14 @@ static int ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_UNUSED_TMP_HANDLER(ZEND_OPCODE_HAN
|
||||
zend_op *opline = EX(opline);
|
||||
zend_free_op free_op2;
|
||||
zval **container = _get_obj_zval_ptr_ptr_unused(TSRMLS_C);
|
||||
zval *offset = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
|
||||
zval *offset;
|
||||
|
||||
if (IS_UNUSED == IS_CV && container != &EG(uninitialized_zval_ptr)) {
|
||||
SEPARATE_ZVAL_IF_NOT_REF(container);
|
||||
}
|
||||
offset = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
|
||||
|
||||
if (IS_UNUSED != IS_VAR || container) {
|
||||
if (IS_UNUSED == IS_CV && container != &EG(uninitialized_zval_ptr)) {
|
||||
SEPARATE_ZVAL_IF_NOT_REF(container);
|
||||
}
|
||||
switch (Z_TYPE_PP(container)) {
|
||||
case IS_ARRAY: {
|
||||
HashTable *ht = Z_ARRVAL_PP(container);
|
||||
@@ -19972,12 +20002,14 @@ static int ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_UNUSED_VAR_HANDLER(ZEND_OPCODE_HAN
|
||||
zend_op *opline = EX(opline);
|
||||
zend_free_op free_op2;
|
||||
zval **container = _get_obj_zval_ptr_ptr_unused(TSRMLS_C);
|
||||
zval *offset = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
|
||||
zval *offset;
|
||||
|
||||
if (IS_UNUSED == IS_CV && container != &EG(uninitialized_zval_ptr)) {
|
||||
SEPARATE_ZVAL_IF_NOT_REF(container);
|
||||
}
|
||||
offset = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
|
||||
|
||||
if (IS_UNUSED != IS_VAR || container) {
|
||||
if (IS_UNUSED == IS_CV && container != &EG(uninitialized_zval_ptr)) {
|
||||
SEPARATE_ZVAL_IF_NOT_REF(container);
|
||||
}
|
||||
switch (Z_TYPE_PP(container)) {
|
||||
case IS_ARRAY: {
|
||||
HashTable *ht = Z_ARRVAL_PP(container);
|
||||
@@ -21288,12 +21320,14 @@ static int ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HAND
|
||||
zend_op *opline = EX(opline);
|
||||
|
||||
zval **container = _get_obj_zval_ptr_ptr_unused(TSRMLS_C);
|
||||
zval *offset = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC);
|
||||
zval *offset;
|
||||
|
||||
if (IS_UNUSED == IS_CV && container != &EG(uninitialized_zval_ptr)) {
|
||||
SEPARATE_ZVAL_IF_NOT_REF(container);
|
||||
}
|
||||
offset = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC);
|
||||
|
||||
if (IS_UNUSED != IS_VAR || container) {
|
||||
if (IS_UNUSED == IS_CV && container != &EG(uninitialized_zval_ptr)) {
|
||||
SEPARATE_ZVAL_IF_NOT_REF(container);
|
||||
}
|
||||
switch (Z_TYPE_PP(container)) {
|
||||
case IS_ARRAY: {
|
||||
HashTable *ht = Z_ARRVAL_PP(container);
|
||||
@@ -22248,10 +22282,9 @@ static int ZEND_FASTCALL ZEND_SEND_REF_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS
|
||||
}
|
||||
|
||||
if (IS_CV == IS_VAR && *varptr_ptr == EG(error_zval_ptr)) {
|
||||
Z_DELREF_PP(varptr_ptr);
|
||||
ALLOC_ZVAL(*varptr_ptr);
|
||||
INIT_ZVAL(**varptr_ptr);
|
||||
Z_SET_REFCOUNT_PP(varptr_ptr, 0);
|
||||
ALLOC_INIT_ZVAL(varptr);
|
||||
zend_vm_stack_push(varptr TSRMLS_CC);
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
if (EX(function_state).function->type == ZEND_INTERNAL_FUNCTION && !ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->op2.u.opline_num)) {
|
||||
@@ -22421,69 +22454,66 @@ static int ZEND_FASTCALL ZEND_INCLUDE_OR_EVAL_SPEC_CV_HANDLER(ZEND_OPCODE_HANDL
|
||||
return_value_used = RETURN_VALUE_USED(opline);
|
||||
|
||||
if (Z_LVAL(opline->op2.u.constant) != ZEND_EVAL && strlen(Z_STRVAL_P(inc_filename)) != Z_STRLEN_P(inc_filename)) {
|
||||
if (Z_LVAL(opline->op2.u.constant)==ZEND_INCLUDE_ONCE ||
|
||||
Z_LVAL(opline->op2.u.constant)==ZEND_INCLUDE) {
|
||||
if (Z_LVAL(opline->op2.u.constant)==ZEND_INCLUDE_ONCE || Z_LVAL(opline->op2.u.constant)==ZEND_INCLUDE) {
|
||||
zend_message_dispatcher(ZMSG_FAILED_INCLUDE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC);
|
||||
} else {
|
||||
zend_message_dispatcher(ZMSG_FAILED_REQUIRE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC);
|
||||
}
|
||||
goto done;
|
||||
}
|
||||
} else {
|
||||
switch (Z_LVAL(opline->op2.u.constant)) {
|
||||
case ZEND_INCLUDE_ONCE:
|
||||
case ZEND_REQUIRE_ONCE: {
|
||||
zend_file_handle file_handle;
|
||||
char *resolved_path;
|
||||
|
||||
switch (Z_LVAL(opline->op2.u.constant)) {
|
||||
case ZEND_INCLUDE_ONCE:
|
||||
case ZEND_REQUIRE_ONCE: {
|
||||
zend_file_handle file_handle;
|
||||
char *resolved_path;
|
||||
|
||||
resolved_path = zend_resolve_path(Z_STRVAL_P(inc_filename), Z_STRLEN_P(inc_filename) TSRMLS_CC);
|
||||
if (resolved_path) {
|
||||
failure_retval = zend_hash_exists(&EG(included_files), resolved_path, strlen(resolved_path)+1);
|
||||
} else {
|
||||
resolved_path = Z_STRVAL_P(inc_filename);
|
||||
}
|
||||
|
||||
if (failure_retval) {
|
||||
/* do nothing, file already included */
|
||||
} else if (SUCCESS == zend_stream_open(resolved_path, &file_handle TSRMLS_CC)) {
|
||||
|
||||
if (!file_handle.opened_path) {
|
||||
file_handle.opened_path = estrdup(resolved_path);
|
||||
}
|
||||
|
||||
if (zend_hash_add_empty_element(&EG(included_files), file_handle.opened_path, strlen(file_handle.opened_path)+1)==SUCCESS) {
|
||||
new_op_array = zend_compile_file(&file_handle, (Z_LVAL(opline->op2.u.constant)==ZEND_INCLUDE_ONCE?ZEND_INCLUDE:ZEND_REQUIRE) TSRMLS_CC);
|
||||
zend_destroy_file_handle(&file_handle TSRMLS_CC);
|
||||
resolved_path = zend_resolve_path(Z_STRVAL_P(inc_filename), Z_STRLEN_P(inc_filename) TSRMLS_CC);
|
||||
if (resolved_path) {
|
||||
failure_retval = zend_hash_exists(&EG(included_files), resolved_path, strlen(resolved_path)+1);
|
||||
} else {
|
||||
zend_file_handle_dtor(&file_handle TSRMLS_CC);
|
||||
failure_retval=1;
|
||||
resolved_path = Z_STRVAL_P(inc_filename);
|
||||
}
|
||||
} else {
|
||||
if (Z_LVAL(opline->op2.u.constant)==ZEND_INCLUDE_ONCE) {
|
||||
zend_message_dispatcher(ZMSG_FAILED_INCLUDE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC);
|
||||
} else {
|
||||
zend_message_dispatcher(ZMSG_FAILED_REQUIRE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC);
|
||||
}
|
||||
}
|
||||
if (resolved_path != Z_STRVAL_P(inc_filename)) {
|
||||
efree(resolved_path);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case ZEND_INCLUDE:
|
||||
case ZEND_REQUIRE:
|
||||
new_op_array = compile_filename(Z_LVAL(opline->op2.u.constant), inc_filename TSRMLS_CC);
|
||||
break;
|
||||
case ZEND_EVAL: {
|
||||
char *eval_desc = zend_make_compiled_string_description("eval()'d code" TSRMLS_CC);
|
||||
|
||||
new_op_array = zend_compile_string(inc_filename, eval_desc TSRMLS_CC);
|
||||
efree(eval_desc);
|
||||
}
|
||||
break;
|
||||
EMPTY_SWITCH_DEFAULT_CASE()
|
||||
if (failure_retval) {
|
||||
/* do nothing, file already included */
|
||||
} else if (SUCCESS == zend_stream_open(resolved_path, &file_handle TSRMLS_CC)) {
|
||||
|
||||
if (!file_handle.opened_path) {
|
||||
file_handle.opened_path = estrdup(resolved_path);
|
||||
}
|
||||
|
||||
if (zend_hash_add_empty_element(&EG(included_files), file_handle.opened_path, strlen(file_handle.opened_path)+1)==SUCCESS) {
|
||||
new_op_array = zend_compile_file(&file_handle, (Z_LVAL(opline->op2.u.constant)==ZEND_INCLUDE_ONCE?ZEND_INCLUDE:ZEND_REQUIRE) TSRMLS_CC);
|
||||
zend_destroy_file_handle(&file_handle TSRMLS_CC);
|
||||
} else {
|
||||
zend_file_handle_dtor(&file_handle TSRMLS_CC);
|
||||
failure_retval=1;
|
||||
}
|
||||
} else {
|
||||
if (Z_LVAL(opline->op2.u.constant)==ZEND_INCLUDE_ONCE) {
|
||||
zend_message_dispatcher(ZMSG_FAILED_INCLUDE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC);
|
||||
} else {
|
||||
zend_message_dispatcher(ZMSG_FAILED_REQUIRE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC);
|
||||
}
|
||||
}
|
||||
if (resolved_path != Z_STRVAL_P(inc_filename)) {
|
||||
efree(resolved_path);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case ZEND_INCLUDE:
|
||||
case ZEND_REQUIRE:
|
||||
new_op_array = compile_filename(Z_LVAL(opline->op2.u.constant), inc_filename TSRMLS_CC);
|
||||
break;
|
||||
case ZEND_EVAL: {
|
||||
char *eval_desc = zend_make_compiled_string_description("eval()'d code" TSRMLS_CC);
|
||||
|
||||
new_op_array = zend_compile_string(inc_filename, eval_desc TSRMLS_CC);
|
||||
efree(eval_desc);
|
||||
}
|
||||
break;
|
||||
EMPTY_SWITCH_DEFAULT_CASE()
|
||||
}
|
||||
}
|
||||
done:
|
||||
if (inc_filename==&tmp_inc_filename) {
|
||||
zval_dtor(&tmp_inc_filename);
|
||||
}
|
||||
@@ -24298,12 +24328,14 @@ static int ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDL
|
||||
zend_op *opline = EX(opline);
|
||||
|
||||
zval **container = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_UNSET TSRMLS_CC);
|
||||
zval *offset = &opline->op2.u.constant;
|
||||
zval *offset;
|
||||
|
||||
if (IS_CV == IS_CV && container != &EG(uninitialized_zval_ptr)) {
|
||||
SEPARATE_ZVAL_IF_NOT_REF(container);
|
||||
}
|
||||
offset = &opline->op2.u.constant;
|
||||
|
||||
if (IS_CV != IS_VAR || container) {
|
||||
if (IS_CV == IS_CV && container != &EG(uninitialized_zval_ptr)) {
|
||||
SEPARATE_ZVAL_IF_NOT_REF(container);
|
||||
}
|
||||
switch (Z_TYPE_PP(container)) {
|
||||
case IS_ARRAY: {
|
||||
HashTable *ht = Z_ARRVAL_PP(container);
|
||||
@@ -25938,12 +25970,14 @@ static int ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLER
|
||||
zend_op *opline = EX(opline);
|
||||
zend_free_op free_op2;
|
||||
zval **container = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_UNSET TSRMLS_CC);
|
||||
zval *offset = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
|
||||
zval *offset;
|
||||
|
||||
if (IS_CV == IS_CV && container != &EG(uninitialized_zval_ptr)) {
|
||||
SEPARATE_ZVAL_IF_NOT_REF(container);
|
||||
}
|
||||
offset = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
|
||||
|
||||
if (IS_CV != IS_VAR || container) {
|
||||
if (IS_CV == IS_CV && container != &EG(uninitialized_zval_ptr)) {
|
||||
SEPARATE_ZVAL_IF_NOT_REF(container);
|
||||
}
|
||||
switch (Z_TYPE_PP(container)) {
|
||||
case IS_ARRAY: {
|
||||
HashTable *ht = Z_ARRVAL_PP(container);
|
||||
@@ -27628,12 +27662,14 @@ static int ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER
|
||||
zend_op *opline = EX(opline);
|
||||
zend_free_op free_op2;
|
||||
zval **container = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_UNSET TSRMLS_CC);
|
||||
zval *offset = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
|
||||
zval *offset;
|
||||
|
||||
if (IS_CV == IS_CV && container != &EG(uninitialized_zval_ptr)) {
|
||||
SEPARATE_ZVAL_IF_NOT_REF(container);
|
||||
}
|
||||
offset = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
|
||||
|
||||
if (IS_CV != IS_VAR || container) {
|
||||
if (IS_CV == IS_CV && container != &EG(uninitialized_zval_ptr)) {
|
||||
SEPARATE_ZVAL_IF_NOT_REF(container);
|
||||
}
|
||||
switch (Z_TYPE_PP(container)) {
|
||||
case IS_ARRAY: {
|
||||
HashTable *ht = Z_ARRVAL_PP(container);
|
||||
@@ -29805,12 +29841,14 @@ static int ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_
|
||||
zend_op *opline = EX(opline);
|
||||
|
||||
zval **container = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_UNSET TSRMLS_CC);
|
||||
zval *offset = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC);
|
||||
zval *offset;
|
||||
|
||||
if (IS_CV == IS_CV && container != &EG(uninitialized_zval_ptr)) {
|
||||
SEPARATE_ZVAL_IF_NOT_REF(container);
|
||||
}
|
||||
offset = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC);
|
||||
|
||||
if (IS_CV != IS_VAR || container) {
|
||||
if (IS_CV == IS_CV && container != &EG(uninitialized_zval_ptr)) {
|
||||
SEPARATE_ZVAL_IF_NOT_REF(container);
|
||||
}
|
||||
switch (Z_TYPE_PP(container)) {
|
||||
case IS_ARRAY: {
|
||||
HashTable *ht = Z_ARRVAL_PP(container);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2011 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2010 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
+2
-1
@@ -2398,6 +2398,7 @@ AC_DEFUN([PHP_SETUP_OPENSSL],[
|
||||
])
|
||||
LIBS=$old_LIBS
|
||||
PHP_ADD_LIBRARY(ssl,,$1)
|
||||
PHP_ADD_LIBRARY(crypto,,$1)
|
||||
|
||||
PHP_ADD_LIBPATH($OPENSSL_LIBDIR, $1)
|
||||
fi
|
||||
@@ -2591,7 +2592,7 @@ dnl This macro is used to get a comparable
|
||||
dnl version for apache1/2.
|
||||
dnl
|
||||
AC_DEFUN([PHP_AP_EXTRACT_VERSION],[
|
||||
ac_output=`$1 -v 2>&1 | grep version`
|
||||
ac_output=`$1 -v 2>&1 | grep version | $SED -e 's/Oracle-HTTP-//'`
|
||||
ac_IFS=$IFS
|
||||
IFS="- /.
|
||||
"
|
||||
|
||||
+13
-6
@@ -42,14 +42,21 @@ echo "buildconf: autoconf version $ac_version found."
|
||||
echo " You need autoconf version 2.13 or newer installed"
|
||||
echo " to build PHP from SVN."
|
||||
exit 1
|
||||
else
|
||||
echo "buildconf: autoconf version $ac_version (ok)"
|
||||
fi
|
||||
|
||||
if test "$1" = "2" && test "$2" -ge "50"; then
|
||||
echo "buildconf: Your version of autoconf likely contains buggy cache code."
|
||||
echo " Running vcsclean for you."
|
||||
echo " To avoid this, install autoconf-2.13."
|
||||
if test "$1" = "2" -a "$2" -gt "59"; then
|
||||
echo "buildconf: You need autoconf 2.59 or lower to build this version of PHP."
|
||||
echo " You are currently trying to use $ac_version"
|
||||
echo " Most distros have separate autoconf 2.13 or 2.59 packages."
|
||||
echo " On Debian/Ubuntu both autoconf2.13 and autoconf2.59 packages exist."
|
||||
echo " Install autoconf2.13 and set the PHP_AUTOCONF env var to "
|
||||
echo " autoconf2.13 and try again."
|
||||
exit 1
|
||||
else
|
||||
echo "buildconf: autoconf version $ac_version (ok)"
|
||||
fi
|
||||
|
||||
if test "$1" = "2" -a "$2" -ge "50"; then
|
||||
./vcsclean
|
||||
stamp=
|
||||
fi
|
||||
|
||||
+4
-2
@@ -41,8 +41,8 @@ AC_CONFIG_HEADER(main/php_config.h)
|
||||
|
||||
PHP_MAJOR_VERSION=5
|
||||
PHP_MINOR_VERSION=3
|
||||
PHP_RELEASE_VERSION=6
|
||||
PHP_EXTRA_VERSION="RC1"
|
||||
PHP_RELEASE_VERSION=7
|
||||
PHP_EXTRA_VERSION="RC2"
|
||||
PHP_VERSION="$PHP_MAJOR_VERSION.$PHP_MINOR_VERSION.$PHP_RELEASE_VERSION$PHP_EXTRA_VERSION"
|
||||
PHP_VERSION_ID=`expr [$]PHP_MAJOR_VERSION \* 10000 + [$]PHP_MINOR_VERSION \* 100 + [$]PHP_RELEASE_VERSION`
|
||||
|
||||
@@ -1156,6 +1156,7 @@ EXPANDED_EXTENSION_DIR=`eval echo $EXTENSION_DIR`
|
||||
EXPANDED_LOCALSTATEDIR=`eval echo $localstatedir`
|
||||
EXPANDED_BINDIR=`eval echo $bindir`
|
||||
EXPANDED_SBINDIR=`eval echo $sbindir`
|
||||
EXPANDED_MANDIR=`eval echo $mandir`
|
||||
EXPANDED_LIBDIR=$libdir
|
||||
EXPANDED_SYSCONFDIR=`eval echo $sysconfdir`
|
||||
EXPANDED_DATADIR=$datadir
|
||||
@@ -1172,6 +1173,7 @@ AC_SUBST(EXPANDED_PEAR_INSTALLDIR)
|
||||
AC_SUBST(EXPANDED_EXTENSION_DIR)
|
||||
AC_SUBST(EXPANDED_BINDIR)
|
||||
AC_SUBST(EXPANDED_SBINDIR)
|
||||
AC_SUBST(EXPANDED_MANDIR)
|
||||
AC_SUBST(EXPANDED_LIBDIR)
|
||||
AC_SUBST(EXPANDED_DATADIR)
|
||||
AC_SUBST(EXPANDED_SYSCONFDIR)
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
--TEST--
|
||||
Bug #51997 (SEEK_CUR with 0 value, returns a warning)
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("bz2")) print "skip"; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
error_reporting(E_ALL);
|
||||
|
||||
$filename = "testfile.bz2";
|
||||
$str = "This is a test string.\n";
|
||||
$bz = bzopen($filename, "w");
|
||||
bzwrite($bz, $str);
|
||||
bzclose($bz);
|
||||
|
||||
$bz = bzopen($filename, "r");
|
||||
fseek($bz, 0, SEEK_CUR);
|
||||
print bzread($bz, 10);
|
||||
print bzread($bz);
|
||||
bzclose($bz);
|
||||
unlink($filename);
|
||||
|
||||
--EXPECT--
|
||||
This is a test string.
|
||||
+45
-1
@@ -331,6 +331,13 @@ zend_module_entry curl_module_entry = {
|
||||
ZEND_GET_MODULE (curl)
|
||||
#endif
|
||||
|
||||
/* {{{ PHP_INI_BEGIN */
|
||||
PHP_INI_BEGIN()
|
||||
PHP_INI_ENTRY("curl.cainfo", "", PHP_INI_SYSTEM, NULL)
|
||||
PHP_INI_END()
|
||||
/* }}} */
|
||||
|
||||
/* }}} */
|
||||
/* {{{ PHP_MINFO_FUNCTION
|
||||
*/
|
||||
PHP_MINFO_FUNCTION(curl)
|
||||
@@ -458,6 +465,8 @@ PHP_MINIT_FUNCTION(curl)
|
||||
le_curl = zend_register_list_destructors_ex(_php_curl_close, NULL, "curl", module_number);
|
||||
le_curl_multi_handle = zend_register_list_destructors_ex(_php_curl_multi_close, NULL, "curl_multi", module_number);
|
||||
|
||||
REGISTER_INI_ENTRIES();
|
||||
|
||||
/* See http://curl.haxx.se/lxr/source/docs/libcurl/symbols-in-versions
|
||||
or curl src/docs/libcurl/symbols-in-versions for a (almost) complete list
|
||||
of options and which version they were introduced */
|
||||
@@ -581,6 +590,11 @@ PHP_MINIT_FUNCTION(curl)
|
||||
REGISTER_CURL_CONSTANT(CURL_TIMECOND_IFUNMODSINCE);
|
||||
REGISTER_CURL_CONSTANT(CURL_TIMECOND_LASTMOD);
|
||||
|
||||
#if LIBCURL_VERSION_NUM > 0x070f04 /* CURLOPT_MAX_RECV_SPEED_LARGE & CURLOPT_MAX_SEND_SPEED_LARGE are available since curl 7.15.5 */
|
||||
REGISTER_CURL_CONSTANT(CURLOPT_MAX_RECV_SPEED_LARGE);
|
||||
REGISTER_CURL_CONSTANT(CURLOPT_MAX_SEND_SPEED_LARGE);
|
||||
#endif
|
||||
|
||||
#if LIBCURL_VERSION_NUM > 0x070a05 /* CURLOPT_HTTPAUTH is available since curl 7.10.6 */
|
||||
REGISTER_CURL_CONSTANT(CURLOPT_HTTPAUTH);
|
||||
/* http authentication options */
|
||||
@@ -632,6 +646,10 @@ PHP_MINIT_FUNCTION(curl)
|
||||
#if LIBCURL_VERSION_NUM > 0x071301
|
||||
REGISTER_CURL_CONSTANT(CURLINFO_CERTINFO);
|
||||
#endif
|
||||
#if LIBCURL_VERSION_NUM >= 0x071202
|
||||
REGISTER_CURL_CONSTANT(CURLINFO_REDIRECT_URL);
|
||||
#endif
|
||||
|
||||
|
||||
/* cURL protocol constants (curl_version) */
|
||||
REGISTER_CURL_CONSTANT(CURL_VERSION_IPV6);
|
||||
@@ -879,6 +897,7 @@ PHP_MSHUTDOWN_FUNCTION(curl)
|
||||
php_curl_openssl_tsl = NULL;
|
||||
}
|
||||
#endif
|
||||
UNREGISTER_INI_ENTRIES();
|
||||
return SUCCESS;
|
||||
}
|
||||
/* }}} */
|
||||
@@ -1427,6 +1446,7 @@ PHP_FUNCTION(curl_init)
|
||||
zval *clone;
|
||||
char *url = NULL;
|
||||
int url_len = 0;
|
||||
char *cainfo;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|s", &url, &url_len) == FAILURE) {
|
||||
return;
|
||||
@@ -1453,6 +1473,8 @@ PHP_FUNCTION(curl_init)
|
||||
MAKE_STD_ZVAL(clone);
|
||||
ch->clone = clone;
|
||||
|
||||
|
||||
|
||||
curl_easy_setopt(ch->cp, CURLOPT_NOPROGRESS, 1);
|
||||
curl_easy_setopt(ch->cp, CURLOPT_VERBOSE, 0);
|
||||
curl_easy_setopt(ch->cp, CURLOPT_ERRORBUFFER, ch->err.str);
|
||||
@@ -1465,6 +1487,12 @@ PHP_FUNCTION(curl_init)
|
||||
curl_easy_setopt(ch->cp, CURLOPT_DNS_USE_GLOBAL_CACHE, 1);
|
||||
curl_easy_setopt(ch->cp, CURLOPT_DNS_CACHE_TIMEOUT, 120);
|
||||
curl_easy_setopt(ch->cp, CURLOPT_MAXREDIRS, 20); /* prevent infinite redirects */
|
||||
|
||||
cainfo = INI_STR("curl.cainfo");
|
||||
if (cainfo && strlen(cainfo) > 0) {
|
||||
curl_easy_setopt(ch->cp, CURLOPT_CAINFO, cainfo);
|
||||
}
|
||||
|
||||
#if defined(ZTS)
|
||||
curl_easy_setopt(ch->cp, CURLOPT_NOSIGNAL, 1);
|
||||
#endif
|
||||
@@ -1669,6 +1697,13 @@ static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue, zval *retu
|
||||
#endif
|
||||
error = curl_easy_setopt(ch->cp, option, Z_LVAL_PP(zvalue));
|
||||
break;
|
||||
#if LIBCURL_VERSION_NUM > 0x070f04
|
||||
case CURLOPT_MAX_RECV_SPEED_LARGE:
|
||||
case CURLOPT_MAX_SEND_SPEED_LARGE:
|
||||
convert_to_long_ex(zvalue);
|
||||
error = curl_easy_setopt(ch->cp, option, (curl_off_t)Z_LVAL_PP(zvalue));
|
||||
break;
|
||||
#endif
|
||||
case CURLOPT_FOLLOWLOCATION:
|
||||
convert_to_long_ex(zvalue);
|
||||
if ((PG(open_basedir) && *PG(open_basedir)) || PG(safe_mode)) {
|
||||
@@ -2305,6 +2340,11 @@ PHP_FUNCTION(curl_getinfo)
|
||||
create_certinfo(ci, listcode TSRMLS_CC);
|
||||
CAAZ("certinfo", listcode);
|
||||
}
|
||||
#endif
|
||||
#if LIBCURL_VERSION_NUM >= 0x071202
|
||||
if (curl_easy_getinfo(ch->cp, CURLINFO_REDIRECT_URL, &s_code) == CURLE_OK) {
|
||||
CAAS("redirect_url", s_code);
|
||||
}
|
||||
#endif
|
||||
if (ch->header.str_len > 0) {
|
||||
CAAS("request_header", ch->header.str);
|
||||
@@ -2313,7 +2353,11 @@ PHP_FUNCTION(curl_getinfo)
|
||||
switch (option) {
|
||||
case CURLINFO_PRIVATE:
|
||||
case CURLINFO_EFFECTIVE_URL:
|
||||
case CURLINFO_CONTENT_TYPE: {
|
||||
case CURLINFO_CONTENT_TYPE:
|
||||
#if LIBCURL_VERSION_NUM >= 0x071202
|
||||
case CURLINFO_REDIRECT_URL:
|
||||
#endif
|
||||
{
|
||||
char *s_code = NULL;
|
||||
|
||||
if (curl_easy_getinfo(ch->cp, option, &s_code) == CURLE_OK && s_code) {
|
||||
|
||||
@@ -18,7 +18,7 @@ $host = getenv('PHP_CURL_HTTP_REMOTE_SERVER');
|
||||
if(!empty($host)) {
|
||||
|
||||
// Use the set Environment variable
|
||||
$url = "$host/get.php";
|
||||
$url = "$host/get.php?test=1";
|
||||
|
||||
} else {
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@ timelib_rel_time *timelib_diff(timelib_time *one, timelib_time *two)
|
||||
timelib_rel_time *rt;
|
||||
timelib_time *swp;
|
||||
timelib_sll dst_h_corr = 0, dst_m_corr = 0;
|
||||
timelib_time one_backup, two_backup;
|
||||
|
||||
rt = timelib_rel_time_ctor();
|
||||
rt->invert = 0;
|
||||
@@ -45,6 +46,10 @@ timelib_rel_time *timelib_diff(timelib_time *one, timelib_time *two)
|
||||
dst_m_corr = ((two->z - one->z) % 3600) / 60;
|
||||
}
|
||||
|
||||
/* Save old TZ info */
|
||||
memcpy(&one_backup, one, sizeof(one_backup));
|
||||
memcpy(&two_backup, two, sizeof(two_backup));
|
||||
|
||||
timelib_apply_localtime(one, 0);
|
||||
timelib_apply_localtime(two, 0);
|
||||
|
||||
@@ -58,8 +63,9 @@ timelib_rel_time *timelib_diff(timelib_time *one, timelib_time *two)
|
||||
|
||||
timelib_do_rel_normalize(rt->invert ? one : two, rt);
|
||||
|
||||
timelib_apply_localtime(one, 1);
|
||||
timelib_apply_localtime(two, 1);
|
||||
/* Restore old TZ info */
|
||||
memcpy(one, &one_backup, sizeof(one_backup));
|
||||
memcpy(two, &two_backup, sizeof(two_backup));
|
||||
|
||||
return rt;
|
||||
}
|
||||
+159
-113
@@ -1,4 +1,4 @@
|
||||
/* Generated by re2c 0.13.5 on Sat Nov 13 14:58:02 2010 */
|
||||
/* Generated by re2c 0.13.5 on Sun Jun 5 15:26:42 2011 */
|
||||
#line 1 "ext/date/lib/parse_date.re"
|
||||
/*
|
||||
+----------------------------------------------------------------------+
|
||||
@@ -25,6 +25,7 @@
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
#include <math.h>
|
||||
#include <assert.h>
|
||||
|
||||
#ifdef HAVE_STDLIB_H
|
||||
#include <stdlib.h>
|
||||
@@ -720,6 +721,25 @@ const static timelib_tz_lookup_table* zone_search(const char *word, long gmtoffs
|
||||
return first_found_elem;
|
||||
}
|
||||
|
||||
for (tp = timelib_timezone_lookup; tp->name; tp++) {
|
||||
if (tp->full_tz_name && strcasecmp(word, tp->full_tz_name) == 0) {
|
||||
if (!first_found) {
|
||||
first_found = 1;
|
||||
first_found_elem = tp;
|
||||
if (gmtoffset == -1) {
|
||||
return tp;
|
||||
}
|
||||
}
|
||||
if (tp->gmtoffset == gmtoffset) {
|
||||
return tp;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (first_found) {
|
||||
return first_found_elem;
|
||||
}
|
||||
|
||||
|
||||
/* Still didn't find anything, let's find the zone solely based on
|
||||
* offset/isdst then */
|
||||
for (fmp = timelib_timezone_fallbackmap; fmp->name; fmp++) {
|
||||
@@ -843,11 +863,11 @@ static int scan(Scanner *s)
|
||||
std:
|
||||
s->tok = cursor;
|
||||
s->len = 0;
|
||||
#line 969 "ext/date/lib/parse_date.re"
|
||||
#line 989 "ext/date/lib/parse_date.re"
|
||||
|
||||
|
||||
|
||||
#line 851 "ext/date/lib/parse_date.c"
|
||||
#line 871 "ext/date/lib/parse_date.c"
|
||||
{
|
||||
YYCTYPE yych;
|
||||
unsigned int yyaccept = 0;
|
||||
@@ -967,7 +987,7 @@ std:
|
||||
}
|
||||
yy2:
|
||||
YYDEBUG(2, *YYCURSOR);
|
||||
#line 1054 "ext/date/lib/parse_date.re"
|
||||
#line 1074 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
DEBUG_OUTPUT("firstdayof | lastdayof");
|
||||
TIMELIB_INIT;
|
||||
@@ -983,7 +1003,7 @@ yy2:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_LF_DAY_OF_MONTH;
|
||||
}
|
||||
#line 987 "ext/date/lib/parse_date.c"
|
||||
#line 1007 "ext/date/lib/parse_date.c"
|
||||
yy3:
|
||||
YYDEBUG(3, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
@@ -1006,7 +1026,7 @@ yy3:
|
||||
}
|
||||
yy4:
|
||||
YYDEBUG(4, *YYCURSOR);
|
||||
#line 1636 "ext/date/lib/parse_date.re"
|
||||
#line 1656 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
int tz_not_found;
|
||||
DEBUG_OUTPUT("tzcorrection | tz");
|
||||
@@ -1019,7 +1039,7 @@ yy4:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_TIMEZONE;
|
||||
}
|
||||
#line 1023 "ext/date/lib/parse_date.c"
|
||||
#line 1043 "ext/date/lib/parse_date.c"
|
||||
yy5:
|
||||
YYDEBUG(5, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -1330,12 +1350,12 @@ yy12:
|
||||
if (yych <= '9') goto yy1385;
|
||||
yy13:
|
||||
YYDEBUG(13, *YYCURSOR);
|
||||
#line 1731 "ext/date/lib/parse_date.re"
|
||||
#line 1751 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
add_error(s, "Unexpected character");
|
||||
goto std;
|
||||
}
|
||||
#line 1339 "ext/date/lib/parse_date.c"
|
||||
#line 1359 "ext/date/lib/parse_date.c"
|
||||
yy14:
|
||||
YYDEBUG(14, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -2392,11 +2412,11 @@ yy49:
|
||||
if (yych <= '9') goto yy55;
|
||||
yy50:
|
||||
YYDEBUG(50, *YYCURSOR);
|
||||
#line 1720 "ext/date/lib/parse_date.re"
|
||||
#line 1740 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
goto std;
|
||||
}
|
||||
#line 2400 "ext/date/lib/parse_date.c"
|
||||
#line 2420 "ext/date/lib/parse_date.c"
|
||||
yy51:
|
||||
YYDEBUG(51, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -2405,12 +2425,12 @@ yy52:
|
||||
YYDEBUG(52, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
YYDEBUG(53, *YYCURSOR);
|
||||
#line 1725 "ext/date/lib/parse_date.re"
|
||||
#line 1745 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
s->pos = cursor; s->line++;
|
||||
goto std;
|
||||
}
|
||||
#line 2414 "ext/date/lib/parse_date.c"
|
||||
#line 2434 "ext/date/lib/parse_date.c"
|
||||
yy54:
|
||||
YYDEBUG(54, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -2797,7 +2817,7 @@ yy72:
|
||||
if (yych == 's') goto yy74;
|
||||
yy73:
|
||||
YYDEBUG(73, *YYCURSOR);
|
||||
#line 1704 "ext/date/lib/parse_date.re"
|
||||
#line 1724 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
timelib_ull i;
|
||||
DEBUG_OUTPUT("relative");
|
||||
@@ -2812,7 +2832,7 @@ yy73:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_RELATIVE;
|
||||
}
|
||||
#line 2816 "ext/date/lib/parse_date.c"
|
||||
#line 2836 "ext/date/lib/parse_date.c"
|
||||
yy74:
|
||||
YYDEBUG(74, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -3574,7 +3594,7 @@ yy166:
|
||||
}
|
||||
yy167:
|
||||
YYDEBUG(167, *YYCURSOR);
|
||||
#line 1567 "ext/date/lib/parse_date.re"
|
||||
#line 1587 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
const timelib_relunit* relunit;
|
||||
DEBUG_OUTPUT("daytext");
|
||||
@@ -3591,7 +3611,7 @@ yy167:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_WEEKDAY;
|
||||
}
|
||||
#line 3595 "ext/date/lib/parse_date.c"
|
||||
#line 3615 "ext/date/lib/parse_date.c"
|
||||
yy168:
|
||||
YYDEBUG(168, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -4111,7 +4131,7 @@ yy193:
|
||||
}
|
||||
yy194:
|
||||
YYDEBUG(194, *YYCURSOR);
|
||||
#line 1626 "ext/date/lib/parse_date.re"
|
||||
#line 1646 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
DEBUG_OUTPUT("monthtext");
|
||||
TIMELIB_INIT;
|
||||
@@ -4120,7 +4140,7 @@ yy194:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_DATE_TEXT;
|
||||
}
|
||||
#line 4124 "ext/date/lib/parse_date.c"
|
||||
#line 4144 "ext/date/lib/parse_date.c"
|
||||
yy195:
|
||||
YYDEBUG(195, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
@@ -4171,7 +4191,7 @@ yy198:
|
||||
}
|
||||
yy199:
|
||||
YYDEBUG(199, *YYCURSOR);
|
||||
#line 1376 "ext/date/lib/parse_date.re"
|
||||
#line 1396 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
DEBUG_OUTPUT("datetextual | datenoyear");
|
||||
TIMELIB_INIT;
|
||||
@@ -4183,7 +4203,7 @@ yy199:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_DATE_TEXT;
|
||||
}
|
||||
#line 4187 "ext/date/lib/parse_date.c"
|
||||
#line 4207 "ext/date/lib/parse_date.c"
|
||||
yy200:
|
||||
YYDEBUG(200, *YYCURSOR);
|
||||
yyaccept = 6;
|
||||
@@ -4452,7 +4472,7 @@ yy222:
|
||||
}
|
||||
yy223:
|
||||
YYDEBUG(223, *YYCURSOR);
|
||||
#line 1674 "ext/date/lib/parse_date.re"
|
||||
#line 1694 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
int tz_not_found;
|
||||
DEBUG_OUTPUT("dateshortwithtimeshort | dateshortwithtimelong | dateshortwithtimelongtz");
|
||||
@@ -4481,7 +4501,7 @@ yy223:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_SHORTDATE_WITH_TIME;
|
||||
}
|
||||
#line 4485 "ext/date/lib/parse_date.c"
|
||||
#line 4505 "ext/date/lib/parse_date.c"
|
||||
yy224:
|
||||
YYDEBUG(224, *YYCURSOR);
|
||||
yyaccept = 7;
|
||||
@@ -5179,7 +5199,7 @@ yy278:
|
||||
YYDEBUG(278, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
YYDEBUG(279, *YYCURSOR);
|
||||
#line 1650 "ext/date/lib/parse_date.re"
|
||||
#line 1670 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
DEBUG_OUTPUT("dateshortwithtimeshort12 | dateshortwithtimelong12");
|
||||
TIMELIB_INIT;
|
||||
@@ -5202,7 +5222,7 @@ yy278:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_SHORTDATE_WITH_TIME;
|
||||
}
|
||||
#line 5206 "ext/date/lib/parse_date.c"
|
||||
#line 5226 "ext/date/lib/parse_date.c"
|
||||
yy280:
|
||||
YYDEBUG(280, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -5380,7 +5400,7 @@ yy294:
|
||||
++YYCURSOR;
|
||||
yy295:
|
||||
YYDEBUG(295, *YYCURSOR);
|
||||
#line 1350 "ext/date/lib/parse_date.re"
|
||||
#line 1370 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
DEBUG_OUTPUT("datenoday");
|
||||
TIMELIB_INIT;
|
||||
@@ -5392,7 +5412,7 @@ yy295:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_DATE_NO_DAY;
|
||||
}
|
||||
#line 5396 "ext/date/lib/parse_date.c"
|
||||
#line 5416 "ext/date/lib/parse_date.c"
|
||||
yy296:
|
||||
YYDEBUG(296, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -6612,7 +6632,7 @@ yy362:
|
||||
if (yych <= '9') goto yy365;
|
||||
yy364:
|
||||
YYDEBUG(364, *YYCURSOR);
|
||||
#line 1490 "ext/date/lib/parse_date.re"
|
||||
#line 1510 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
DEBUG_OUTPUT("pgtextshort");
|
||||
TIMELIB_INIT;
|
||||
@@ -6624,7 +6644,7 @@ yy364:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_PG_TEXT;
|
||||
}
|
||||
#line 6628 "ext/date/lib/parse_date.c"
|
||||
#line 6648 "ext/date/lib/parse_date.c"
|
||||
yy365:
|
||||
YYDEBUG(365, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -7262,7 +7282,7 @@ yy392:
|
||||
}
|
||||
yy393:
|
||||
YYDEBUG(393, *YYCURSOR);
|
||||
#line 1546 "ext/date/lib/parse_date.re"
|
||||
#line 1566 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
DEBUG_OUTPUT("ago");
|
||||
TIMELIB_INIT;
|
||||
@@ -7282,7 +7302,7 @@ yy393:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_AGO;
|
||||
}
|
||||
#line 7286 "ext/date/lib/parse_date.c"
|
||||
#line 7306 "ext/date/lib/parse_date.c"
|
||||
yy394:
|
||||
YYDEBUG(394, *YYCURSOR);
|
||||
yyaccept = 5;
|
||||
@@ -9032,7 +9052,7 @@ yy454:
|
||||
++YYCURSOR;
|
||||
yy455:
|
||||
YYDEBUG(455, *YYCURSOR);
|
||||
#line 1260 "ext/date/lib/parse_date.re"
|
||||
#line 1280 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
DEBUG_OUTPUT("iso8601date4 | iso8601date2 | iso8601dateslash | dateslash");
|
||||
TIMELIB_INIT;
|
||||
@@ -9043,7 +9063,7 @@ yy455:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_ISO_DATE;
|
||||
}
|
||||
#line 9047 "ext/date/lib/parse_date.c"
|
||||
#line 9067 "ext/date/lib/parse_date.c"
|
||||
yy456:
|
||||
YYDEBUG(456, *YYCURSOR);
|
||||
yyaccept = 0;
|
||||
@@ -9603,7 +9623,7 @@ yy475:
|
||||
}
|
||||
yy476:
|
||||
YYDEBUG(476, *YYCURSOR);
|
||||
#line 1389 "ext/date/lib/parse_date.re"
|
||||
#line 1409 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
DEBUG_OUTPUT("datenoyearrev");
|
||||
TIMELIB_INIT;
|
||||
@@ -9614,7 +9634,7 @@ yy476:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_DATE_TEXT;
|
||||
}
|
||||
#line 9618 "ext/date/lib/parse_date.c"
|
||||
#line 9638 "ext/date/lib/parse_date.c"
|
||||
yy477:
|
||||
YYDEBUG(477, *YYCURSOR);
|
||||
yyaccept = 10;
|
||||
@@ -9755,7 +9775,7 @@ yy488:
|
||||
YYDEBUG(488, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
YYDEBUG(489, *YYCURSOR);
|
||||
#line 1116 "ext/date/lib/parse_date.re"
|
||||
#line 1136 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
DEBUG_OUTPUT("timetiny12 | timeshort12 | timelong12");
|
||||
TIMELIB_INIT;
|
||||
@@ -9771,7 +9791,7 @@ yy488:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_TIME12;
|
||||
}
|
||||
#line 9775 "ext/date/lib/parse_date.c"
|
||||
#line 9795 "ext/date/lib/parse_date.c"
|
||||
yy490:
|
||||
YYDEBUG(490, *YYCURSOR);
|
||||
yyaccept = 11;
|
||||
@@ -9784,7 +9804,7 @@ yy490:
|
||||
}
|
||||
yy491:
|
||||
YYDEBUG(491, *YYCURSOR);
|
||||
#line 1153 "ext/date/lib/parse_date.re"
|
||||
#line 1173 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
int tz_not_found;
|
||||
DEBUG_OUTPUT("timeshort24 | timelong24 | iso8601long");
|
||||
@@ -9809,7 +9829,7 @@ yy491:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_TIME24_WITH_ZONE;
|
||||
}
|
||||
#line 9813 "ext/date/lib/parse_date.c"
|
||||
#line 9833 "ext/date/lib/parse_date.c"
|
||||
yy492:
|
||||
YYDEBUG(492, *YYCURSOR);
|
||||
yyaccept = 11;
|
||||
@@ -10119,7 +10139,7 @@ yy523:
|
||||
YYDEBUG(523, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
YYDEBUG(524, *YYCURSOR);
|
||||
#line 1133 "ext/date/lib/parse_date.re"
|
||||
#line 1153 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
DEBUG_OUTPUT("mssqltime");
|
||||
TIMELIB_INIT;
|
||||
@@ -10138,7 +10158,7 @@ yy523:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_TIME24_WITH_ZONE;
|
||||
}
|
||||
#line 10142 "ext/date/lib/parse_date.c"
|
||||
#line 10162 "ext/date/lib/parse_date.c"
|
||||
yy525:
|
||||
YYDEBUG(525, *YYCURSOR);
|
||||
yyaccept = 11;
|
||||
@@ -10244,7 +10264,7 @@ yy534:
|
||||
if (yych <= '9') goto yy541;
|
||||
yy535:
|
||||
YYDEBUG(535, *YYCURSOR);
|
||||
#line 1311 "ext/date/lib/parse_date.re"
|
||||
#line 1331 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
DEBUG_OUTPUT("datefull");
|
||||
TIMELIB_INIT;
|
||||
@@ -10257,7 +10277,7 @@ yy535:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_DATE_FULL;
|
||||
}
|
||||
#line 10261 "ext/date/lib/parse_date.c"
|
||||
#line 10281 "ext/date/lib/parse_date.c"
|
||||
yy536:
|
||||
YYDEBUG(536, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -10994,7 +11014,7 @@ yy605:
|
||||
YYDEBUG(606, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
YYDEBUG(607, *YYCURSOR);
|
||||
#line 1325 "ext/date/lib/parse_date.re"
|
||||
#line 1345 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
DEBUG_OUTPUT("pointed date YYYY");
|
||||
TIMELIB_INIT;
|
||||
@@ -11005,7 +11025,7 @@ yy605:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_DATE_FULL_POINTED;
|
||||
}
|
||||
#line 11009 "ext/date/lib/parse_date.c"
|
||||
#line 11029 "ext/date/lib/parse_date.c"
|
||||
yy608:
|
||||
YYDEBUG(608, *YYCURSOR);
|
||||
yyaccept = 11;
|
||||
@@ -11041,7 +11061,7 @@ yy611:
|
||||
if (yych <= '9') goto yy605;
|
||||
yy612:
|
||||
YYDEBUG(612, *YYCURSOR);
|
||||
#line 1337 "ext/date/lib/parse_date.re"
|
||||
#line 1357 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
DEBUG_OUTPUT("pointed date YY");
|
||||
TIMELIB_INIT;
|
||||
@@ -11053,7 +11073,7 @@ yy612:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_DATE_FULL_POINTED;
|
||||
}
|
||||
#line 11057 "ext/date/lib/parse_date.c"
|
||||
#line 11077 "ext/date/lib/parse_date.c"
|
||||
yy613:
|
||||
YYDEBUG(613, *YYCURSOR);
|
||||
yyaccept = 11;
|
||||
@@ -11694,7 +11714,7 @@ yy656:
|
||||
}
|
||||
yy657:
|
||||
YYDEBUG(657, *YYCURSOR);
|
||||
#line 1298 "ext/date/lib/parse_date.re"
|
||||
#line 1318 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
DEBUG_OUTPUT("gnudateshort");
|
||||
TIMELIB_INIT;
|
||||
@@ -11706,7 +11726,7 @@ yy657:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_ISO_DATE;
|
||||
}
|
||||
#line 11710 "ext/date/lib/parse_date.c"
|
||||
#line 11730 "ext/date/lib/parse_date.c"
|
||||
yy658:
|
||||
YYDEBUG(658, *YYCURSOR);
|
||||
yyaccept = 13;
|
||||
@@ -11812,7 +11832,7 @@ yy666:
|
||||
}
|
||||
yy667:
|
||||
YYDEBUG(667, *YYCURSOR);
|
||||
#line 1245 "ext/date/lib/parse_date.re"
|
||||
#line 1265 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
DEBUG_OUTPUT("americanshort | american");
|
||||
TIMELIB_INIT;
|
||||
@@ -11826,7 +11846,7 @@ yy667:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_AMERICAN;
|
||||
}
|
||||
#line 11830 "ext/date/lib/parse_date.c"
|
||||
#line 11850 "ext/date/lib/parse_date.c"
|
||||
yy668:
|
||||
YYDEBUG(668, *YYCURSOR);
|
||||
yyaccept = 14;
|
||||
@@ -12059,7 +12079,7 @@ yy700:
|
||||
if (yych <= ':') goto yy704;
|
||||
yy701:
|
||||
YYDEBUG(701, *YYCURSOR);
|
||||
#line 1516 "ext/date/lib/parse_date.re"
|
||||
#line 1536 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
int tz_not_found;
|
||||
DEBUG_OUTPUT("clf");
|
||||
@@ -12079,7 +12099,7 @@ yy701:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_CLF;
|
||||
}
|
||||
#line 12083 "ext/date/lib/parse_date.c"
|
||||
#line 12103 "ext/date/lib/parse_date.c"
|
||||
yy702:
|
||||
YYDEBUG(702, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -12631,7 +12651,7 @@ yy763:
|
||||
}
|
||||
yy764:
|
||||
YYDEBUG(764, *YYCURSOR);
|
||||
#line 1272 "ext/date/lib/parse_date.re"
|
||||
#line 1292 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
DEBUG_OUTPUT("iso8601date2");
|
||||
TIMELIB_INIT;
|
||||
@@ -12643,7 +12663,7 @@ yy764:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_ISO_DATE;
|
||||
}
|
||||
#line 12647 "ext/date/lib/parse_date.c"
|
||||
#line 12667 "ext/date/lib/parse_date.c"
|
||||
yy765:
|
||||
YYDEBUG(765, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -12682,7 +12702,7 @@ yy771:
|
||||
YYDEBUG(771, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
YYDEBUG(772, *YYCURSOR);
|
||||
#line 1503 "ext/date/lib/parse_date.re"
|
||||
#line 1523 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
DEBUG_OUTPUT("pgtextreverse");
|
||||
TIMELIB_INIT;
|
||||
@@ -12694,7 +12714,7 @@ yy771:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_PG_TEXT;
|
||||
}
|
||||
#line 12698 "ext/date/lib/parse_date.c"
|
||||
#line 12718 "ext/date/lib/parse_date.c"
|
||||
yy773:
|
||||
YYDEBUG(773, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -12832,7 +12852,7 @@ yy783:
|
||||
}
|
||||
yy784:
|
||||
YYDEBUG(784, *YYCURSOR);
|
||||
#line 1537 "ext/date/lib/parse_date.re"
|
||||
#line 1557 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
DEBUG_OUTPUT("year4");
|
||||
TIMELIB_INIT;
|
||||
@@ -12840,7 +12860,7 @@ yy784:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_CLF;
|
||||
}
|
||||
#line 12844 "ext/date/lib/parse_date.c"
|
||||
#line 12864 "ext/date/lib/parse_date.c"
|
||||
yy785:
|
||||
YYDEBUG(785, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -12991,7 +13011,7 @@ yy793:
|
||||
}
|
||||
yy794:
|
||||
YYDEBUG(794, *YYCURSOR);
|
||||
#line 1363 "ext/date/lib/parse_date.re"
|
||||
#line 1383 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
DEBUG_OUTPUT("datenodayrev");
|
||||
TIMELIB_INIT;
|
||||
@@ -13003,7 +13023,7 @@ yy794:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_DATE_NO_DAY;
|
||||
}
|
||||
#line 13007 "ext/date/lib/parse_date.c"
|
||||
#line 13027 "ext/date/lib/parse_date.c"
|
||||
yy795:
|
||||
YYDEBUG(795, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -13218,7 +13238,7 @@ yy814:
|
||||
if (yych <= '7') goto yy817;
|
||||
yy815:
|
||||
YYDEBUG(815, *YYCURSOR);
|
||||
#line 1471 "ext/date/lib/parse_date.re"
|
||||
#line 1491 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
timelib_sll w, d;
|
||||
DEBUG_OUTPUT("isoweek");
|
||||
@@ -13236,7 +13256,7 @@ yy815:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_ISO_WEEK;
|
||||
}
|
||||
#line 13240 "ext/date/lib/parse_date.c"
|
||||
#line 13260 "ext/date/lib/parse_date.c"
|
||||
yy816:
|
||||
YYDEBUG(816, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -13246,7 +13266,7 @@ yy817:
|
||||
YYDEBUG(817, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
YYDEBUG(818, *YYCURSOR);
|
||||
#line 1452 "ext/date/lib/parse_date.re"
|
||||
#line 1472 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
timelib_sll w, d;
|
||||
DEBUG_OUTPUT("isoweekday");
|
||||
@@ -13264,7 +13284,7 @@ yy817:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_ISO_WEEK;
|
||||
}
|
||||
#line 13268 "ext/date/lib/parse_date.c"
|
||||
#line 13288 "ext/date/lib/parse_date.c"
|
||||
yy819:
|
||||
YYDEBUG(819, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -13328,7 +13348,7 @@ yy821:
|
||||
}
|
||||
yy822:
|
||||
YYDEBUG(822, *YYCURSOR);
|
||||
#line 1439 "ext/date/lib/parse_date.re"
|
||||
#line 1459 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
DEBUG_OUTPUT("pgydotd");
|
||||
TIMELIB_INIT;
|
||||
@@ -13340,7 +13360,7 @@ yy822:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_PG_YEARDAY;
|
||||
}
|
||||
#line 13344 "ext/date/lib/parse_date.c"
|
||||
#line 13364 "ext/date/lib/parse_date.c"
|
||||
yy823:
|
||||
YYDEBUG(823, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -13443,7 +13463,7 @@ yy842:
|
||||
++YYCURSOR;
|
||||
yy843:
|
||||
YYDEBUG(843, *YYCURSOR);
|
||||
#line 1413 "ext/date/lib/parse_date.re"
|
||||
#line 1433 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
int tz_not_found;
|
||||
DEBUG_OUTPUT("xmlrpc | xmlrpcnocolon | soap | wddx | exif");
|
||||
@@ -13468,7 +13488,7 @@ yy843:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_XMLRPC_SOAP;
|
||||
}
|
||||
#line 13472 "ext/date/lib/parse_date.c"
|
||||
#line 13492 "ext/date/lib/parse_date.c"
|
||||
yy844:
|
||||
YYDEBUG(844, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -13730,7 +13750,7 @@ yy848:
|
||||
}
|
||||
yy849:
|
||||
YYDEBUG(849, *YYCURSOR);
|
||||
#line 1401 "ext/date/lib/parse_date.re"
|
||||
#line 1421 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
DEBUG_OUTPUT("datenocolon");
|
||||
TIMELIB_INIT;
|
||||
@@ -13741,7 +13761,7 @@ yy849:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_DATE_NOCOLON;
|
||||
}
|
||||
#line 13745 "ext/date/lib/parse_date.c"
|
||||
#line 13765 "ext/date/lib/parse_date.c"
|
||||
yy850:
|
||||
YYDEBUG(850, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -14661,7 +14681,7 @@ yy973:
|
||||
if (yych <= '9') goto yy996;
|
||||
yy974:
|
||||
YYDEBUG(974, *YYCURSOR);
|
||||
#line 1285 "ext/date/lib/parse_date.re"
|
||||
#line 1305 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
DEBUG_OUTPUT("gnudateshorter");
|
||||
TIMELIB_INIT;
|
||||
@@ -14673,7 +14693,7 @@ yy974:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_ISO_DATE;
|
||||
}
|
||||
#line 14677 "ext/date/lib/parse_date.c"
|
||||
#line 14697 "ext/date/lib/parse_date.c"
|
||||
yy975:
|
||||
YYDEBUG(975, *YYCURSOR);
|
||||
yyaccept = 22;
|
||||
@@ -15682,7 +15702,7 @@ yy1066:
|
||||
}
|
||||
yy1068:
|
||||
YYDEBUG(1068, *YYCURSOR);
|
||||
#line 1179 "ext/date/lib/parse_date.re"
|
||||
#line 1199 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
DEBUG_OUTPUT("gnunocolon");
|
||||
TIMELIB_INIT;
|
||||
@@ -15704,7 +15724,7 @@ yy1068:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_GNU_NOCOLON;
|
||||
}
|
||||
#line 15708 "ext/date/lib/parse_date.c"
|
||||
#line 15728 "ext/date/lib/parse_date.c"
|
||||
yy1069:
|
||||
YYDEBUG(1069, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -15796,7 +15816,7 @@ yy1075:
|
||||
}
|
||||
yy1076:
|
||||
YYDEBUG(1076, *YYCURSOR);
|
||||
#line 1225 "ext/date/lib/parse_date.re"
|
||||
#line 1245 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
int tz_not_found;
|
||||
DEBUG_OUTPUT("iso8601nocolon");
|
||||
@@ -15815,7 +15835,7 @@ yy1076:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_ISO_NOCOLON;
|
||||
}
|
||||
#line 15819 "ext/date/lib/parse_date.c"
|
||||
#line 15839 "ext/date/lib/parse_date.c"
|
||||
yy1077:
|
||||
YYDEBUG(1077, *YYCURSOR);
|
||||
yyaccept = 25;
|
||||
@@ -16713,7 +16733,7 @@ yy1117:
|
||||
}
|
||||
yy1118:
|
||||
YYDEBUG(1118, *YYCURSOR);
|
||||
#line 1609 "ext/date/lib/parse_date.re"
|
||||
#line 1629 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
timelib_sll i;
|
||||
int behavior = 0;
|
||||
@@ -16729,7 +16749,7 @@ yy1118:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_RELATIVE;
|
||||
}
|
||||
#line 16733 "ext/date/lib/parse_date.c"
|
||||
#line 16753 "ext/date/lib/parse_date.c"
|
||||
yy1119:
|
||||
YYDEBUG(1119, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
@@ -16780,7 +16800,7 @@ yy1126:
|
||||
YYDEBUG(1126, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
YYDEBUG(1127, *YYCURSOR);
|
||||
#line 1094 "ext/date/lib/parse_date.re"
|
||||
#line 1114 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
timelib_sll i;
|
||||
int behavior = 0;
|
||||
@@ -16801,7 +16821,7 @@ yy1126:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_WEEK_DAY_OF_MONTH;
|
||||
}
|
||||
#line 16805 "ext/date/lib/parse_date.c"
|
||||
#line 16825 "ext/date/lib/parse_date.c"
|
||||
yy1128:
|
||||
YYDEBUG(1128, *YYCURSOR);
|
||||
yyaccept = 26;
|
||||
@@ -16909,7 +16929,7 @@ yy1141:
|
||||
}
|
||||
yy1142:
|
||||
YYDEBUG(1142, *YYCURSOR);
|
||||
#line 1585 "ext/date/lib/parse_date.re"
|
||||
#line 1605 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
timelib_sll i;
|
||||
int behavior = 0;
|
||||
@@ -16932,7 +16952,7 @@ yy1142:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_RELATIVE;
|
||||
}
|
||||
#line 16936 "ext/date/lib/parse_date.c"
|
||||
#line 16956 "ext/date/lib/parse_date.c"
|
||||
yy1143:
|
||||
YYDEBUG(1143, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -19609,7 +19629,7 @@ yy1294:
|
||||
goto yy1298;
|
||||
yy1295:
|
||||
YYDEBUG(1295, *YYCURSOR);
|
||||
#line 1071 "ext/date/lib/parse_date.re"
|
||||
#line 1091 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
DEBUG_OUTPUT("backof | frontof");
|
||||
TIMELIB_INIT;
|
||||
@@ -19631,7 +19651,7 @@ yy1295:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_LF_DAY_OF_MONTH;
|
||||
}
|
||||
#line 19635 "ext/date/lib/parse_date.c"
|
||||
#line 19655 "ext/date/lib/parse_date.c"
|
||||
yy1296:
|
||||
YYDEBUG(1296, *YYCURSOR);
|
||||
yyaccept = 28;
|
||||
@@ -21322,7 +21342,7 @@ yy1385:
|
||||
if (yych <= '9') goto yy1385;
|
||||
yy1387:
|
||||
YYDEBUG(1387, *YYCURSOR);
|
||||
#line 1029 "ext/date/lib/parse_date.re"
|
||||
#line 1049 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
timelib_ull i;
|
||||
|
||||
@@ -21346,7 +21366,7 @@ yy1387:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_RELATIVE;
|
||||
}
|
||||
#line 21350 "ext/date/lib/parse_date.c"
|
||||
#line 21370 "ext/date/lib/parse_date.c"
|
||||
yy1388:
|
||||
YYDEBUG(1388, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -21782,7 +21802,7 @@ yy1416:
|
||||
++YYCURSOR;
|
||||
yy1417:
|
||||
YYDEBUG(1417, *YYCURSOR);
|
||||
#line 1017 "ext/date/lib/parse_date.re"
|
||||
#line 1037 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
DEBUG_OUTPUT("tomorrow");
|
||||
TIMELIB_INIT;
|
||||
@@ -21793,7 +21813,7 @@ yy1417:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_RELATIVE;
|
||||
}
|
||||
#line 21797 "ext/date/lib/parse_date.c"
|
||||
#line 21817 "ext/date/lib/parse_date.c"
|
||||
yy1418:
|
||||
YYDEBUG(1418, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -21828,7 +21848,7 @@ yy1419:
|
||||
}
|
||||
yy1420:
|
||||
YYDEBUG(1420, *YYCURSOR);
|
||||
#line 1007 "ext/date/lib/parse_date.re"
|
||||
#line 1027 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
DEBUG_OUTPUT("midnight | today");
|
||||
TIMELIB_INIT;
|
||||
@@ -21837,7 +21857,7 @@ yy1420:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_RELATIVE;
|
||||
}
|
||||
#line 21841 "ext/date/lib/parse_date.c"
|
||||
#line 21861 "ext/date/lib/parse_date.c"
|
||||
yy1421:
|
||||
YYDEBUG(1421, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -23849,7 +23869,7 @@ yy1499:
|
||||
}
|
||||
yy1500:
|
||||
YYDEBUG(1500, *YYCURSOR);
|
||||
#line 986 "ext/date/lib/parse_date.re"
|
||||
#line 1006 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
DEBUG_OUTPUT("now");
|
||||
TIMELIB_INIT;
|
||||
@@ -23857,7 +23877,7 @@ yy1500:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_RELATIVE;
|
||||
}
|
||||
#line 23861 "ext/date/lib/parse_date.c"
|
||||
#line 23881 "ext/date/lib/parse_date.c"
|
||||
yy1501:
|
||||
YYDEBUG(1501, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -23996,7 +24016,7 @@ yy1507:
|
||||
}
|
||||
yy1508:
|
||||
YYDEBUG(1508, *YYCURSOR);
|
||||
#line 995 "ext/date/lib/parse_date.re"
|
||||
#line 1015 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
DEBUG_OUTPUT("noon");
|
||||
TIMELIB_INIT;
|
||||
@@ -24007,7 +24027,7 @@ yy1508:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_RELATIVE;
|
||||
}
|
||||
#line 24011 "ext/date/lib/parse_date.c"
|
||||
#line 24031 "ext/date/lib/parse_date.c"
|
||||
yy1509:
|
||||
YYDEBUG(1509, *YYCURSOR);
|
||||
yyaccept = 0;
|
||||
@@ -24540,7 +24560,7 @@ yy1530:
|
||||
++YYCURSOR;
|
||||
yy1531:
|
||||
YYDEBUG(1531, *YYCURSOR);
|
||||
#line 974 "ext/date/lib/parse_date.re"
|
||||
#line 994 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
DEBUG_OUTPUT("yesterday");
|
||||
TIMELIB_INIT;
|
||||
@@ -24551,7 +24571,7 @@ yy1531:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_RELATIVE;
|
||||
}
|
||||
#line 24555 "ext/date/lib/parse_date.c"
|
||||
#line 24575 "ext/date/lib/parse_date.c"
|
||||
yy1532:
|
||||
YYDEBUG(1532, *YYCURSOR);
|
||||
yyaccept = 0;
|
||||
@@ -24724,7 +24744,7 @@ yy1537:
|
||||
goto yy1531;
|
||||
}
|
||||
}
|
||||
#line 1735 "ext/date/lib/parse_date.re"
|
||||
#line 1755 "ext/date/lib/parse_date.re"
|
||||
|
||||
}
|
||||
|
||||
@@ -24815,6 +24835,30 @@ timelib_time* timelib_strtotime(char *s, int len, struct timelib_error_container
|
||||
add_pbf_error(s, "Unexpected data found.", string, begin); \
|
||||
}
|
||||
|
||||
static void timelib_time_reset_fields(timelib_time *time)
|
||||
{
|
||||
assert(time != NULL);
|
||||
|
||||
time->y = 1970;
|
||||
time->m = 1;
|
||||
time->d = 1;
|
||||
time->h = time->i = time->s = 0;
|
||||
time->f = 0.0;
|
||||
time->tz_info = NULL;
|
||||
}
|
||||
|
||||
static void timelib_time_reset_unset_fields(timelib_time *time)
|
||||
{
|
||||
assert(time != NULL);
|
||||
|
||||
if (time->y == TIMELIB_UNSET ) time->y = 1970;
|
||||
if (time->m == TIMELIB_UNSET ) time->m = 1;
|
||||
if (time->d == TIMELIB_UNSET ) time->d = 1;
|
||||
if (time->h == TIMELIB_UNSET ) time->h = 0;
|
||||
if (time->i == TIMELIB_UNSET ) time->i = 0;
|
||||
if (time->s == TIMELIB_UNSET ) time->s = 0;
|
||||
if (time->f == TIMELIB_UNSET ) time->f = 0.0;
|
||||
}
|
||||
|
||||
timelib_time *timelib_parse_from_format(char *format, char *string, int len, timelib_error_container **errors, const timelib_tzdb *tzdb)
|
||||
{
|
||||
@@ -25013,23 +25057,11 @@ timelib_time *timelib_parse_from_format(char *format, char *string, int len, tim
|
||||
break;
|
||||
|
||||
case '!': /* reset all fields to default */
|
||||
s->time->y = 1970;
|
||||
s->time->m = 1;
|
||||
s->time->d = 1;
|
||||
s->time->h = s->time->i = s->time->s = 0;
|
||||
s->time->f = 0.0;
|
||||
s->time->tz_info = NULL;
|
||||
timelib_time_reset_fields(s->time);
|
||||
break; /* break intentionally not missing */
|
||||
|
||||
case '|': /* reset all fields to default when not set */
|
||||
if (s->time->y == TIMELIB_UNSET ) s->time->y = 1970;
|
||||
if (s->time->m == TIMELIB_UNSET ) s->time->m = 1;
|
||||
if (s->time->d == TIMELIB_UNSET ) s->time->d = 1;
|
||||
if (s->time->h == TIMELIB_UNSET ) s->time->h = 0;
|
||||
if (s->time->i == TIMELIB_UNSET ) s->time->i = 0;
|
||||
if (s->time->s == TIMELIB_UNSET ) s->time->s = 0;
|
||||
if (s->time->f == TIMELIB_UNSET ) s->time->f = 0.0;
|
||||
|
||||
timelib_time_reset_unset_fields(s->time);
|
||||
break; /* break intentionally not missing */
|
||||
|
||||
case '?': /* random char */
|
||||
@@ -25061,7 +25093,21 @@ timelib_time *timelib_parse_from_format(char *format, char *string, int len, tim
|
||||
add_pbf_error(s, "Trailing data", string, ptr);
|
||||
}
|
||||
if (*fptr) {
|
||||
add_pbf_error(s, "Data missing", string, ptr);
|
||||
/* Trailing | and ! specifiers are valid. */
|
||||
while (*fptr) {
|
||||
switch (*fptr++) {
|
||||
case '!': /* reset all fields to default */
|
||||
timelib_time_reset_fields(s->time);
|
||||
break;
|
||||
|
||||
case '|': /* reset all fields to default when not set */
|
||||
timelib_time_reset_unset_fields(s->time);
|
||||
break;
|
||||
|
||||
default:
|
||||
add_pbf_error(s, "Data missing", string, ptr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* clean up a bit */
|
||||
|
||||
+61
-15
@@ -23,6 +23,7 @@
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
#include <math.h>
|
||||
#include <assert.h>
|
||||
|
||||
#ifdef HAVE_STDLIB_H
|
||||
#include <stdlib.h>
|
||||
@@ -718,6 +719,25 @@ const static timelib_tz_lookup_table* zone_search(const char *word, long gmtoffs
|
||||
return first_found_elem;
|
||||
}
|
||||
|
||||
for (tp = timelib_timezone_lookup; tp->name; tp++) {
|
||||
if (tp->full_tz_name && strcasecmp(word, tp->full_tz_name) == 0) {
|
||||
if (!first_found) {
|
||||
first_found = 1;
|
||||
first_found_elem = tp;
|
||||
if (gmtoffset == -1) {
|
||||
return tp;
|
||||
}
|
||||
}
|
||||
if (tp->gmtoffset == gmtoffset) {
|
||||
return tp;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (first_found) {
|
||||
return first_found_elem;
|
||||
}
|
||||
|
||||
|
||||
/* Still didn't find anything, let's find the zone solely based on
|
||||
* offset/isdst then */
|
||||
for (fmp = timelib_timezone_fallbackmap; fmp->name; fmp++) {
|
||||
@@ -1822,6 +1842,30 @@ timelib_time* timelib_strtotime(char *s, int len, struct timelib_error_container
|
||||
add_pbf_error(s, "Unexpected data found.", string, begin); \
|
||||
}
|
||||
|
||||
static void timelib_time_reset_fields(timelib_time *time)
|
||||
{
|
||||
assert(time != NULL);
|
||||
|
||||
time->y = 1970;
|
||||
time->m = 1;
|
||||
time->d = 1;
|
||||
time->h = time->i = time->s = 0;
|
||||
time->f = 0.0;
|
||||
time->tz_info = NULL;
|
||||
}
|
||||
|
||||
static void timelib_time_reset_unset_fields(timelib_time *time)
|
||||
{
|
||||
assert(time != NULL);
|
||||
|
||||
if (time->y == TIMELIB_UNSET ) time->y = 1970;
|
||||
if (time->m == TIMELIB_UNSET ) time->m = 1;
|
||||
if (time->d == TIMELIB_UNSET ) time->d = 1;
|
||||
if (time->h == TIMELIB_UNSET ) time->h = 0;
|
||||
if (time->i == TIMELIB_UNSET ) time->i = 0;
|
||||
if (time->s == TIMELIB_UNSET ) time->s = 0;
|
||||
if (time->f == TIMELIB_UNSET ) time->f = 0.0;
|
||||
}
|
||||
|
||||
timelib_time *timelib_parse_from_format(char *format, char *string, int len, timelib_error_container **errors, const timelib_tzdb *tzdb)
|
||||
{
|
||||
@@ -2020,23 +2064,11 @@ timelib_time *timelib_parse_from_format(char *format, char *string, int len, tim
|
||||
break;
|
||||
|
||||
case '!': /* reset all fields to default */
|
||||
s->time->y = 1970;
|
||||
s->time->m = 1;
|
||||
s->time->d = 1;
|
||||
s->time->h = s->time->i = s->time->s = 0;
|
||||
s->time->f = 0.0;
|
||||
s->time->tz_info = NULL;
|
||||
timelib_time_reset_fields(s->time);
|
||||
break; /* break intentionally not missing */
|
||||
|
||||
case '|': /* reset all fields to default when not set */
|
||||
if (s->time->y == TIMELIB_UNSET ) s->time->y = 1970;
|
||||
if (s->time->m == TIMELIB_UNSET ) s->time->m = 1;
|
||||
if (s->time->d == TIMELIB_UNSET ) s->time->d = 1;
|
||||
if (s->time->h == TIMELIB_UNSET ) s->time->h = 0;
|
||||
if (s->time->i == TIMELIB_UNSET ) s->time->i = 0;
|
||||
if (s->time->s == TIMELIB_UNSET ) s->time->s = 0;
|
||||
if (s->time->f == TIMELIB_UNSET ) s->time->f = 0.0;
|
||||
|
||||
timelib_time_reset_unset_fields(s->time);
|
||||
break; /* break intentionally not missing */
|
||||
|
||||
case '?': /* random char */
|
||||
@@ -2068,7 +2100,21 @@ timelib_time *timelib_parse_from_format(char *format, char *string, int len, tim
|
||||
add_pbf_error(s, "Trailing data", string, ptr);
|
||||
}
|
||||
if (*fptr) {
|
||||
add_pbf_error(s, "Data missing", string, ptr);
|
||||
/* Trailing | and ! specifiers are valid. */
|
||||
while (*fptr) {
|
||||
switch (*fptr++) {
|
||||
case '!': /* reset all fields to default */
|
||||
timelib_time_reset_fields(s->time);
|
||||
break;
|
||||
|
||||
case '|': /* reset all fields to default when not set */
|
||||
timelib_time_reset_unset_fields(s->time);
|
||||
break;
|
||||
|
||||
default:
|
||||
add_pbf_error(s, "Data missing", string, ptr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* clean up a bit */
|
||||
|
||||
@@ -100,6 +100,7 @@ static void read_transistions(const unsigned char **tzf, timelib_tzinfo *tz)
|
||||
|
||||
cbuffer = (unsigned char*) malloc(tz->timecnt * sizeof(unsigned char));
|
||||
if (!cbuffer) {
|
||||
free(buffer);
|
||||
return;
|
||||
}
|
||||
memcpy(cbuffer, *tzf, sizeof(unsigned char) * tz->timecnt);
|
||||
@@ -125,6 +126,7 @@ static void read_types(const unsigned char **tzf, timelib_tzinfo *tz)
|
||||
|
||||
tz->type = (ttinfo*) malloc(tz->typecnt * sizeof(struct ttinfo));
|
||||
if (!tz->type) {
|
||||
free(buffer);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -153,6 +155,7 @@ static void read_types(const unsigned char **tzf, timelib_tzinfo *tz)
|
||||
|
||||
tz->leap_times = (tlinfo*) malloc(tz->leapcnt * sizeof(tlinfo));
|
||||
if (!tz->leap_times) {
|
||||
free(leap_buffer);
|
||||
return;
|
||||
}
|
||||
for (i = 0; i < tz->leapcnt; i++) {
|
||||
|
||||
@@ -26,6 +26,8 @@
|
||||
#include <limits.h>
|
||||
#endif
|
||||
|
||||
#define TIMELIB_VERSION 201101
|
||||
|
||||
#define TIMELIB_NONE 0x00
|
||||
#define TIMELIB_OVERRIDE_TIME 0x01
|
||||
#define TIMELIB_NO_CLONE 0x02
|
||||
|
||||
+1007
-1179
File diff suppressed because it is too large.
Load diff
+3
-5
@@ -2860,14 +2860,13 @@ PHP_FUNCTION(date_add)
|
||||
if (intobj->diff->invert) {
|
||||
bias = -1;
|
||||
}
|
||||
memset(&dateobj->time->relative, 0, sizeof(struct timelib_rel_time));
|
||||
dateobj->time->relative.y = intobj->diff->y * bias;
|
||||
dateobj->time->relative.m = intobj->diff->m * bias;
|
||||
dateobj->time->relative.d = intobj->diff->d * bias;
|
||||
dateobj->time->relative.h = intobj->diff->h * bias;
|
||||
dateobj->time->relative.i = intobj->diff->i * bias;
|
||||
dateobj->time->relative.s = intobj->diff->s * bias;
|
||||
dateobj->time->relative.weekday = 0;
|
||||
dateobj->time->relative.have_weekday_relative = 0;
|
||||
}
|
||||
dateobj->time->have_relative = 1;
|
||||
dateobj->time->sse_uptodate = 0;
|
||||
@@ -2907,6 +2906,7 @@ PHP_FUNCTION(date_sub)
|
||||
bias = -1;
|
||||
}
|
||||
|
||||
memset(&dateobj->time->relative, 0, sizeof(struct timelib_rel_time));
|
||||
dateobj->time->relative.y = 0 - (intobj->diff->y * bias);
|
||||
dateobj->time->relative.m = 0 - (intobj->diff->m * bias);
|
||||
dateobj->time->relative.d = 0 - (intobj->diff->d * bias);
|
||||
@@ -2914,8 +2914,6 @@ PHP_FUNCTION(date_sub)
|
||||
dateobj->time->relative.i = 0 - (intobj->diff->i * bias);
|
||||
dateobj->time->relative.s = 0 - (intobj->diff->s * bias);
|
||||
dateobj->time->have_relative = 1;
|
||||
dateobj->time->relative.weekday = 0;
|
||||
dateobj->time->relative.have_weekday_relative = 0;
|
||||
dateobj->time->sse_uptodate = 0;
|
||||
|
||||
timelib_update_ts(dateobj->time, NULL);
|
||||
@@ -3769,7 +3767,7 @@ PHP_METHOD(DatePeriod, __construct)
|
||||
dpobj = zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||
dpobj->current = NULL;
|
||||
|
||||
if (isostr_len) {
|
||||
if (isostr) {
|
||||
date_period_initialize(&(dpobj->start), &(dpobj->end), &(dpobj->interval), &recurrences, isostr, isostr_len TSRMLS_CC);
|
||||
if (dpobj->start == NULL) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "The ISO interval '%s' did not contain a start date.", isostr);
|
||||
|
||||
@@ -10,6 +10,7 @@ Daniel Convissor <danielc@php.net>
|
||||
<?php if (!method_exists('DateInterval', 'format')) die("skip: method doesn't exist"); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
date_default_timezone_set('UTC');
|
||||
|
||||
$date1 = new DateTime('2000-01-01 00:00:00');
|
||||
$date2 = new DateTime('2001-03-04 04:05:06');
|
||||
|
||||
@@ -3,8 +3,13 @@ DateInterval::format(), %a
|
||||
--CREDITS--
|
||||
Daniel Convissor <danielc@php.net>
|
||||
# TestFest 2010 BKTK
|
||||
--INI--
|
||||
date.timezone=UTC
|
||||
--SKIPIF--
|
||||
<?php if (!method_exists('DateInterval', 'format')) die("skip: method doesn't exist"); ?>
|
||||
<?php
|
||||
if (!method_exists('DateInterval', 'format')) die("skip: method doesn't exist");
|
||||
if (substr(PHP_OS, 0, 3) != 'WIN') die("skip this test is for Windows platforms only");
|
||||
?>
|
||||
--XFAIL--
|
||||
Windows VC6 libs' floor()/ceil() choke on floats
|
||||
--FILE--
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
--TEST--
|
||||
DateTime::add() -- dates
|
||||
--CREDITS--
|
||||
Daniel Convissor <danielc@php.net>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
require 'examine_diff.inc';
|
||||
define('PHPT_DATETIME_SHOW', PHPT_DATETIME_SHOW_ADD);
|
||||
require 'DateTime_data-dates.inc';
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
test__7: ADD: 2009-01-07 00:00:00 EST + P+0Y0M7DT0H0M0S = **2009-01-14 00:00:00 EST**
|
||||
test_years_positive__7_by_0_day: ADD: 2000-02-07 00:00:00 EST + P+7Y0M0DT0H0M0S = **2007-02-07 00:00:00 EST**
|
||||
test_years_positive__7_by_1_day: ADD: 2000-02-07 00:00:00 EST + P+7Y0M1DT0H0M0S = **2007-02-08 00:00:00 EST**
|
||||
test_years_positive__6_shy_1_day: ADD: 2000-02-07 00:00:00 EST + P+6Y11M30DT0H0M0S = **2007-02-06 00:00:00 EST**
|
||||
test_years_positive__7_by_1_month: ADD: 2000-02-07 00:00:00 EST + P+7Y1M0DT0H0M0S = **2007-03-07 00:00:00 EST**
|
||||
test_years_positive__6_shy_1_month: ADD: 2000-02-07 00:00:00 EST + P+6Y11M0DT0H0M0S = **2007-01-07 00:00:00 EST**
|
||||
test_years_positive__7_by_1_month_split_newyear: ADD: 1999-12-07 00:00:00 EST + P+7Y1M0DT0H0M0S = **2007-01-07 00:00:00 EST**
|
||||
test_years_positive__6_shy_1_month_split_newyear: ADD: 2000-01-07 00:00:00 EST + P+6Y11M0DT0H0M0S = **2006-12-07 00:00:00 EST**
|
||||
test_negative__7: ADD: 2009-01-14 00:00:00 EST + P-0Y0M7DT0H0M0S = **2009-01-07 00:00:00 EST**
|
||||
test_years_negative__7_by_0_day: ADD: 2007-02-07 00:00:00 EST + P-7Y0M0DT0H0M0S = **2000-02-07 00:00:00 EST**
|
||||
test_years_negative__7_by_1_day: ADD: 2007-02-08 00:00:00 EST + P-7Y0M1DT0H0M0S = **2000-02-07 00:00:00 EST**
|
||||
test_years_negative__6_shy_1_day: ADD: 2007-02-06 00:00:00 EST + P-6Y11M28DT0H0M0S = **2000-02-07 00:00:00 EST**
|
||||
test_years_negative__7_by_1_month: ADD: 2007-03-07 00:00:00 EST + P-7Y1M0DT0H0M0S = **2000-02-07 00:00:00 EST**
|
||||
test_years_negative__6_shy_1_month: ADD: 2007-01-07 00:00:00 EST + P-6Y11M0DT0H0M0S = **2000-02-07 00:00:00 EST**
|
||||
test_years_negative__7_by_1_month_split_newyear: ADD: 2007-01-07 00:00:00 EST + P-7Y1M0DT0H0M0S = **1999-12-07 00:00:00 EST**
|
||||
test_years_negative__6_shy_1_month_split_newyear: ADD: 2006-12-07 00:00:00 EST + P-6Y11M0DT0H0M0S = **2000-01-07 00:00:00 EST**
|
||||
@@ -0,0 +1,51 @@
|
||||
--TEST--
|
||||
DateTime::add() -- fall type2 type2
|
||||
--CREDITS--
|
||||
Daniel Convissor <danielc@php.net>
|
||||
--XFAIL--
|
||||
Various bugs exist
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
require 'examine_diff.inc';
|
||||
define('PHPT_DATETIME_SHOW', PHPT_DATETIME_SHOW_ADD);
|
||||
require 'DateTime_data-fall-type2-type2.inc';
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
test_time_fall_type2_prev_type2_prev: ADD: 2010-10-04 02:18:48 EDT + P+0Y1M2DT16H19M40S = **2010-11-06 18:38:28 EDT**
|
||||
test_time_fall_type2_prev_type2_dt: ADD: 2010-11-06 18:38:28 EDT + P+0Y0M0DT5H31M52S = **2010-11-07 00:10:20 EDT**
|
||||
test_time_fall_type2_prev_type2_redodt: ADD: 2010-11-06 18:38:28 EDT + P+0Y0M0DT6H34M5S = **2010-11-07 01:12:33 EDT**
|
||||
test_time_fall_type2_prev_type2_redost: ADD: 2010-11-06 18:38:28 EDT + P+0Y0M0DT7H36M16S = **2010-11-07 01:14:44 EST**
|
||||
test_time_fall_type2_prev_type2_st: ADD: 2010-11-06 18:38:28 EDT + P+0Y0M0DT9H38M27S = **2010-11-07 03:16:55 EST**
|
||||
test_time_fall_type2_prev_type2_post: ADD: 2010-11-06 18:38:28 EDT + P+0Y0M2DT1H21M31S = **2010-11-08 19:59:59 EST**
|
||||
test_time_fall_type2_dt_type2_prev: ADD: 2010-11-07 00:10:20 EDT + P-0Y0M0DT5H31M52S = **2010-11-06 18:38:28 EDT**
|
||||
test_time_fall_type2_dt_type2_dt: ADD: 2010-11-07 00:10:20 EDT + P+0Y0M0DT0H5M15S = **2010-11-07 00:15:35 EDT**
|
||||
test_time_fall_type2_dt_type2_redodt: ADD: 2010-11-07 00:10:20 EDT + P+0Y0M0DT1H2M13S = **2010-11-07 01:12:33 EDT**
|
||||
test_time_fall_type2_dt_type2_redost: ADD: 2010-11-07 00:10:20 EDT + P+0Y0M0DT2H4M24S = **2010-11-07 01:14:44 EST**
|
||||
test_time_fall_type2_dt_type2_st: ADD: 2010-11-07 00:10:20 EDT + P+0Y0M0DT4H6M35S = **2010-11-07 03:16:55 EST**
|
||||
test_time_fall_type2_dt_type2_post: ADD: 2010-11-07 00:10:20 EDT + P+0Y0M1DT20H49M39S = **2010-11-08 19:59:59 EST**
|
||||
test_time_fall_type2_redodt_type2_prev: ADD: 2010-11-07 01:12:33 EDT + P-0Y0M0DT6H34M5S = **2010-11-06 18:38:28 EDT**
|
||||
test_time_fall_type2_redodt_type2_dt: ADD: 2010-11-07 01:12:33 EDT + P-0Y0M0DT1H2M13S = **2010-11-07 00:10:20 EDT**
|
||||
test_time_fall_type2_redodt_type2_redodt: ADD: 2010-11-07 01:12:33 EDT + P+0Y0M0DT0H3M2S = **2010-11-07 01:15:35 EDT**
|
||||
test_time_fall_type2_redodt_type2_redost: ADD: 2010-11-07 01:12:33 EDT + P+0Y0M0DT1H2M11S = **2010-11-07 01:14:44 EST**
|
||||
test_time_fall_type2_redodt_type2_st: ADD: 2010-11-07 01:12:33 EDT + P+0Y0M0DT3H4M22S = **2010-11-07 03:16:55 EST**
|
||||
test_time_fall_type2_redodt_type2_post: ADD: 2010-11-07 01:12:33 EDT + P+0Y0M1DT19H47M26S = **2010-11-08 19:59:59 EST**
|
||||
test_time_fall_type2_redost_type2_prev: ADD: 2010-11-07 01:14:44 EST + P-0Y0M0DT7H36M16S = **2010-11-06 18:38:28 EDT**
|
||||
test_time_fall_type2_redost_type2_dt: ADD: 2010-11-07 01:14:44 EST + P-0Y0M0DT2H4M24S = **2010-11-07 00:10:20 EDT**
|
||||
test_time_fall_type2_redost_type2_redodt: ADD: 2010-11-07 01:14:44 EST + P-0Y0M0DT1H2M11S = **2010-11-07 01:12:33 EDT**
|
||||
test_time_fall_type2_redost_type2_redost: ADD: 2010-11-07 01:14:44 EST + P+0Y0M0DT0H2M10S = **2010-11-07 01:16:54 EST**
|
||||
test_time_fall_type2_redost_type2_st: ADD: 2010-11-07 01:14:44 EST + P+0Y0M0DT2H2M11S = **2010-11-07 03:16:55 EST**
|
||||
test_time_fall_type2_redost_type2_post: ADD: 2010-11-07 01:14:44 EST + P+0Y0M1DT18H45M15S = **2010-11-08 19:59:59 EST**
|
||||
test_time_fall_type2_st_type2_prev: ADD: 2010-11-07 03:16:55 EST + P-0Y0M0DT9H38M27S = **2010-11-06 18:38:28 EDT**
|
||||
test_time_fall_type2_st_type2_dt: ADD: 2010-11-07 03:16:55 EST + P-0Y0M0DT4H6M35S = **2010-11-07 00:10:20 EDT**
|
||||
test_time_fall_type2_st_type2_redodt: ADD: 2010-11-07 03:16:55 EST + P-0Y0M0DT3H4M22S = **2010-11-07 01:12:33 EDT**
|
||||
test_time_fall_type2_st_type2_redost: ADD: 2010-11-07 03:16:55 EST + P-0Y0M0DT2H2M11S = **2010-11-07 01:14:44 EST**
|
||||
test_time_fall_type2_st_type2_st: ADD: 2010-11-07 03:16:55 EST + P+0Y0M0DT2H3M1S = **2010-11-07 05:19:56 EST**
|
||||
test_time_fall_type2_st_type2_post: ADD: 2010-11-07 03:16:55 EST + P+0Y0M1DT16H43M4S = **2010-11-08 19:59:59 EST**
|
||||
test_time_fall_type2_post_type2_prev: ADD: 2010-11-08 19:59:59 EST + P-0Y0M2DT1H21M31S = **2010-11-06 18:38:28 EDT**
|
||||
test_time_fall_type2_post_type2_dt: ADD: 2010-11-08 19:59:59 EST + P-0Y0M1DT20H49M39S = **2010-11-07 00:10:20 EDT**
|
||||
test_time_fall_type2_post_type2_redodt: ADD: 2010-11-08 19:59:59 EST + P-0Y0M1DT19H47M26S = **2010-11-07 01:12:33 EDT**
|
||||
test_time_fall_type2_post_type2_redost: ADD: 2010-11-08 19:59:59 EST + P-0Y0M1DT18H45M15S = **2010-11-07 01:14:44 EST**
|
||||
test_time_fall_type2_post_type2_st: ADD: 2010-11-08 19:59:59 EST + P-0Y0M1DT16H43M4S = **2010-11-07 03:16:55 EST**
|
||||
test_time_fall_type2_post_type2_post: ADD: 2010-11-08 18:57:55 EST + P+0Y0M0DT1H2M4S = **2010-11-08 19:59:59 EST**
|
||||
@@ -0,0 +1,51 @@
|
||||
--TEST--
|
||||
DateTime::add() -- fall type2 type3
|
||||
--CREDITS--
|
||||
Daniel Convissor <danielc@php.net>
|
||||
--XFAIL--
|
||||
Various bugs exist
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
require 'examine_diff.inc';
|
||||
define('PHPT_DATETIME_SHOW', PHPT_DATETIME_SHOW_ADD);
|
||||
require 'DateTime_data-fall-type2-type3.inc';
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
test_time_fall_type2_prev_type3_prev: ADD: 2010-10-04 02:18:48 EDT + P+0Y1M2DT16H19M40S = **2010-11-06 18:38:28 EDT**
|
||||
test_time_fall_type2_prev_type3_dt: ADD: 2010-11-06 18:38:28 EDT + P+0Y0M0DT5H31M52S = **2010-11-07 00:10:20 EDT**
|
||||
test_time_fall_type2_prev_type3_redodt: ADD: 2010-11-06 18:38:28 EDT + P+0Y0M0DT6H34M5S = **2010-11-07 01:12:33 EDT**
|
||||
test_time_fall_type2_prev_type3_redost: ADD: 2010-11-06 18:38:28 EDT + P+0Y0M0DT7H36M16S = **2010-11-07 01:14:44 EST**
|
||||
test_time_fall_type2_prev_type3_st: ADD: 2010-11-06 18:38:28 EDT + P+0Y0M0DT9H38M27S = **2010-11-07 03:16:55 EST**
|
||||
test_time_fall_type2_prev_type3_post: ADD: 2010-11-06 18:38:28 EDT + P+0Y0M2DT1H21M31S = **2010-11-08 19:59:59 EST**
|
||||
test_time_fall_type2_dt_type3_prev: ADD: 2010-11-07 00:10:20 EDT + P-0Y0M0DT5H31M52S = **2010-11-06 18:38:28 EDT**
|
||||
test_time_fall_type2_dt_type3_dt: ADD: 2010-11-07 00:10:20 EDT + P+0Y0M0DT0H5M15S = **2010-11-07 00:15:35 EDT**
|
||||
test_time_fall_type2_dt_type3_redodt: ADD: 2010-11-07 00:10:20 EDT + P+0Y0M0DT1H2M13S = **2010-11-07 01:12:33 EDT**
|
||||
test_time_fall_type2_dt_type3_redost: ADD: 2010-11-07 00:10:20 EDT + P+0Y0M0DT2H4M24S = **2010-11-07 01:14:44 EST**
|
||||
test_time_fall_type2_dt_type3_st: ADD: 2010-11-07 00:10:20 EDT + P+0Y0M0DT4H6M35S = **2010-11-07 03:16:55 EST**
|
||||
test_time_fall_type2_dt_type3_post: ADD: 2010-11-07 00:10:20 EDT + P+0Y0M1DT20H49M39S = **2010-11-08 19:59:59 EST**
|
||||
test_time_fall_type2_redodt_type3_prev: ADD: 2010-11-07 01:12:33 EDT + P-0Y0M0DT6H34M5S = **2010-11-06 18:38:28 EDT**
|
||||
test_time_fall_type2_redodt_type3_dt: ADD: 2010-11-07 01:12:33 EDT + P-0Y0M0DT1H2M13S = **2010-11-07 00:10:20 EDT**
|
||||
test_time_fall_type2_redodt_type3_redodt: ADD: 2010-11-07 01:12:33 EDT + P+0Y0M0DT0H3M2S = **2010-11-07 01:15:35 EDT**
|
||||
test_time_fall_type2_redodt_type3_redost: ADD: 2010-11-07 01:12:33 EDT + P+0Y0M0DT1H2M11S = **2010-11-07 01:14:44 EST**
|
||||
test_time_fall_type2_redodt_type3_st: ADD: 2010-11-07 01:12:33 EDT + P+0Y0M0DT3H4M22S = **2010-11-07 03:16:55 EST**
|
||||
test_time_fall_type2_redodt_type3_post: ADD: 2010-11-07 01:12:33 EDT + P+0Y0M1DT19H47M26S = **2010-11-08 19:59:59 EST**
|
||||
test_time_fall_type2_redost_type3_prev: ADD: 2010-11-07 01:14:44 EST + P-0Y0M0DT7H36M16S = **2010-11-06 18:38:28 EDT**
|
||||
test_time_fall_type2_redost_type3_dt: ADD: 2010-11-07 01:14:44 EST + P-0Y0M0DT2H4M24S = **2010-11-07 00:10:20 EDT**
|
||||
test_time_fall_type2_redost_type3_redodt: ADD: 2010-11-07 01:14:44 EST + P-0Y0M0DT1H2M11S = **2010-11-07 01:12:33 EDT**
|
||||
test_time_fall_type2_redost_type3_redost: ADD: 2010-11-07 01:14:44 EST + P+0Y0M0DT0H2M10S = **2010-11-07 01:16:54 EST**
|
||||
test_time_fall_type2_redost_type3_st: ADD: 2010-11-07 01:14:44 EST + P+0Y0M0DT2H2M11S = **2010-11-07 03:16:55 EST**
|
||||
test_time_fall_type2_redost_type3_post: ADD: 2010-11-07 01:14:44 EST + P+0Y0M1DT18H45M15S = **2010-11-08 19:59:59 EST**
|
||||
test_time_fall_type2_st_type3_prev: ADD: 2010-11-07 03:16:55 EST + P-0Y0M0DT9H38M27S = **2010-11-06 18:38:28 EDT**
|
||||
test_time_fall_type2_st_type3_dt: ADD: 2010-11-07 03:16:55 EST + P-0Y0M0DT4H6M35S = **2010-11-07 00:10:20 EDT**
|
||||
test_time_fall_type2_st_type3_redodt: ADD: 2010-11-07 03:16:55 EST + P-0Y0M0DT3H4M22S = **2010-11-07 01:12:33 EDT**
|
||||
test_time_fall_type2_st_type3_redost: ADD: 2010-11-07 03:16:55 EST + P-0Y0M0DT2H2M11S = **2010-11-07 01:14:44 EST**
|
||||
test_time_fall_type2_st_type3_st: ADD: 2010-11-07 03:16:55 EST + P+0Y0M0DT2H3M1S = **2010-11-07 05:19:56 EST**
|
||||
test_time_fall_type2_st_type3_post: ADD: 2010-11-07 03:16:55 EST + P+0Y0M1DT16H43M4S = **2010-11-08 19:59:59 EST**
|
||||
test_time_fall_type2_post_type3_prev: ADD: 2010-11-08 19:59:59 EST + P-0Y0M2DT1H21M31S = **2010-11-06 18:38:28 EDT**
|
||||
test_time_fall_type2_post_type3_dt: ADD: 2010-11-08 19:59:59 EST + P-0Y0M1DT20H49M39S = **2010-11-07 00:10:20 EDT**
|
||||
test_time_fall_type2_post_type3_redodt: ADD: 2010-11-08 19:59:59 EST + P-0Y0M1DT19H47M26S = **2010-11-07 01:12:33 EDT**
|
||||
test_time_fall_type2_post_type3_redost: ADD: 2010-11-08 19:59:59 EST + P-0Y0M1DT18H45M15S = **2010-11-07 01:14:44 EST**
|
||||
test_time_fall_type2_post_type3_st: ADD: 2010-11-08 19:59:59 EST + P-0Y0M1DT16H43M4S = **2010-11-07 03:16:55 EST**
|
||||
test_time_fall_type2_post_type3_post: ADD: 2010-11-08 18:57:55 EST + P+0Y0M0DT1H2M4S = **2010-11-08 19:59:59 EST**
|
||||
@@ -0,0 +1,51 @@
|
||||
--TEST--
|
||||
DateTime::add() -- fall type3 type2
|
||||
--CREDITS--
|
||||
Daniel Convissor <danielc@php.net>
|
||||
--XFAIL--
|
||||
Various bugs exist
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
require 'examine_diff.inc';
|
||||
define('PHPT_DATETIME_SHOW', PHPT_DATETIME_SHOW_ADD);
|
||||
require 'DateTime_data-fall-type3-type2.inc';
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
test_time_fall_type3_prev_type2_prev: ADD: 2010-10-04 02:18:48 EDT + P+0Y1M2DT16H19M40S = **2010-11-06 18:38:28 EDT**
|
||||
test_time_fall_type3_prev_type2_dt: ADD: 2010-11-06 18:38:28 EDT + P+0Y0M0DT5H31M52S = **2010-11-07 00:10:20 EDT**
|
||||
test_time_fall_type3_prev_type2_redodt: ADD: 2010-11-06 18:38:28 EDT + P+0Y0M0DT6H34M5S = **2010-11-07 01:12:33 EDT**
|
||||
test_time_fall_type3_prev_type2_redost: ADD: 2010-11-06 18:38:28 EDT + P+0Y0M0DT7H36M16S = **2010-11-07 01:14:44 EST**
|
||||
test_time_fall_type3_prev_type2_st: ADD: 2010-11-06 18:38:28 EDT + P+0Y0M0DT9H38M27S = **2010-11-07 03:16:55 EST**
|
||||
test_time_fall_type3_prev_type2_post: ADD: 2010-11-06 18:38:28 EDT + P+0Y0M2DT1H21M31S = **2010-11-08 19:59:59 EST**
|
||||
test_time_fall_type3_dt_type2_prev: ADD: 2010-11-07 00:10:20 EDT + P-0Y0M0DT5H31M52S = **2010-11-06 18:38:28 EDT**
|
||||
test_time_fall_type3_dt_type2_dt: ADD: 2010-11-07 00:10:20 EDT + P+0Y0M0DT0H5M15S = **2010-11-07 00:15:35 EDT**
|
||||
test_time_fall_type3_dt_type2_redodt: ADD: 2010-11-07 00:10:20 EDT + P+0Y0M0DT1H2M13S = **2010-11-07 01:12:33 EDT**
|
||||
test_time_fall_type3_dt_type2_redost: ADD: 2010-11-07 00:10:20 EDT + P+0Y0M0DT2H4M24S = **2010-11-07 01:14:44 EST**
|
||||
test_time_fall_type3_dt_type2_st: ADD: 2010-11-07 00:10:20 EDT + P+0Y0M0DT4H6M35S = **2010-11-07 03:16:55 EST**
|
||||
test_time_fall_type3_dt_type2_post: ADD: 2010-11-07 00:10:20 EDT + P+0Y0M1DT20H49M39S = **2010-11-08 19:59:59 EST**
|
||||
test_time_fall_type3_redodt_type2_prev: ADD: 2010-11-07 01:12:33 EDT + P-0Y0M0DT6H34M5S = **2010-11-06 18:38:28 EDT**
|
||||
test_time_fall_type3_redodt_type2_dt: ADD: 2010-11-07 01:12:33 EDT + P-0Y0M0DT1H2M13S = **2010-11-07 00:10:20 EDT**
|
||||
test_time_fall_type3_redodt_type2_redodt: ADD: 2010-11-07 01:12:33 EDT + P+0Y0M0DT0H3M2S = **2010-11-07 01:15:35 EDT**
|
||||
test_time_fall_type3_redodt_type2_redost: ADD: 2010-11-07 01:12:33 EDT + P+0Y0M0DT1H2M11S = **2010-11-07 01:14:44 EST**
|
||||
test_time_fall_type3_redodt_type2_st: ADD: 2010-11-07 01:12:33 EDT + P+0Y0M0DT3H4M22S = **2010-11-07 03:16:55 EST**
|
||||
test_time_fall_type3_redodt_type2_post: ADD: 2010-11-07 01:12:33 EDT + P+0Y0M1DT19H47M26S = **2010-11-08 19:59:59 EST**
|
||||
test_time_fall_type3_redost_type2_prev: ADD: 2010-11-07 01:14:44 EST + P-0Y0M0DT7H36M16S = **2010-11-06 18:38:28 EDT**
|
||||
test_time_fall_type3_redost_type2_dt: ADD: 2010-11-07 01:14:44 EST + P-0Y0M0DT2H4M24S = **2010-11-07 00:10:20 EDT**
|
||||
test_time_fall_type3_redost_type2_redodt: ADD: 2010-11-07 01:14:44 EST + P-0Y0M0DT1H2M11S = **2010-11-07 01:12:33 EDT**
|
||||
test_time_fall_type3_redost_type2_redost: ADD: 2010-11-07 01:14:44 EST + P+0Y0M0DT0H2M10S = **2010-11-07 01:16:54 EST**
|
||||
test_time_fall_type3_redost_type2_st: ADD: 2010-11-07 01:14:44 EST + P+0Y0M0DT2H2M11S = **2010-11-07 03:16:55 EST**
|
||||
test_time_fall_type3_redost_type2_post: ADD: 2010-11-07 01:14:44 EST + P+0Y0M1DT18H45M15S = **2010-11-08 19:59:59 EST**
|
||||
test_time_fall_type3_st_type2_prev: ADD: 2010-11-07 03:16:55 EST + P-0Y0M0DT9H38M27S = **2010-11-06 18:38:28 EDT**
|
||||
test_time_fall_type3_st_type2_dt: ADD: 2010-11-07 03:16:55 EST + P-0Y0M0DT4H6M35S = **2010-11-07 00:10:20 EDT**
|
||||
test_time_fall_type3_st_type2_redodt: ADD: 2010-11-07 03:16:55 EST + P-0Y0M0DT3H4M22S = **2010-11-07 01:12:33 EDT**
|
||||
test_time_fall_type3_st_type2_redost: ADD: 2010-11-07 03:16:55 EST + P-0Y0M0DT2H2M11S = **2010-11-07 01:14:44 EST**
|
||||
test_time_fall_type3_st_type2_st: ADD: 2010-11-07 03:16:55 EST + P+0Y0M0DT2H3M1S = **2010-11-07 05:19:56 EST**
|
||||
test_time_fall_type3_st_type2_post: ADD: 2010-11-07 03:16:55 EST + P+0Y0M1DT16H43M4S = **2010-11-08 19:59:59 EST**
|
||||
test_time_fall_type3_post_type2_prev: ADD: 2010-11-08 19:59:59 EST + P-0Y0M2DT1H21M31S = **2010-11-06 18:38:28 EDT**
|
||||
test_time_fall_type3_post_type2_dt: ADD: 2010-11-08 19:59:59 EST + P-0Y0M1DT20H49M39S = **2010-11-07 00:10:20 EDT**
|
||||
test_time_fall_type3_post_type2_redodt: ADD: 2010-11-08 19:59:59 EST + P-0Y0M1DT19H47M26S = **2010-11-07 01:12:33 EDT**
|
||||
test_time_fall_type3_post_type2_redost: ADD: 2010-11-08 19:59:59 EST + P-0Y0M1DT18H45M15S = **2010-11-07 01:14:44 EST**
|
||||
test_time_fall_type3_post_type2_st: ADD: 2010-11-08 19:59:59 EST + P-0Y0M1DT16H43M4S = **2010-11-07 03:16:55 EST**
|
||||
test_time_fall_type3_post_type2_post: ADD: 2010-11-08 18:57:55 EST + P+0Y0M0DT1H2M4S = **2010-11-08 19:59:59 EST**
|
||||
@@ -0,0 +1,51 @@
|
||||
--TEST--
|
||||
DateTime::add() -- fall type3 type3
|
||||
--CREDITS--
|
||||
Daniel Convissor <danielc@php.net>
|
||||
--XFAIL--
|
||||
Various bugs exist
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
require 'examine_diff.inc';
|
||||
define('PHPT_DATETIME_SHOW', PHPT_DATETIME_SHOW_ADD);
|
||||
require 'DateTime_data-fall-type3-type3.inc';
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
test_time_fall_type3_prev_type3_prev: ADD: 2010-10-04 02:18:48 EDT + P+0Y1M2DT16H19M40S = **2010-11-06 18:38:28 EDT**
|
||||
test_time_fall_type3_prev_type3_dt: ADD: 2010-11-06 18:38:28 EDT + P+0Y0M0DT5H31M52S = **2010-11-07 00:10:20 EDT**
|
||||
test_time_fall_type3_prev_type3_redodt: ADD: 2010-11-06 18:38:28 EDT + P+0Y0M0DT6H34M5S = **2010-11-07 01:12:33 EDT**
|
||||
test_time_fall_type3_prev_type3_redost: ADD: 2010-11-06 18:38:28 EDT + P+0Y0M0DT7H36M16S = **2010-11-07 01:14:44 EST**
|
||||
test_time_fall_type3_prev_type3_st: ADD: 2010-11-06 18:38:28 EDT + P+0Y0M0DT9H38M27S = **2010-11-07 03:16:55 EST**
|
||||
test_time_fall_type3_prev_type3_post: ADD: 2010-11-06 18:38:28 EDT + P+0Y0M2DT1H21M31S = **2010-11-08 19:59:59 EST**
|
||||
test_time_fall_type3_dt_type3_prev: ADD: 2010-11-07 00:10:20 EDT + P-0Y0M0DT5H31M52S = **2010-11-06 18:38:28 EDT**
|
||||
test_time_fall_type3_dt_type3_dt: ADD: 2010-11-07 00:10:20 EDT + P+0Y0M0DT0H5M15S = **2010-11-07 00:15:35 EDT**
|
||||
test_time_fall_type3_dt_type3_redodt: ADD: 2010-11-07 00:10:20 EDT + P+0Y0M0DT1H2M13S = **2010-11-07 01:12:33 EDT**
|
||||
test_time_fall_type3_dt_type3_redost: ADD: 2010-11-07 00:10:20 EDT + P+0Y0M0DT2H4M24S = **2010-11-07 01:14:44 EST**
|
||||
test_time_fall_type3_dt_type3_st: ADD: 2010-11-07 00:10:20 EDT + P+0Y0M0DT4H6M35S = **2010-11-07 03:16:55 EST**
|
||||
test_time_fall_type3_dt_type3_post: ADD: 2010-11-07 00:10:20 EDT + P+0Y0M1DT20H49M39S = **2010-11-08 19:59:59 EST**
|
||||
test_time_fall_type3_redodt_type3_prev: ADD: 2010-11-07 01:12:33 EDT + P-0Y0M0DT6H34M5S = **2010-11-06 18:38:28 EDT**
|
||||
test_time_fall_type3_redodt_type3_dt: ADD: 2010-11-07 01:12:33 EDT + P-0Y0M0DT1H2M13S = **2010-11-07 00:10:20 EDT**
|
||||
test_time_fall_type3_redodt_type3_redodt: ADD: 2010-11-07 01:12:33 EDT + P+0Y0M0DT0H3M2S = **2010-11-07 01:15:35 EDT**
|
||||
test_time_fall_type3_redodt_type3_redost: ADD: 2010-11-07 01:12:33 EDT + P+0Y0M0DT1H2M11S = **2010-11-07 01:14:44 EST**
|
||||
test_time_fall_type3_redodt_type3_st: ADD: 2010-11-07 01:12:33 EDT + P+0Y0M0DT3H4M22S = **2010-11-07 03:16:55 EST**
|
||||
test_time_fall_type3_redodt_type3_post: ADD: 2010-11-07 01:12:33 EDT + P+0Y0M1DT19H47M26S = **2010-11-08 19:59:59 EST**
|
||||
test_time_fall_type3_redost_type3_prev: ADD: 2010-11-07 01:14:44 EST + P-0Y0M0DT7H36M16S = **2010-11-06 18:38:28 EDT**
|
||||
test_time_fall_type3_redost_type3_dt: ADD: 2010-11-07 01:14:44 EST + P-0Y0M0DT2H4M24S = **2010-11-07 00:10:20 EDT**
|
||||
test_time_fall_type3_redost_type3_redodt: ADD: 2010-11-07 01:14:44 EST + P-0Y0M0DT1H2M11S = **2010-11-07 01:12:33 EDT**
|
||||
test_time_fall_type3_redost_type3_redost: ADD: 2010-11-07 01:14:44 EST + P+0Y0M0DT0H2M10S = **2010-11-07 01:16:54 EST**
|
||||
test_time_fall_type3_redost_type3_st: ADD: 2010-11-07 01:14:44 EST + P+0Y0M0DT2H2M11S = **2010-11-07 03:16:55 EST**
|
||||
test_time_fall_type3_redost_type3_post: ADD: 2010-11-07 01:14:44 EST + P+0Y0M1DT18H45M15S = **2010-11-08 19:59:59 EST**
|
||||
test_time_fall_type3_st_type3_prev: ADD: 2010-11-07 03:16:55 EST + P-0Y0M0DT9H38M27S = **2010-11-06 18:38:28 EDT**
|
||||
test_time_fall_type3_st_type3_dt: ADD: 2010-11-07 03:16:55 EST + P-0Y0M0DT4H6M35S = **2010-11-07 00:10:20 EDT**
|
||||
test_time_fall_type3_st_type3_redodt: ADD: 2010-11-07 03:16:55 EST + P-0Y0M0DT3H4M22S = **2010-11-07 01:12:33 EDT**
|
||||
test_time_fall_type3_st_type3_redost: ADD: 2010-11-07 03:16:55 EST + P-0Y0M0DT2H2M11S = **2010-11-07 01:14:44 EST**
|
||||
test_time_fall_type3_st_type3_st: ADD: 2010-11-07 03:16:55 EST + P+0Y0M0DT2H3M1S = **2010-11-07 05:19:56 EST**
|
||||
test_time_fall_type3_st_type3_post: ADD: 2010-11-07 03:16:55 EST + P+0Y0M1DT16H43M4S = **2010-11-08 19:59:59 EST**
|
||||
test_time_fall_type3_post_type3_prev: ADD: 2010-11-08 19:59:59 EST + P-0Y0M2DT1H21M31S = **2010-11-06 18:38:28 EDT**
|
||||
test_time_fall_type3_post_type3_dt: ADD: 2010-11-08 19:59:59 EST + P-0Y0M1DT20H49M39S = **2010-11-07 00:10:20 EDT**
|
||||
test_time_fall_type3_post_type3_redodt: ADD: 2010-11-08 19:59:59 EST + P-0Y0M1DT19H47M26S = **2010-11-07 01:12:33 EDT**
|
||||
test_time_fall_type3_post_type3_redost: ADD: 2010-11-08 19:59:59 EST + P-0Y0M1DT18H45M15S = **2010-11-07 01:14:44 EST**
|
||||
test_time_fall_type3_post_type3_st: ADD: 2010-11-08 19:59:59 EST + P-0Y0M1DT16H43M4S = **2010-11-07 03:16:55 EST**
|
||||
test_time_fall_type3_post_type3_post: ADD: 2010-11-08 18:57:55 EST + P+0Y0M0DT1H2M4S = **2010-11-08 19:59:59 EST**
|
||||
@@ -0,0 +1,77 @@
|
||||
--TEST--
|
||||
DateTime::add() -- february
|
||||
--CREDITS--
|
||||
Daniel Convissor <danielc@php.net>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
require 'examine_diff.inc';
|
||||
define('PHPT_DATETIME_SHOW', PHPT_DATETIME_SHOW_ADD);
|
||||
require 'DateTime_data-february.inc';
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
test_bug_49081__1: ADD: 2010-03-01 00:00:00 EST + P+0Y0M30DT0H0M0S = **2010-03-31 00:00:00 EDT**
|
||||
test_bug_49081__2: ADD: 2010-03-01 00:00:00 EST + P+0Y1M0DT0H0M0S = **2010-04-01 00:00:00 EDT**
|
||||
test_bug_49081__3: ADD: 2010-03-31 00:00:00 EDT + P+0Y0M1DT0H0M0S = **2010-04-01 00:00:00 EDT**
|
||||
test_bug_49081__4: ADD: 2010-03-31 00:00:00 EDT + P+0Y0M29DT0H0M0S = **2010-04-29 00:00:00 EDT**
|
||||
test_bug_49081__5: ADD: 2010-03-31 00:00:00 EDT + P+0Y0M30DT0H0M0S = **2010-04-30 00:00:00 EDT**
|
||||
test_bug_49081__6: ADD: 2010-03-30 00:00:00 EDT + P+0Y1M0DT0H0M0S = **2010-04-30 00:00:00 EDT**
|
||||
test_bug_49081__7: ADD: 2010-03-29 00:00:00 EDT + P+0Y1M1DT0H0M0S = **2010-04-30 00:00:00 EDT**
|
||||
test_bug_49081__8: ADD: 2010-01-01 00:00:00 EST + P+0Y0M28DT0H0M0S = **2010-01-29 00:00:00 EST**
|
||||
test_bug_49081__9: ADD: 2010-01-01 00:00:00 EST + P+0Y0M29DT0H0M0S = **2010-01-30 00:00:00 EST**
|
||||
test_bug_49081__10: ADD: 2010-01-01 00:00:00 EST + P+0Y0M30DT0H0M0S = **2010-01-31 00:00:00 EST**
|
||||
test_bug_49081__11: ADD: 2010-01-01 00:00:00 EST + P+0Y1M0DT0H0M0S = **2010-02-01 00:00:00 EST**
|
||||
test_bug_49081__12: ADD: 2010-01-31 00:00:00 EST + P+0Y0M1DT0H0M0S = **2010-02-01 00:00:00 EST**
|
||||
test_bug_49081__13: ADD: 2010-01-31 00:00:00 EST + P+0Y0M27DT0H0M0S = **2010-02-27 00:00:00 EST**
|
||||
test_bug_49081__14: ADD: 2010-01-31 00:00:00 EST + P+0Y0M28DT0H0M0S = **2010-02-28 00:00:00 EST**
|
||||
test_bug_49081__15: ADD: 2010-01-30 00:00:00 EST + P+0Y0M29DT0H0M0S = **2010-02-28 00:00:00 EST**
|
||||
test_bug_49081__16: ADD: 2010-01-29 00:00:00 EST + P+0Y0M30DT0H0M0S = **2010-02-28 00:00:00 EST**
|
||||
test_bug_49081__17: ADD: 2010-01-28 00:00:00 EST + P+0Y1M0DT0H0M0S = **2010-02-28 00:00:00 EST**
|
||||
test_bug_49081__18: ADD: 2010-01-27 00:00:00 EST + P+0Y1M1DT0H0M0S = **2010-02-28 00:00:00 EST**
|
||||
test_bug_49081__19: ADD: 2010-01-01 00:00:00 EST + P+0Y2M0DT0H0M0S = **2010-03-01 00:00:00 EST**
|
||||
test_bug_49081__20: ADD: 2010-01-31 00:00:00 EST + P+0Y0M29DT0H0M0S = **2010-03-01 00:00:00 EST**
|
||||
test_bug_49081__21: ADD: 2010-01-31 00:00:00 EST + P+0Y1M24DT0H0M0S = **2010-03-27 00:00:00 EDT**
|
||||
test_bug_49081__22: ADD: 2010-01-31 00:00:00 EST + P+0Y1M25DT0H0M0S = **2010-03-28 00:00:00 EDT**
|
||||
test_bug_49081__23: ADD: 2010-01-31 00:00:00 EST + P+0Y1M26DT0H0M0S = **2010-03-29 00:00:00 EDT**
|
||||
test_bug_49081__24: ADD: 2010-01-31 00:00:00 EST + P+0Y1M27DT0H0M0S = **2010-03-30 00:00:00 EDT**
|
||||
test_bug_49081__25: ADD: 2010-01-31 00:00:00 EST + P+0Y2M0DT0H0M0S = **2010-03-31 00:00:00 EDT**
|
||||
test_bug_49081__26: ADD: 2010-01-30 00:00:00 EST + P+0Y2M1DT0H0M0S = **2010-03-31 00:00:00 EDT**
|
||||
test_bug_49081__27: ADD: 2009-01-01 00:00:00 EST + P+0Y0M30DT0H0M0S = **2009-01-31 00:00:00 EST**
|
||||
test_bug_49081__28: ADD: 2010-02-28 00:00:00 EST + P+0Y0M27DT0H0M0S = **2010-03-27 00:00:00 EDT**
|
||||
test_bug_49081__29: ADD: 2010-02-28 00:00:00 EST + P+0Y1M0DT0H0M0S = **2010-03-28 00:00:00 EDT**
|
||||
test_bug_49081__30: ADD: 2010-02-28 00:00:00 EST + P+0Y1M1DT0H0M0S = **2010-03-29 00:00:00 EDT**
|
||||
test_bug_49081__31: ADD: 2010-02-27 00:00:00 EST + P+0Y1M0DT0H0M0S = **2010-03-27 00:00:00 EDT**
|
||||
test_bug_49081__32: ADD: 2010-02-26 00:00:00 EST + P+0Y1M1DT0H0M0S = **2010-03-27 00:00:00 EDT**
|
||||
test_bug_49081_negative__1: ADD: 2010-03-31 00:00:00 EDT + P-0Y0M30DT0H0M0S = **2010-03-01 00:00:00 EST**
|
||||
test_bug_49081_negative__2: ADD: 2010-04-01 00:00:00 EDT + P-0Y1M0DT0H0M0S = **2010-03-01 00:00:00 EST**
|
||||
test_bug_49081_negative__3: ADD: 2010-04-01 00:00:00 EDT + P-0Y0M1DT0H0M0S = **2010-03-31 00:00:00 EDT**
|
||||
test_bug_49081_negative__4: ADD: 2010-04-29 00:00:00 EDT + P-0Y0M29DT0H0M0S = **2010-03-31 00:00:00 EDT**
|
||||
test_bug_49081_negative__5: ADD: 2010-04-30 00:00:00 EDT + P-0Y0M30DT0H0M0S = **2010-03-31 00:00:00 EDT**
|
||||
test_bug_49081_negative__6: ADD: 2010-04-30 00:00:00 EDT + P-0Y1M0DT0H0M0S = **2010-03-30 00:00:00 EDT**
|
||||
test_bug_49081_negative__7: ADD: 2010-04-30 00:00:00 EDT + P-0Y1M1DT0H0M0S = **2010-03-29 00:00:00 EDT**
|
||||
test_bug_49081_negative__8: ADD: 2010-01-29 00:00:00 EST + P-0Y0M28DT0H0M0S = **2010-01-01 00:00:00 EST**
|
||||
test_bug_49081_negative__9: ADD: 2010-01-30 00:00:00 EST + P-0Y0M29DT0H0M0S = **2010-01-01 00:00:00 EST**
|
||||
test_bug_49081_negative__10: ADD: 2010-01-31 00:00:00 EST + P-0Y0M30DT0H0M0S = **2010-01-01 00:00:00 EST**
|
||||
test_bug_49081_negative__11: ADD: 2010-02-01 00:00:00 EST + P-0Y1M0DT0H0M0S = **2010-01-01 00:00:00 EST**
|
||||
test_bug_49081_negative__12: ADD: 2010-02-01 00:00:00 EST + P-0Y0M1DT0H0M0S = **2010-01-31 00:00:00 EST**
|
||||
test_bug_49081_negative__13: ADD: 2010-02-27 00:00:00 EST + P-0Y0M27DT0H0M0S = **2010-01-31 00:00:00 EST**
|
||||
test_bug_49081_negative__14: ADD: 2010-02-28 00:00:00 EST + P-0Y0M28DT0H0M0S = **2010-01-31 00:00:00 EST**
|
||||
test_bug_49081_negative__15: ADD: 2010-02-28 00:00:00 EST + P-0Y0M29DT0H0M0S = **2010-01-30 00:00:00 EST**
|
||||
test_bug_49081_negative__16: ADD: 2010-02-28 00:00:00 EST + P-0Y0M30DT0H0M0S = **2010-01-29 00:00:00 EST**
|
||||
test_bug_49081_negative__17: ADD: 2010-02-28 00:00:00 EST + P-0Y1M0DT0H0M0S = **2010-01-28 00:00:00 EST**
|
||||
test_bug_49081_negative__18: ADD: 2010-02-28 00:00:00 EST + P-0Y1M1DT0H0M0S = **2010-01-27 00:00:00 EST**
|
||||
test_bug_49081_negative__19: ADD: 2010-03-01 00:00:00 EST + P-0Y2M0DT0H0M0S = **2010-01-01 00:00:00 EST**
|
||||
test_bug_49081_negative__20: ADD: 2010-03-01 00:00:00 EST + P-0Y1M1DT0H0M0S = **2010-01-31 00:00:00 EST**
|
||||
test_bug_49081_negative__21: ADD: 2010-03-27 00:00:00 EDT + P-0Y1M27DT0H0M0S = **2010-01-31 00:00:00 EST**
|
||||
test_bug_49081_negative__22: ADD: 2010-03-28 00:00:00 EDT + P-0Y1M28DT0H0M0S = **2010-01-31 00:00:00 EST**
|
||||
test_bug_49081_negative__23: ADD: 2010-03-29 00:00:00 EDT + P-0Y1M29DT0H0M0S = **2010-01-31 00:00:00 EST**
|
||||
test_bug_49081_negative__24: ADD: 2010-03-30 00:00:00 EDT + P-0Y1M30DT0H0M0S = **2010-01-31 00:00:00 EST**
|
||||
test_bug_49081_negative__25: ADD: 2010-03-31 00:00:00 EDT + P-0Y2M0DT0H0M0S = **2010-01-31 00:00:00 EST**
|
||||
test_bug_49081_negative__26: ADD: 2010-03-31 00:00:00 EDT + P-0Y2M1DT0H0M0S = **2010-01-30 00:00:00 EST**
|
||||
test_bug_49081_negative__27: ADD: 2009-01-31 00:00:00 EST + P-0Y0M30DT0H0M0S = **2009-01-01 00:00:00 EST**
|
||||
test_bug_49081_negative__28: ADD: 2010-03-27 00:00:00 EDT + P-0Y0M27DT0H0M0S = **2010-02-28 00:00:00 EST**
|
||||
test_bug_49081_negative__29: ADD: 2010-03-28 00:00:00 EDT + P-0Y1M0DT0H0M0S = **2010-02-28 00:00:00 EST**
|
||||
test_bug_49081_negative__30: ADD: 2010-03-29 00:00:00 EDT + P-0Y1M1DT0H0M0S = **2010-02-28 00:00:00 EST**
|
||||
test_bug_49081_negative__31: ADD: 2010-03-27 00:00:00 EDT + P-0Y1M0DT0H0M0S = **2010-02-27 00:00:00 EST**
|
||||
test_bug_49081_negative__32: ADD: 2010-03-27 00:00:00 EDT + P-0Y1M1DT0H0M0S = **2010-02-26 00:00:00 EST**
|
||||
@@ -0,0 +1,15 @@
|
||||
--TEST--
|
||||
DateTime::add() -- massive
|
||||
--CREDITS--
|
||||
Daniel Convissor <danielc@php.net>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
require 'examine_diff.inc';
|
||||
define('PHPT_DATETIME_SHOW', PHPT_DATETIME_SHOW_ADD);
|
||||
require 'DateTime_data-massive.inc';
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
test_massive_positive: ADD: -333333-01-01 16:18:02 EST + P+666666Y0M0DT0H0M0S = **333333-01-01 16:18:02 EST**
|
||||
test_massive_negative: ADD: 333333-01-01 16:18:02 EST + P-666666Y0M0DT0H0M0S = **-333333-01-01 16:18:02 EST**
|
||||
@@ -0,0 +1,31 @@
|
||||
--TEST--
|
||||
DateTime::add() -- spring type2 type2
|
||||
--CREDITS--
|
||||
Daniel Convissor <danielc@php.net>
|
||||
--XFAIL--
|
||||
Various bugs exist
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
require 'examine_diff.inc';
|
||||
define('PHPT_DATETIME_SHOW', PHPT_DATETIME_SHOW_ADD);
|
||||
require 'DateTime_data-spring-type2-type2.inc';
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
test_time_spring_type2_prev_type2_prev: ADD: 2010-02-11 02:18:48 EST + P+0Y1M2DT16H19M40S = **2010-03-13 18:38:28 EST**
|
||||
test_time_spring_type2_prev_type2_st: ADD: 2010-03-13 18:38:28 EST + P+0Y0M0DT5H31M52S = **2010-03-14 00:10:20 EST**
|
||||
test_time_spring_type2_prev_type2_dt: ADD: 2010-03-13 18:38:28 EST + P+0Y0M0DT7H38M27S = **2010-03-14 03:16:55 EDT**
|
||||
test_time_spring_type2_prev_type2_post: ADD: 2010-03-13 18:38:28 EST + P+0Y0M2DT1H21M31S = **2010-03-15 19:59:59 EDT**
|
||||
test_time_spring_type2_st_type2_prev: ADD: 2010-03-14 00:10:20 EST + P-0Y0M0DT5H31M52S = **2010-03-13 18:38:28 EST**
|
||||
test_time_spring_type2_st_type2_st: ADD: 2010-03-14 00:10:20 EST + P+0Y0M0DT0H5M15S = **2010-03-14 00:15:35 EST**
|
||||
test_time_spring_type2_st_type2_dt: ADD: 2010-03-14 00:10:20 EST + P+0Y0M0DT2H6M35S = **2010-03-14 03:16:55 EDT**
|
||||
test_time_spring_type2_st_type2_post: ADD: 2010-03-14 00:10:20 EST + P+0Y0M1DT18H49M39S = **2010-03-15 19:59:59 EDT**
|
||||
test_time_spring_type2_dt_type2_prev: ADD: 2010-03-14 03:16:55 EDT + P-0Y0M0DT7H38M27S = **2010-03-13 18:38:28 EST**
|
||||
test_time_spring_type2_dt_type2_st: ADD: 2010-03-14 03:16:55 EDT + P-0Y0M0DT2H6M35S = **2010-03-14 00:10:20 EST**
|
||||
test_time_spring_type2_dt_type2_dt: ADD: 2010-03-14 03:16:55 EDT + P+0Y0M0DT2H3M1S = **2010-03-14 05:19:56 EDT**
|
||||
test_time_spring_type2_dt_type2_post: ADD: 2010-03-14 03:16:55 EDT + P+0Y0M1DT16H43M4S = **2010-03-15 19:59:59 EDT**
|
||||
test_time_spring_type2_post_type2_prev: ADD: 2010-03-15 19:59:59 EDT + P-0Y0M2DT1H21M31S = **2010-03-13 18:38:28 EST**
|
||||
test_time_spring_type2_post_type2_st: ADD: 2010-03-15 19:59:59 EDT + P-0Y0M1DT18H49M39S = **2010-03-14 00:10:20 EST**
|
||||
test_time_spring_type2_post_type2_dt: ADD: 2010-03-15 19:59:59 EDT + P-0Y0M1DT16H43M4S = **2010-03-14 03:16:55 EDT**
|
||||
test_time_spring_type2_post_type2_post: ADD: 2010-03-15 18:57:55 EDT + P+0Y0M0DT1H2M4S = **2010-03-15 19:59:59 EDT**
|
||||
@@ -0,0 +1,31 @@
|
||||
--TEST--
|
||||
DateTime::add() -- spring type2 type3
|
||||
--CREDITS--
|
||||
Daniel Convissor <danielc@php.net>
|
||||
--XFAIL--
|
||||
Various bugs exist
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
require 'examine_diff.inc';
|
||||
define('PHPT_DATETIME_SHOW', PHPT_DATETIME_SHOW_ADD);
|
||||
require 'DateTime_data-spring-type2-type3.inc';
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
test_time_spring_type2_prev_type3_prev: ADD: 2010-02-11 02:18:48 EST + P+0Y1M2DT16H19M40S = **2010-03-13 18:38:28 EST**
|
||||
test_time_spring_type2_prev_type3_st: ADD: 2010-03-13 18:38:28 EST + P+0Y0M0DT5H31M52S = **2010-03-14 00:10:20 EST**
|
||||
test_time_spring_type2_prev_type3_dt: ADD: 2010-03-13 18:38:28 EST + P+0Y0M0DT7H38M27S = **2010-03-14 03:16:55 EDT**
|
||||
test_time_spring_type2_prev_type3_post: ADD: 2010-03-13 18:38:28 EST + P+0Y0M2DT1H21M31S = **2010-03-15 19:59:59 EDT**
|
||||
test_time_spring_type2_st_type3_prev: ADD: 2010-03-14 00:10:20 EST + P-0Y0M0DT5H31M52S = **2010-03-13 18:38:28 EST**
|
||||
test_time_spring_type2_st_type3_st: ADD: 2010-03-14 00:10:20 EST + P+0Y0M0DT0H5M15S = **2010-03-14 00:15:35 EST**
|
||||
test_time_spring_type2_st_type3_dt: ADD: 2010-03-14 00:10:20 EST + P+0Y0M0DT2H6M35S = **2010-03-14 03:16:55 EDT**
|
||||
test_time_spring_type2_st_type3_post: ADD: 2010-03-14 00:10:20 EST + P+0Y0M1DT18H49M39S = **2010-03-15 19:59:59 EDT**
|
||||
test_time_spring_type2_dt_type3_prev: ADD: 2010-03-14 03:16:55 EDT + P-0Y0M0DT7H38M27S = **2010-03-13 18:38:28 EST**
|
||||
test_time_spring_type2_dt_type3_st: ADD: 2010-03-14 03:16:55 EDT + P-0Y0M0DT2H6M35S = **2010-03-14 00:10:20 EST**
|
||||
test_time_spring_type2_dt_type3_dt: ADD: 2010-03-14 03:16:55 EDT + P+0Y0M0DT2H3M1S = **2010-03-14 05:19:56 EDT**
|
||||
test_time_spring_type2_dt_type3_post: ADD: 2010-03-14 03:16:55 EDT + P+0Y0M1DT16H43M4S = **2010-03-15 19:59:59 EDT**
|
||||
test_time_spring_type2_post_type3_prev: ADD: 2010-03-15 19:59:59 EDT + P-0Y0M2DT1H21M31S = **2010-03-13 18:38:28 EST**
|
||||
test_time_spring_type2_post_type3_st: ADD: 2010-03-15 19:59:59 EDT + P-0Y0M1DT18H49M39S = **2010-03-14 00:10:20 EST**
|
||||
test_time_spring_type2_post_type3_dt: ADD: 2010-03-15 19:59:59 EDT + P-0Y0M1DT16H43M4S = **2010-03-14 03:16:55 EDT**
|
||||
test_time_spring_type2_post_type3_post: ADD: 2010-03-15 18:57:55 EDT + P+0Y0M0DT1H2M4S = **2010-03-15 19:59:59 EDT**
|
||||
@@ -0,0 +1,31 @@
|
||||
--TEST--
|
||||
DateTime::add() -- spring type3 type2
|
||||
--CREDITS--
|
||||
Daniel Convissor <danielc@php.net>
|
||||
--XFAIL--
|
||||
Various bugs exist
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
require 'examine_diff.inc';
|
||||
define('PHPT_DATETIME_SHOW', PHPT_DATETIME_SHOW_ADD);
|
||||
require 'DateTime_data-spring-type3-type2.inc';
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
test_time_spring_type3_prev_type2_prev: ADD: 2010-02-11 02:18:48 EST + P+0Y1M2DT16H19M40S = **2010-03-13 18:38:28 EST**
|
||||
test_time_spring_type3_prev_type2_st: ADD: 2010-03-13 18:38:28 EST + P+0Y0M0DT5H31M52S = **2010-03-14 00:10:20 EST**
|
||||
test_time_spring_type3_prev_type2_dt: ADD: 2010-03-13 18:38:28 EST + P+0Y0M0DT7H38M27S = **2010-03-14 03:16:55 EDT**
|
||||
test_time_spring_type3_prev_type2_post: ADD: 2010-03-13 18:38:28 EST + P+0Y0M2DT1H21M31S = **2010-03-15 19:59:59 EDT**
|
||||
test_time_spring_type3_st_type2_prev: ADD: 2010-03-14 00:10:20 EST + P-0Y0M0DT5H31M52S = **2010-03-13 18:38:28 EST**
|
||||
test_time_spring_type3_st_type2_st: ADD: 2010-03-14 00:10:20 EST + P+0Y0M0DT0H5M15S = **2010-03-14 00:15:35 EST**
|
||||
test_time_spring_type3_st_type2_dt: ADD: 2010-03-14 00:10:20 EST + P+0Y0M0DT2H6M35S = **2010-03-14 03:16:55 EDT**
|
||||
test_time_spring_type3_st_type2_post: ADD: 2010-03-14 00:10:20 EST + P+0Y0M1DT18H49M39S = **2010-03-15 19:59:59 EDT**
|
||||
test_time_spring_type3_dt_type2_prev: ADD: 2010-03-14 03:16:55 EDT + P-0Y0M0DT7H38M27S = **2010-03-13 18:38:28 EST**
|
||||
test_time_spring_type3_dt_type2_st: ADD: 2010-03-14 03:16:55 EDT + P-0Y0M0DT2H6M35S = **2010-03-14 00:10:20 EST**
|
||||
test_time_spring_type3_dt_type2_dt: ADD: 2010-03-14 03:16:55 EDT + P+0Y0M0DT2H3M1S = **2010-03-14 05:19:56 EDT**
|
||||
test_time_spring_type3_dt_type2_post: ADD: 2010-03-14 03:16:55 EDT + P+0Y0M1DT16H43M4S = **2010-03-15 19:59:59 EDT**
|
||||
test_time_spring_type3_post_type2_prev: ADD: 2010-03-15 19:59:59 EDT + P-0Y0M2DT1H21M31S = **2010-03-13 18:38:28 EST**
|
||||
test_time_spring_type3_post_type2_st: ADD: 2010-03-15 19:59:59 EDT + P-0Y0M1DT18H49M39S = **2010-03-14 00:10:20 EST**
|
||||
test_time_spring_type3_post_type2_dt: ADD: 2010-03-15 19:59:59 EDT + P-0Y0M1DT16H43M4S = **2010-03-14 03:16:55 EDT**
|
||||
test_time_spring_type3_post_type2_post: ADD: 2010-03-15 18:57:55 EDT + P+0Y0M0DT1H2M4S = **2010-03-15 19:59:59 EDT**
|
||||
@@ -0,0 +1,31 @@
|
||||
--TEST--
|
||||
DateTime::add() -- spring type3 type3
|
||||
--CREDITS--
|
||||
Daniel Convissor <danielc@php.net>
|
||||
--XFAIL--
|
||||
Various bugs exist
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
require 'examine_diff.inc';
|
||||
define('PHPT_DATETIME_SHOW', PHPT_DATETIME_SHOW_ADD);
|
||||
require 'DateTime_data-spring-type3-type3.inc';
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
test_time_spring_type3_prev_type3_prev: ADD: 2010-02-11 02:18:48 EST + P+0Y1M2DT16H19M40S = **2010-03-13 18:38:28 EST**
|
||||
test_time_spring_type3_prev_type3_st: ADD: 2010-03-13 18:38:28 EST + P+0Y0M0DT5H31M52S = **2010-03-14 00:10:20 EST**
|
||||
test_time_spring_type3_prev_type3_dt: ADD: 2010-03-13 18:38:28 EST + P+0Y0M0DT7H38M27S = **2010-03-14 03:16:55 EDT**
|
||||
test_time_spring_type3_prev_type3_post: ADD: 2010-03-13 18:38:28 EST + P+0Y0M2DT1H21M31S = **2010-03-15 19:59:59 EDT**
|
||||
test_time_spring_type3_st_type3_prev: ADD: 2010-03-14 00:10:20 EST + P-0Y0M0DT5H31M52S = **2010-03-13 18:38:28 EST**
|
||||
test_time_spring_type3_st_type3_st: ADD: 2010-03-14 00:10:20 EST + P+0Y0M0DT0H5M15S = **2010-03-14 00:15:35 EST**
|
||||
test_time_spring_type3_st_type3_dt: ADD: 2010-03-14 00:10:20 EST + P+0Y0M0DT2H6M35S = **2010-03-14 03:16:55 EDT**
|
||||
test_time_spring_type3_st_type3_post: ADD: 2010-03-14 00:10:20 EST + P+0Y0M1DT18H49M39S = **2010-03-15 19:59:59 EDT**
|
||||
test_time_spring_type3_dt_type3_prev: ADD: 2010-03-14 03:16:55 EDT + P-0Y0M0DT7H38M27S = **2010-03-13 18:38:28 EST**
|
||||
test_time_spring_type3_dt_type3_st: ADD: 2010-03-14 03:16:55 EDT + P-0Y0M0DT2H6M35S = **2010-03-14 00:10:20 EST**
|
||||
test_time_spring_type3_dt_type3_dt: ADD: 2010-03-14 03:16:55 EDT + P+0Y0M0DT2H3M1S = **2010-03-14 05:19:56 EDT**
|
||||
test_time_spring_type3_dt_type3_post: ADD: 2010-03-14 03:16:55 EDT + P+0Y0M1DT16H43M4S = **2010-03-15 19:59:59 EDT**
|
||||
test_time_spring_type3_post_type3_prev: ADD: 2010-03-15 19:59:59 EDT + P-0Y0M2DT1H21M31S = **2010-03-13 18:38:28 EST**
|
||||
test_time_spring_type3_post_type3_st: ADD: 2010-03-15 19:59:59 EDT + P-0Y0M1DT18H49M39S = **2010-03-14 00:10:20 EST**
|
||||
test_time_spring_type3_post_type3_dt: ADD: 2010-03-15 19:59:59 EDT + P-0Y0M1DT16H43M4S = **2010-03-14 03:16:55 EDT**
|
||||
test_time_spring_type3_post_type3_post: ADD: 2010-03-15 18:57:55 EDT + P+0Y0M0DT1H2M4S = **2010-03-15 19:59:59 EDT**
|
||||
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* Note: test names match method names in a set of PHPUnit tests
|
||||
* in a userland package. Please be so kind as to leave them.
|
||||
*/
|
||||
|
||||
date_default_timezone_set('America/New_York');
|
||||
|
||||
|
||||
/*
|
||||
* Absolute
|
||||
*/
|
||||
echo "test_absolute_7: ";
|
||||
examine_diff('2009-01-14', '2009-01-07', 'P+0Y0M7DT0H0M0S', 7, true);
|
||||
|
||||
echo "test_absolute_negative_7: ";
|
||||
examine_diff('2009-01-07', '2009-01-14', 'P+0Y0M7DT0H0M0S', 7, true);
|
||||
|
||||
//14 - 7 = 7
|
||||
//7 + 7 = 14
|
||||
//
|
||||
//7 - 14 = -7
|
||||
//14 - 7 = 7
|
||||
@@ -0,0 +1,64 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* Note: test names match method names in a set of PHPUnit tests
|
||||
* in a userland package. Please be so kind as to leave them.
|
||||
*/
|
||||
|
||||
date_default_timezone_set('America/New_York');
|
||||
|
||||
|
||||
/*
|
||||
* Particular days
|
||||
*/
|
||||
echo "test__7: ";
|
||||
examine_diff('2009-01-14', '2009-01-07', 'P+0Y0M7DT0H0M0S', 7);
|
||||
|
||||
echo "test_years_positive__7_by_0_day: ";
|
||||
examine_diff('2007-02-07', '2000-02-07', 'P+7Y0M0DT0H0M0S', 2557);
|
||||
|
||||
echo "test_years_positive__7_by_1_day: ";
|
||||
examine_diff('2007-02-08', '2000-02-07', 'P+7Y0M1DT0H0M0S', 2558);
|
||||
|
||||
echo "test_years_positive__6_shy_1_day: ";
|
||||
examine_diff('2007-02-06', '2000-02-07', 'P+6Y11M30DT0H0M0S', 2556);
|
||||
|
||||
echo "test_years_positive__7_by_1_month: ";
|
||||
examine_diff('2007-03-07', '2000-02-07', 'P+7Y1M0DT0H0M0S', 2585);
|
||||
|
||||
echo "test_years_positive__6_shy_1_month: ";
|
||||
examine_diff('2007-01-07', '2000-02-07', 'P+6Y11M0DT0H0M0S', 2526);
|
||||
|
||||
echo "test_years_positive__7_by_1_month_split_newyear: ";
|
||||
examine_diff('2007-01-07', '1999-12-07', 'P+7Y1M0DT0H0M0S', 2588);
|
||||
|
||||
echo "test_years_positive__6_shy_1_month_split_newyear: ";
|
||||
examine_diff('2006-12-07', '2000-01-07', 'P+6Y11M0DT0H0M0S', 2526);
|
||||
|
||||
|
||||
/*
|
||||
* Particular days, negative
|
||||
*/
|
||||
echo "test_negative__7: ";
|
||||
examine_diff('2009-01-07', '2009-01-14', 'P-0Y0M7DT0H0M0S', 7);
|
||||
|
||||
echo "test_years_negative__7_by_0_day: ";
|
||||
examine_diff('2000-02-07', '2007-02-07', 'P-7Y0M0DT0H0M0S', 2557);
|
||||
|
||||
echo "test_years_negative__7_by_1_day: ";
|
||||
examine_diff('2000-02-07', '2007-02-08', 'P-7Y0M1DT0H0M0S', 2558);
|
||||
|
||||
echo "test_years_negative__6_shy_1_day: ";
|
||||
examine_diff('2000-02-07', '2007-02-06', 'P-6Y11M28DT0H0M0S', 2556);
|
||||
|
||||
echo "test_years_negative__7_by_1_month: ";
|
||||
examine_diff('2000-02-07', '2007-03-07', 'P-7Y1M0DT0H0M0S', 2585);
|
||||
|
||||
echo "test_years_negative__6_shy_1_month: ";
|
||||
examine_diff('2000-02-07', '2007-01-07', 'P-6Y11M0DT0H0M0S', 2526);
|
||||
|
||||
echo "test_years_negative__7_by_1_month_split_newyear: ";
|
||||
examine_diff('1999-12-07', '2007-01-07', 'P-7Y1M0DT0H0M0S', 2588);
|
||||
|
||||
echo "test_years_negative__6_shy_1_month_split_newyear: ";
|
||||
examine_diff('2000-01-07', '2006-12-07', 'P-6Y11M0DT0H0M0S', 2526);
|
||||
-47
@@ -1,10 +1,3 @@
|
||||
--TEST--
|
||||
DateTime::diff() add() sub() -- fall type2 type2
|
||||
--CREDITS--
|
||||
Daniel Convissor <danielc@php.net>
|
||||
--XFAIL--
|
||||
PHP < 5.4 has bugs
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
/*
|
||||
@@ -12,7 +5,6 @@ PHP < 5.4 has bugs
|
||||
* in a userland package. Please be so kind as to leave them.
|
||||
*/
|
||||
|
||||
require './examine_diff.inc';
|
||||
date_default_timezone_set('America/New_York');
|
||||
|
||||
|
||||
@@ -205,42 +197,3 @@ echo "test_time_fall_type2_post_type2_post: ";
|
||||
$end = new DateTime('2010-11-08 19:59:59 EST'); // post, zt2
|
||||
$start = new DateTime('2010-11-08 18:57:55 EST'); // sp post, zt2
|
||||
examine_diff($end, $start, 'P+0Y0M0DT1H2M4S', 0);
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
test_time_fall_type2_prev_type2_prev: FWD: 2010-11-06 18:38:28 EDT - 2010-10-04 02:18:48 EDT = **P+0Y1M2DT16H19M40S** | BACK: 2010-10-04 02:18:48 EDT + P+0Y1M2DT16H19M40S = **2010-11-06 18:38:28 EDT** | DAYS: **33**
|
||||
test_time_fall_type2_prev_type2_dt: FWD: 2010-11-07 00:10:20 EDT - 2010-11-06 18:38:28 EDT = **P+0Y0M0DT5H31M52S** | BACK: 2010-11-06 18:38:28 EDT + P+0Y0M0DT5H31M52S = **2010-11-07 00:10:20 EDT** | DAYS: **0**
|
||||
test_time_fall_type2_prev_type2_redodt: FWD: 2010-11-07 01:12:33 EDT - 2010-11-06 18:38:28 EDT = **P+0Y0M0DT6H34M5S** | BACK: 2010-11-06 18:38:28 EDT + P+0Y0M0DT6H34M5S = **2010-11-07 01:12:33 EDT** | DAYS: **0**
|
||||
test_time_fall_type2_prev_type2_redost: FWD: 2010-11-07 01:14:44 EST - 2010-11-06 18:38:28 EDT = **P+0Y0M0DT7H36M16S** | BACK: 2010-11-06 18:38:28 EDT + P+0Y0M0DT7H36M16S = **2010-11-07 01:14:44 EST** | DAYS: **0**
|
||||
test_time_fall_type2_prev_type2_st: FWD: 2010-11-07 03:16:55 EST - 2010-11-06 18:38:28 EDT = **P+0Y0M0DT9H38M27S** | BACK: 2010-11-06 18:38:28 EDT + P+0Y0M0DT9H38M27S = **2010-11-07 03:16:55 EST** | DAYS: **0**
|
||||
test_time_fall_type2_prev_type2_post: FWD: 2010-11-08 19:59:59 EST - 2010-11-06 18:38:28 EDT = **P+0Y0M2DT1H21M31S** | BACK: 2010-11-06 18:38:28 EDT + P+0Y0M2DT1H21M31S = **2010-11-08 19:59:59 EST** | DAYS: **2**
|
||||
test_time_fall_type2_dt_type2_prev: FWD: 2010-11-06 18:38:28 EDT - 2010-11-07 00:10:20 EDT = **P-0Y0M0DT5H31M52S** | BACK: 2010-11-07 00:10:20 EDT + P-0Y0M0DT5H31M52S = **2010-11-06 18:38:28 EDT** | DAYS: **0**
|
||||
test_time_fall_type2_dt_type2_dt: FWD: 2010-11-07 00:15:35 EDT - 2010-11-07 00:10:20 EDT = **P+0Y0M0DT0H5M15S** | BACK: 2010-11-07 00:10:20 EDT + P+0Y0M0DT0H5M15S = **2010-11-07 00:15:35 EDT** | DAYS: **0**
|
||||
test_time_fall_type2_dt_type2_redodt: FWD: 2010-11-07 01:12:33 EDT - 2010-11-07 00:10:20 EDT = **P+0Y0M0DT1H2M13S** | BACK: 2010-11-07 00:10:20 EDT + P+0Y0M0DT1H2M13S = **2010-11-07 01:12:33 EDT** | DAYS: **0**
|
||||
test_time_fall_type2_dt_type2_redost: FWD: 2010-11-07 01:14:44 EST - 2010-11-07 00:10:20 EDT = **P+0Y0M0DT2H4M24S** | BACK: 2010-11-07 00:10:20 EDT + P+0Y0M0DT2H4M24S = **2010-11-07 01:14:44 EST** | DAYS: **0**
|
||||
test_time_fall_type2_dt_type2_st: FWD: 2010-11-07 03:16:55 EST - 2010-11-07 00:10:20 EDT = **P+0Y0M0DT4H6M35S** | BACK: 2010-11-07 00:10:20 EDT + P+0Y0M0DT4H6M35S = **2010-11-07 03:16:55 EST** | DAYS: **0**
|
||||
test_time_fall_type2_dt_type2_post: FWD: 2010-11-08 19:59:59 EST - 2010-11-07 00:10:20 EDT = **P+0Y0M1DT20H49M39S** | BACK: 2010-11-07 00:10:20 EDT + P+0Y0M1DT20H49M39S = **2010-11-08 19:59:59 EST** | DAYS: **1**
|
||||
test_time_fall_type2_redodt_type2_prev: FWD: 2010-11-06 18:38:28 EDT - 2010-11-07 01:12:33 EDT = **P-0Y0M0DT6H34M5S** | BACK: 2010-11-07 01:12:33 EDT + P-0Y0M0DT6H34M5S = **2010-11-06 18:38:28 EDT** | DAYS: **0**
|
||||
test_time_fall_type2_redodt_type2_dt: FWD: 2010-11-07 00:10:20 EDT - 2010-11-07 01:12:33 EDT = **P-0Y0M0DT1H2M13S** | BACK: 2010-11-07 01:12:33 EDT + P-0Y0M0DT1H2M13S = **2010-11-07 00:10:20 EDT** | DAYS: **0**
|
||||
test_time_fall_type2_redodt_type2_redodt: FWD: 2010-11-07 01:15:35 EDT - 2010-11-07 01:12:33 EDT = **P+0Y0M0DT0H3M2S** | BACK: 2010-11-07 01:12:33 EDT + P+0Y0M0DT0H3M2S = **2010-11-07 01:15:35 EDT** | DAYS: **0**
|
||||
test_time_fall_type2_redodt_type2_redost: FWD: 2010-11-07 01:14:44 EST - 2010-11-07 01:12:33 EDT = **P+0Y0M0DT1H2M11S** | BACK: 2010-11-07 01:12:33 EDT + P+0Y0M0DT1H2M11S = **2010-11-07 01:14:44 EST** | DAYS: **0**
|
||||
test_time_fall_type2_redodt_type2_st: FWD: 2010-11-07 03:16:55 EST - 2010-11-07 01:12:33 EDT = **P+0Y0M0DT3H4M22S** | BACK: 2010-11-07 01:12:33 EDT + P+0Y0M0DT3H4M22S = **2010-11-07 03:16:55 EST** | DAYS: **0**
|
||||
test_time_fall_type2_redodt_type2_post: FWD: 2010-11-08 19:59:59 EST - 2010-11-07 01:12:33 EDT = **P+0Y0M1DT19H47M26S** | BACK: 2010-11-07 01:12:33 EDT + P+0Y0M1DT19H47M26S = **2010-11-08 19:59:59 EST** | DAYS: **1**
|
||||
test_time_fall_type2_redost_type2_prev: FWD: 2010-11-06 18:38:28 EDT - 2010-11-07 01:14:44 EST = **P-0Y0M0DT7H36M16S** | BACK: 2010-11-07 01:14:44 EST + P-0Y0M0DT7H36M16S = **2010-11-06 18:38:28 EDT** | DAYS: **0**
|
||||
test_time_fall_type2_redost_type2_dt: FWD: 2010-11-07 00:10:20 EDT - 2010-11-07 01:14:44 EST = **P-0Y0M0DT2H4M24S** | BACK: 2010-11-07 01:14:44 EST + P-0Y0M0DT2H4M24S = **2010-11-07 00:10:20 EDT** | DAYS: **0**
|
||||
test_time_fall_type2_redost_type2_redodt: FWD: 2010-11-07 01:12:33 EDT - 2010-11-07 01:14:44 EST = **P-0Y0M0DT1H2M11S** | BACK: 2010-11-07 01:14:44 EST + P-0Y0M0DT1H2M11S = **2010-11-07 01:12:33 EDT** | DAYS: **0**
|
||||
test_time_fall_type2_redost_type2_redost: FWD: 2010-11-07 01:16:54 EST - 2010-11-07 01:14:44 EST = **P+0Y0M0DT0H2M10S** | BACK: 2010-11-07 01:14:44 EST + P+0Y0M0DT0H2M10S = **2010-11-07 01:16:54 EST** | DAYS: **0**
|
||||
test_time_fall_type2_redost_type2_st: FWD: 2010-11-07 03:16:55 EST - 2010-11-07 01:14:44 EST = **P+0Y0M0DT2H2M11S** | BACK: 2010-11-07 01:14:44 EST + P+0Y0M0DT2H2M11S = **2010-11-07 03:16:55 EST** | DAYS: **0**
|
||||
test_time_fall_type2_redost_type2_post: FWD: 2010-11-08 19:59:59 EST - 2010-11-07 01:14:44 EST = **P+0Y0M1DT18H45M15S** | BACK: 2010-11-07 01:14:44 EST + P+0Y0M1DT18H45M15S = **2010-11-08 19:59:59 EST** | DAYS: **1**
|
||||
test_time_fall_type2_st_type2_prev: FWD: 2010-11-06 18:38:28 EDT - 2010-11-07 03:16:55 EST = **P-0Y0M0DT9H38M27S** | BACK: 2010-11-07 03:16:55 EST + P-0Y0M0DT9H38M27S = **2010-11-06 18:38:28 EDT** | DAYS: **0**
|
||||
test_time_fall_type2_st_type2_dt: FWD: 2010-11-07 00:10:20 EDT - 2010-11-07 03:16:55 EST = **P-0Y0M0DT4H6M35S** | BACK: 2010-11-07 03:16:55 EST + P-0Y0M0DT4H6M35S = **2010-11-07 00:10:20 EDT** | DAYS: **0**
|
||||
test_time_fall_type2_st_type2_redodt: FWD: 2010-11-07 01:12:33 EDT - 2010-11-07 03:16:55 EST = **P-0Y0M0DT3H4M22S** | BACK: 2010-11-07 03:16:55 EST + P-0Y0M0DT3H4M22S = **2010-11-07 01:12:33 EDT** | DAYS: **0**
|
||||
test_time_fall_type2_st_type2_redost: FWD: 2010-11-07 01:14:44 EST - 2010-11-07 03:16:55 EST = **P-0Y0M0DT2H2M11S** | BACK: 2010-11-07 03:16:55 EST + P-0Y0M0DT2H2M11S = **2010-11-07 01:14:44 EST** | DAYS: **0**
|
||||
test_time_fall_type2_st_type2_st: FWD: 2010-11-07 05:19:56 EST - 2010-11-07 03:16:55 EST = **P+0Y0M0DT2H3M1S** | BACK: 2010-11-07 03:16:55 EST + P+0Y0M0DT2H3M1S = **2010-11-07 05:19:56 EST** | DAYS: **0**
|
||||
test_time_fall_type2_st_type2_post: FWD: 2010-11-08 19:59:59 EST - 2010-11-07 03:16:55 EST = **P+0Y0M1DT16H43M4S** | BACK: 2010-11-07 03:16:55 EST + P+0Y0M1DT16H43M4S = **2010-11-08 19:59:59 EST** | DAYS: **1**
|
||||
test_time_fall_type2_post_type2_prev: FWD: 2010-11-06 18:38:28 EDT - 2010-11-08 19:59:59 EST = **P-0Y0M2DT1H21M31S** | BACK: 2010-11-08 19:59:59 EST + P-0Y0M2DT1H21M31S = **2010-11-06 18:38:28 EDT** | DAYS: **2**
|
||||
test_time_fall_type2_post_type2_dt: FWD: 2010-11-07 00:10:20 EDT - 2010-11-08 19:59:59 EST = **P-0Y0M1DT20H49M39S** | BACK: 2010-11-08 19:59:59 EST + P-0Y0M1DT20H49M39S = **2010-11-07 00:10:20 EDT** | DAYS: **1**
|
||||
test_time_fall_type2_post_type2_redodt: FWD: 2010-11-07 01:12:33 EDT - 2010-11-08 19:59:59 EST = **P-0Y0M1DT19H47M26S** | BACK: 2010-11-08 19:59:59 EST + P-0Y0M1DT19H47M26S = **2010-11-07 01:12:33 EDT** | DAYS: **1**
|
||||
test_time_fall_type2_post_type2_redost: FWD: 2010-11-07 01:14:44 EST - 2010-11-08 19:59:59 EST = **P-0Y0M1DT18H45M15S** | BACK: 2010-11-08 19:59:59 EST + P-0Y0M1DT18H45M15S = **2010-11-07 01:14:44 EST** | DAYS: **1**
|
||||
test_time_fall_type2_post_type2_st: FWD: 2010-11-07 03:16:55 EST - 2010-11-08 19:59:59 EST = **P-0Y0M1DT16H43M4S** | BACK: 2010-11-08 19:59:59 EST + P-0Y0M1DT16H43M4S = **2010-11-07 03:16:55 EST** | DAYS: **1**
|
||||
test_time_fall_type2_post_type2_post: FWD: 2010-11-08 19:59:59 EST - 2010-11-08 18:57:55 EST = **P+0Y0M0DT1H2M4S** | BACK: 2010-11-08 18:57:55 EST + P+0Y0M0DT1H2M4S = **2010-11-08 19:59:59 EST** | DAYS: **0**
|
||||
-47
@@ -1,10 +1,3 @@
|
||||
--TEST--
|
||||
DateTime::diff() add() sub() -- fall type2 type3
|
||||
--CREDITS--
|
||||
Daniel Convissor <danielc@php.net>
|
||||
--XFAIL--
|
||||
PHP < 5.4 has bugs
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
/*
|
||||
@@ -12,7 +5,6 @@ PHP < 5.4 has bugs
|
||||
* in a userland package. Please be so kind as to leave them.
|
||||
*/
|
||||
|
||||
require './examine_diff.inc';
|
||||
date_default_timezone_set('America/New_York');
|
||||
|
||||
|
||||
@@ -217,42 +209,3 @@ echo "test_time_fall_type2_post_type3_post: ";
|
||||
$end = new DateTime('2010-11-08 19:59:59'); // post, zt3
|
||||
$start = new DateTime('2010-11-08 18:57:55 EST'); // sp post, zt2
|
||||
examine_diff($end, $start, 'P+0Y0M0DT1H2M4S', 0);
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
test_time_fall_type2_prev_type3_prev: FWD: 2010-11-06 18:38:28 EDT - 2010-10-04 02:18:48 EDT = **P+0Y1M2DT16H19M40S** | BACK: 2010-10-04 02:18:48 EDT + P+0Y1M2DT16H19M40S = **2010-11-06 18:38:28 EDT** | DAYS: **33**
|
||||
test_time_fall_type2_prev_type3_dt: FWD: 2010-11-07 00:10:20 EDT - 2010-11-06 18:38:28 EDT = **P+0Y0M0DT5H31M52S** | BACK: 2010-11-06 18:38:28 EDT + P+0Y0M0DT5H31M52S = **2010-11-07 00:10:20 EDT** | DAYS: **0**
|
||||
test_time_fall_type2_prev_type3_redodt: FWD: 2010-11-07 01:12:33 EDT - 2010-11-06 18:38:28 EDT = **P+0Y0M0DT6H34M5S** | BACK: 2010-11-06 18:38:28 EDT + P+0Y0M0DT6H34M5S = **2010-11-07 01:12:33 EDT** | DAYS: **0**
|
||||
test_time_fall_type2_prev_type3_redost: FWD: 2010-11-07 01:14:44 EST - 2010-11-06 18:38:28 EDT = **P+0Y0M0DT7H36M16S** | BACK: 2010-11-06 18:38:28 EDT + P+0Y0M0DT7H36M16S = **2010-11-07 01:14:44 EST** | DAYS: **0**
|
||||
test_time_fall_type2_prev_type3_st: FWD: 2010-11-07 03:16:55 EST - 2010-11-06 18:38:28 EDT = **P+0Y0M0DT9H38M27S** | BACK: 2010-11-06 18:38:28 EDT + P+0Y0M0DT9H38M27S = **2010-11-07 03:16:55 EST** | DAYS: **0**
|
||||
test_time_fall_type2_prev_type3_post: FWD: 2010-11-08 19:59:59 EST - 2010-11-06 18:38:28 EDT = **P+0Y0M2DT1H21M31S** | BACK: 2010-11-06 18:38:28 EDT + P+0Y0M2DT1H21M31S = **2010-11-08 19:59:59 EST** | DAYS: **2**
|
||||
test_time_fall_type2_dt_type3_prev: FWD: 2010-11-06 18:38:28 EDT - 2010-11-07 00:10:20 EDT = **P-0Y0M0DT5H31M52S** | BACK: 2010-11-07 00:10:20 EDT + P-0Y0M0DT5H31M52S = **2010-11-06 18:38:28 EDT** | DAYS: **0**
|
||||
test_time_fall_type2_dt_type3_dt: FWD: 2010-11-07 00:15:35 EDT - 2010-11-07 00:10:20 EDT = **P+0Y0M0DT0H5M15S** | BACK: 2010-11-07 00:10:20 EDT + P+0Y0M0DT0H5M15S = **2010-11-07 00:15:35 EDT** | DAYS: **0**
|
||||
test_time_fall_type2_dt_type3_redodt: FWD: 2010-11-07 01:12:33 EDT - 2010-11-07 00:10:20 EDT = **P+0Y0M0DT1H2M13S** | BACK: 2010-11-07 00:10:20 EDT + P+0Y0M0DT1H2M13S = **2010-11-07 01:12:33 EDT** | DAYS: **0**
|
||||
test_time_fall_type2_dt_type3_redost: FWD: 2010-11-07 01:14:44 EST - 2010-11-07 00:10:20 EDT = **P+0Y0M0DT2H4M24S** | BACK: 2010-11-07 00:10:20 EDT + P+0Y0M0DT2H4M24S = **2010-11-07 01:14:44 EST** | DAYS: **0**
|
||||
test_time_fall_type2_dt_type3_st: FWD: 2010-11-07 03:16:55 EST - 2010-11-07 00:10:20 EDT = **P+0Y0M0DT4H6M35S** | BACK: 2010-11-07 00:10:20 EDT + P+0Y0M0DT4H6M35S = **2010-11-07 03:16:55 EST** | DAYS: **0**
|
||||
test_time_fall_type2_dt_type3_post: FWD: 2010-11-08 19:59:59 EST - 2010-11-07 00:10:20 EDT = **P+0Y0M1DT20H49M39S** | BACK: 2010-11-07 00:10:20 EDT + P+0Y0M1DT20H49M39S = **2010-11-08 19:59:59 EST** | DAYS: **1**
|
||||
test_time_fall_type2_redodt_type3_prev: FWD: 2010-11-06 18:38:28 EDT - 2010-11-07 01:12:33 EDT = **P-0Y0M0DT6H34M5S** | BACK: 2010-11-07 01:12:33 EDT + P-0Y0M0DT6H34M5S = **2010-11-06 18:38:28 EDT** | DAYS: **0**
|
||||
test_time_fall_type2_redodt_type3_dt: FWD: 2010-11-07 00:10:20 EDT - 2010-11-07 01:12:33 EDT = **P-0Y0M0DT1H2M13S** | BACK: 2010-11-07 01:12:33 EDT + P-0Y0M0DT1H2M13S = **2010-11-07 00:10:20 EDT** | DAYS: **0**
|
||||
test_time_fall_type2_redodt_type3_redodt: FWD: 2010-11-07 01:15:35 EDT - 2010-11-07 01:12:33 EDT = **P+0Y0M0DT0H3M2S** | BACK: 2010-11-07 01:12:33 EDT + P+0Y0M0DT0H3M2S = **2010-11-07 01:15:35 EDT** | DAYS: **0**
|
||||
test_time_fall_type2_redodt_type3_redost: FWD: 2010-11-07 01:14:44 EST - 2010-11-07 01:12:33 EDT = **P+0Y0M0DT1H2M11S** | BACK: 2010-11-07 01:12:33 EDT + P+0Y0M0DT1H2M11S = **2010-11-07 01:14:44 EST** | DAYS: **0**
|
||||
test_time_fall_type2_redodt_type3_st: FWD: 2010-11-07 03:16:55 EST - 2010-11-07 01:12:33 EDT = **P+0Y0M0DT3H4M22S** | BACK: 2010-11-07 01:12:33 EDT + P+0Y0M0DT3H4M22S = **2010-11-07 03:16:55 EST** | DAYS: **0**
|
||||
test_time_fall_type2_redodt_type3_post: FWD: 2010-11-08 19:59:59 EST - 2010-11-07 01:12:33 EDT = **P+0Y0M1DT19H47M26S** | BACK: 2010-11-07 01:12:33 EDT + P+0Y0M1DT19H47M26S = **2010-11-08 19:59:59 EST** | DAYS: **1**
|
||||
test_time_fall_type2_redost_type3_prev: FWD: 2010-11-06 18:38:28 EDT - 2010-11-07 01:14:44 EST = **P-0Y0M0DT7H36M16S** | BACK: 2010-11-07 01:14:44 EST + P-0Y0M0DT7H36M16S = **2010-11-06 18:38:28 EDT** | DAYS: **0**
|
||||
test_time_fall_type2_redost_type3_dt: FWD: 2010-11-07 00:10:20 EDT - 2010-11-07 01:14:44 EST = **P-0Y0M0DT2H4M24S** | BACK: 2010-11-07 01:14:44 EST + P-0Y0M0DT2H4M24S = **2010-11-07 00:10:20 EDT** | DAYS: **0**
|
||||
test_time_fall_type2_redost_type3_redodt: FWD: 2010-11-07 01:12:33 EDT - 2010-11-07 01:14:44 EST = **P-0Y0M0DT1H2M11S** | BACK: 2010-11-07 01:14:44 EST + P-0Y0M0DT1H2M11S = **2010-11-07 01:12:33 EDT** | DAYS: **0**
|
||||
test_time_fall_type2_redost_type3_redost: FWD: 2010-11-07 01:16:54 EST - 2010-11-07 01:14:44 EST = **P+0Y0M0DT0H2M10S** | BACK: 2010-11-07 01:14:44 EST + P+0Y0M0DT0H2M10S = **2010-11-07 01:16:54 EST** | DAYS: **0**
|
||||
test_time_fall_type2_redost_type3_st: FWD: 2010-11-07 03:16:55 EST - 2010-11-07 01:14:44 EST = **P+0Y0M0DT2H2M11S** | BACK: 2010-11-07 01:14:44 EST + P+0Y0M0DT2H2M11S = **2010-11-07 03:16:55 EST** | DAYS: **0**
|
||||
test_time_fall_type2_redost_type3_post: FWD: 2010-11-08 19:59:59 EST - 2010-11-07 01:14:44 EST = **P+0Y0M1DT18H45M15S** | BACK: 2010-11-07 01:14:44 EST + P+0Y0M1DT18H45M15S = **2010-11-08 19:59:59 EST** | DAYS: **1**
|
||||
test_time_fall_type2_st_type3_prev: FWD: 2010-11-06 18:38:28 EDT - 2010-11-07 03:16:55 EST = **P-0Y0M0DT9H38M27S** | BACK: 2010-11-07 03:16:55 EST + P-0Y0M0DT9H38M27S = **2010-11-06 18:38:28 EDT** | DAYS: **0**
|
||||
test_time_fall_type2_st_type3_dt: FWD: 2010-11-07 00:10:20 EDT - 2010-11-07 03:16:55 EST = **P-0Y0M0DT4H6M35S** | BACK: 2010-11-07 03:16:55 EST + P-0Y0M0DT4H6M35S = **2010-11-07 00:10:20 EDT** | DAYS: **0**
|
||||
test_time_fall_type2_st_type3_redodt: FWD: 2010-11-07 01:12:33 EDT - 2010-11-07 03:16:55 EST = **P-0Y0M0DT3H4M22S** | BACK: 2010-11-07 03:16:55 EST + P-0Y0M0DT3H4M22S = **2010-11-07 01:12:33 EDT** | DAYS: **0**
|
||||
test_time_fall_type2_st_type3_redost: FWD: 2010-11-07 01:14:44 EST - 2010-11-07 03:16:55 EST = **P-0Y0M0DT2H2M11S** | BACK: 2010-11-07 03:16:55 EST + P-0Y0M0DT2H2M11S = **2010-11-07 01:14:44 EST** | DAYS: **0**
|
||||
test_time_fall_type2_st_type3_st: FWD: 2010-11-07 05:19:56 EST - 2010-11-07 03:16:55 EST = **P+0Y0M0DT2H3M1S** | BACK: 2010-11-07 03:16:55 EST + P+0Y0M0DT2H3M1S = **2010-11-07 05:19:56 EST** | DAYS: **0**
|
||||
test_time_fall_type2_st_type3_post: FWD: 2010-11-08 19:59:59 EST - 2010-11-07 03:16:55 EST = **P+0Y0M1DT16H43M4S** | BACK: 2010-11-07 03:16:55 EST + P+0Y0M1DT16H43M4S = **2010-11-08 19:59:59 EST** | DAYS: **1**
|
||||
test_time_fall_type2_post_type3_prev: FWD: 2010-11-06 18:38:28 EDT - 2010-11-08 19:59:59 EST = **P-0Y0M2DT1H21M31S** | BACK: 2010-11-08 19:59:59 EST + P-0Y0M2DT1H21M31S = **2010-11-06 18:38:28 EDT** | DAYS: **2**
|
||||
test_time_fall_type2_post_type3_dt: FWD: 2010-11-07 00:10:20 EDT - 2010-11-08 19:59:59 EST = **P-0Y0M1DT20H49M39S** | BACK: 2010-11-08 19:59:59 EST + P-0Y0M1DT20H49M39S = **2010-11-07 00:10:20 EDT** | DAYS: **1**
|
||||
test_time_fall_type2_post_type3_redodt: FWD: 2010-11-07 01:12:33 EDT - 2010-11-08 19:59:59 EST = **P-0Y0M1DT19H47M26S** | BACK: 2010-11-08 19:59:59 EST + P-0Y0M1DT19H47M26S = **2010-11-07 01:12:33 EDT** | DAYS: **1**
|
||||
test_time_fall_type2_post_type3_redost: FWD: 2010-11-07 01:14:44 EST - 2010-11-08 19:59:59 EST = **P-0Y0M1DT18H45M15S** | BACK: 2010-11-08 19:59:59 EST + P-0Y0M1DT18H45M15S = **2010-11-07 01:14:44 EST** | DAYS: **1**
|
||||
test_time_fall_type2_post_type3_st: FWD: 2010-11-07 03:16:55 EST - 2010-11-08 19:59:59 EST = **P-0Y0M1DT16H43M4S** | BACK: 2010-11-08 19:59:59 EST + P-0Y0M1DT16H43M4S = **2010-11-07 03:16:55 EST** | DAYS: **1**
|
||||
test_time_fall_type2_post_type3_post: FWD: 2010-11-08 19:59:59 EST - 2010-11-08 18:57:55 EST = **P+0Y0M0DT1H2M4S** | BACK: 2010-11-08 18:57:55 EST + P+0Y0M0DT1H2M4S = **2010-11-08 19:59:59 EST** | DAYS: **0**
|
||||
-47
@@ -1,10 +1,3 @@
|
||||
--TEST--
|
||||
DateTime::diff() add() sub() -- fall type3 type2
|
||||
--CREDITS--
|
||||
Daniel Convissor <danielc@php.net>
|
||||
--XFAIL--
|
||||
PHP < 5.4 has bugs
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
/*
|
||||
@@ -12,7 +5,6 @@ PHP < 5.4 has bugs
|
||||
* in a userland package. Please be so kind as to leave them.
|
||||
*/
|
||||
|
||||
require './examine_diff.inc';
|
||||
date_default_timezone_set('America/New_York');
|
||||
|
||||
|
||||
@@ -219,42 +211,3 @@ echo "test_time_fall_type3_post_type2_post: ";
|
||||
$end = new DateTime('2010-11-08 19:59:59 EST'); // post, zt2
|
||||
$start = new DateTime('2010-11-08 18:57:55'); // sp post, zt3
|
||||
examine_diff($end, $start, 'P+0Y0M0DT1H2M4S', 0);
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
test_time_fall_type3_prev_type2_prev: FWD: 2010-11-06 18:38:28 EDT - 2010-10-04 02:18:48 EDT = **P+0Y1M2DT16H19M40S** | BACK: 2010-10-04 02:18:48 EDT + P+0Y1M2DT16H19M40S = **2010-11-06 18:38:28 EDT** | DAYS: **33**
|
||||
test_time_fall_type3_prev_type2_dt: FWD: 2010-11-07 00:10:20 EDT - 2010-11-06 18:38:28 EDT = **P+0Y0M0DT5H31M52S** | BACK: 2010-11-06 18:38:28 EDT + P+0Y0M0DT5H31M52S = **2010-11-07 00:10:20 EDT** | DAYS: **0**
|
||||
test_time_fall_type3_prev_type2_redodt: FWD: 2010-11-07 01:12:33 EDT - 2010-11-06 18:38:28 EDT = **P+0Y0M0DT6H34M5S** | BACK: 2010-11-06 18:38:28 EDT + P+0Y0M0DT6H34M5S = **2010-11-07 01:12:33 EDT** | DAYS: **0**
|
||||
test_time_fall_type3_prev_type2_redost: FWD: 2010-11-07 01:14:44 EST - 2010-11-06 18:38:28 EDT = **P+0Y0M0DT7H36M16S** | BACK: 2010-11-06 18:38:28 EDT + P+0Y0M0DT7H36M16S = **2010-11-07 01:14:44 EST** | DAYS: **0**
|
||||
test_time_fall_type3_prev_type2_st: FWD: 2010-11-07 03:16:55 EST - 2010-11-06 18:38:28 EDT = **P+0Y0M0DT9H38M27S** | BACK: 2010-11-06 18:38:28 EDT + P+0Y0M0DT9H38M27S = **2010-11-07 03:16:55 EST** | DAYS: **0**
|
||||
test_time_fall_type3_prev_type2_post: FWD: 2010-11-08 19:59:59 EST - 2010-11-06 18:38:28 EDT = **P+0Y0M2DT1H21M31S** | BACK: 2010-11-06 18:38:28 EDT + P+0Y0M2DT1H21M31S = **2010-11-08 19:59:59 EST** | DAYS: **2**
|
||||
test_time_fall_type3_dt_type2_prev: FWD: 2010-11-06 18:38:28 EDT - 2010-11-07 00:10:20 EDT = **P-0Y0M0DT5H31M52S** | BACK: 2010-11-07 00:10:20 EDT + P-0Y0M0DT5H31M52S = **2010-11-06 18:38:28 EDT** | DAYS: **0**
|
||||
test_time_fall_type3_dt_type2_dt: FWD: 2010-11-07 00:15:35 EDT - 2010-11-07 00:10:20 EDT = **P+0Y0M0DT0H5M15S** | BACK: 2010-11-07 00:10:20 EDT + P+0Y0M0DT0H5M15S = **2010-11-07 00:15:35 EDT** | DAYS: **0**
|
||||
test_time_fall_type3_dt_type2_redodt: FWD: 2010-11-07 01:12:33 EDT - 2010-11-07 00:10:20 EDT = **P+0Y0M0DT1H2M13S** | BACK: 2010-11-07 00:10:20 EDT + P+0Y0M0DT1H2M13S = **2010-11-07 01:12:33 EDT** | DAYS: **0**
|
||||
test_time_fall_type3_dt_type2_redost: FWD: 2010-11-07 01:14:44 EST - 2010-11-07 00:10:20 EDT = **P+0Y0M0DT2H4M24S** | BACK: 2010-11-07 00:10:20 EDT + P+0Y0M0DT2H4M24S = **2010-11-07 01:14:44 EST** | DAYS: **0**
|
||||
test_time_fall_type3_dt_type2_st: FWD: 2010-11-07 03:16:55 EST - 2010-11-07 00:10:20 EDT = **P+0Y0M0DT4H6M35S** | BACK: 2010-11-07 00:10:20 EDT + P+0Y0M0DT4H6M35S = **2010-11-07 03:16:55 EST** | DAYS: **0**
|
||||
test_time_fall_type3_dt_type2_post: FWD: 2010-11-08 19:59:59 EST - 2010-11-07 00:10:20 EDT = **P+0Y0M1DT20H49M39S** | BACK: 2010-11-07 00:10:20 EDT + P+0Y0M1DT20H49M39S = **2010-11-08 19:59:59 EST** | DAYS: **1**
|
||||
test_time_fall_type3_redodt_type2_prev: FWD: 2010-11-06 18:38:28 EDT - 2010-11-07 01:12:33 EDT = **P-0Y0M0DT6H34M5S** | BACK: 2010-11-07 01:12:33 EDT + P-0Y0M0DT6H34M5S = **2010-11-06 18:38:28 EDT** | DAYS: **0**
|
||||
test_time_fall_type3_redodt_type2_dt: FWD: 2010-11-07 00:10:20 EDT - 2010-11-07 01:12:33 EDT = **P-0Y0M0DT1H2M13S** | BACK: 2010-11-07 01:12:33 EDT + P-0Y0M0DT1H2M13S = **2010-11-07 00:10:20 EDT** | DAYS: **0**
|
||||
test_time_fall_type3_redodt_type2_redodt: FWD: 2010-11-07 01:15:35 EDT - 2010-11-07 01:12:33 EDT = **P+0Y0M0DT0H3M2S** | BACK: 2010-11-07 01:12:33 EDT + P+0Y0M0DT0H3M2S = **2010-11-07 01:15:35 EDT** | DAYS: **0**
|
||||
test_time_fall_type3_redodt_type2_redost: FWD: 2010-11-07 01:14:44 EST - 2010-11-07 01:12:33 EDT = **P+0Y0M0DT1H2M11S** | BACK: 2010-11-07 01:12:33 EDT + P+0Y0M0DT1H2M11S = **2010-11-07 01:14:44 EST** | DAYS: **0**
|
||||
test_time_fall_type3_redodt_type2_st: FWD: 2010-11-07 03:16:55 EST - 2010-11-07 01:12:33 EDT = **P+0Y0M0DT3H4M22S** | BACK: 2010-11-07 01:12:33 EDT + P+0Y0M0DT3H4M22S = **2010-11-07 03:16:55 EST** | DAYS: **0**
|
||||
test_time_fall_type3_redodt_type2_post: FWD: 2010-11-08 19:59:59 EST - 2010-11-07 01:12:33 EDT = **P+0Y0M1DT19H47M26S** | BACK: 2010-11-07 01:12:33 EDT + P+0Y0M1DT19H47M26S = **2010-11-08 19:59:59 EST** | DAYS: **1**
|
||||
test_time_fall_type3_redost_type2_prev: FWD: 2010-11-06 18:38:28 EDT - 2010-11-07 01:14:44 EST = **P-0Y0M0DT7H36M16S** | BACK: 2010-11-07 01:14:44 EST + P-0Y0M0DT7H36M16S = **2010-11-06 18:38:28 EDT** | DAYS: **0**
|
||||
test_time_fall_type3_redost_type2_dt: FWD: 2010-11-07 00:10:20 EDT - 2010-11-07 01:14:44 EST = **P-0Y0M0DT2H4M24S** | BACK: 2010-11-07 01:14:44 EST + P-0Y0M0DT2H4M24S = **2010-11-07 00:10:20 EDT** | DAYS: **0**
|
||||
test_time_fall_type3_redost_type2_redodt: FWD: 2010-11-07 01:12:33 EDT - 2010-11-07 01:14:44 EST = **P-0Y0M0DT1H2M11S** | BACK: 2010-11-07 01:14:44 EST + P-0Y0M0DT1H2M11S = **2010-11-07 01:12:33 EDT** | DAYS: **0**
|
||||
test_time_fall_type3_redost_type2_redost: FWD: 2010-11-07 01:16:54 EST - 2010-11-07 01:14:44 EST = **P+0Y0M0DT0H2M10S** | BACK: 2010-11-07 01:14:44 EST + P+0Y0M0DT0H2M10S = **2010-11-07 01:16:54 EST** | DAYS: **0**
|
||||
test_time_fall_type3_redost_type2_st: FWD: 2010-11-07 03:16:55 EST - 2010-11-07 01:14:44 EST = **P+0Y0M0DT2H2M11S** | BACK: 2010-11-07 01:14:44 EST + P+0Y0M0DT2H2M11S = **2010-11-07 03:16:55 EST** | DAYS: **0**
|
||||
test_time_fall_type3_redost_type2_post: FWD: 2010-11-08 19:59:59 EST - 2010-11-07 01:14:44 EST = **P+0Y0M1DT18H45M15S** | BACK: 2010-11-07 01:14:44 EST + P+0Y0M1DT18H45M15S = **2010-11-08 19:59:59 EST** | DAYS: **1**
|
||||
test_time_fall_type3_st_type2_prev: FWD: 2010-11-06 18:38:28 EDT - 2010-11-07 03:16:55 EST = **P-0Y0M0DT9H38M27S** | BACK: 2010-11-07 03:16:55 EST + P-0Y0M0DT9H38M27S = **2010-11-06 18:38:28 EDT** | DAYS: **0**
|
||||
test_time_fall_type3_st_type2_dt: FWD: 2010-11-07 00:10:20 EDT - 2010-11-07 03:16:55 EST = **P-0Y0M0DT4H6M35S** | BACK: 2010-11-07 03:16:55 EST + P-0Y0M0DT4H6M35S = **2010-11-07 00:10:20 EDT** | DAYS: **0**
|
||||
test_time_fall_type3_st_type2_redodt: FWD: 2010-11-07 01:12:33 EDT - 2010-11-07 03:16:55 EST = **P-0Y0M0DT3H4M22S** | BACK: 2010-11-07 03:16:55 EST + P-0Y0M0DT3H4M22S = **2010-11-07 01:12:33 EDT** | DAYS: **0**
|
||||
test_time_fall_type3_st_type2_redost: FWD: 2010-11-07 01:14:44 EST - 2010-11-07 03:16:55 EST = **P-0Y0M0DT2H2M11S** | BACK: 2010-11-07 03:16:55 EST + P-0Y0M0DT2H2M11S = **2010-11-07 01:14:44 EST** | DAYS: **0**
|
||||
test_time_fall_type3_st_type2_st: FWD: 2010-11-07 05:19:56 EST - 2010-11-07 03:16:55 EST = **P+0Y0M0DT2H3M1S** | BACK: 2010-11-07 03:16:55 EST + P+0Y0M0DT2H3M1S = **2010-11-07 05:19:56 EST** | DAYS: **0**
|
||||
test_time_fall_type3_st_type2_post: FWD: 2010-11-08 19:59:59 EST - 2010-11-07 03:16:55 EST = **P+0Y0M1DT16H43M4S** | BACK: 2010-11-07 03:16:55 EST + P+0Y0M1DT16H43M4S = **2010-11-08 19:59:59 EST** | DAYS: **1**
|
||||
test_time_fall_type3_post_type2_prev: FWD: 2010-11-06 18:38:28 EDT - 2010-11-08 19:59:59 EST = **P-0Y0M2DT1H21M31S** | BACK: 2010-11-08 19:59:59 EST + P-0Y0M2DT1H21M31S = **2010-11-06 18:38:28 EDT** | DAYS: **2**
|
||||
test_time_fall_type3_post_type2_dt: FWD: 2010-11-07 00:10:20 EDT - 2010-11-08 19:59:59 EST = **P-0Y0M1DT20H49M39S** | BACK: 2010-11-08 19:59:59 EST + P-0Y0M1DT20H49M39S = **2010-11-07 00:10:20 EDT** | DAYS: **1**
|
||||
test_time_fall_type3_post_type2_redodt: FWD: 2010-11-07 01:12:33 EDT - 2010-11-08 19:59:59 EST = **P-0Y0M1DT19H47M26S** | BACK: 2010-11-08 19:59:59 EST + P-0Y0M1DT19H47M26S = **2010-11-07 01:12:33 EDT** | DAYS: **1**
|
||||
test_time_fall_type3_post_type2_redost: FWD: 2010-11-07 01:14:44 EST - 2010-11-08 19:59:59 EST = **P-0Y0M1DT18H45M15S** | BACK: 2010-11-08 19:59:59 EST + P-0Y0M1DT18H45M15S = **2010-11-07 01:14:44 EST** | DAYS: **1**
|
||||
test_time_fall_type3_post_type2_st: FWD: 2010-11-07 03:16:55 EST - 2010-11-08 19:59:59 EST = **P-0Y0M1DT16H43M4S** | BACK: 2010-11-08 19:59:59 EST + P-0Y0M1DT16H43M4S = **2010-11-07 03:16:55 EST** | DAYS: **1**
|
||||
test_time_fall_type3_post_type2_post: FWD: 2010-11-08 19:59:59 EST - 2010-11-08 18:57:55 EST = **P+0Y0M0DT1H2M4S** | BACK: 2010-11-08 18:57:55 EST + P+0Y0M0DT1H2M4S = **2010-11-08 19:59:59 EST** | DAYS: **0**
|
||||
-47
@@ -1,10 +1,3 @@
|
||||
--TEST--
|
||||
DateTime::diff() add() sub() -- fall type3 type3
|
||||
--CREDITS--
|
||||
Daniel Convissor <danielc@php.net>
|
||||
--XFAIL--
|
||||
PHP < 5.4 has bugs
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
/*
|
||||
@@ -12,7 +5,6 @@ PHP < 5.4 has bugs
|
||||
* in a userland package. Please be so kind as to leave them.
|
||||
*/
|
||||
|
||||
require './examine_diff.inc';
|
||||
date_default_timezone_set('America/New_York');
|
||||
|
||||
|
||||
@@ -229,42 +221,3 @@ echo "test_time_fall_type3_post_type3_post: ";
|
||||
$end = new DateTime('2010-11-08 19:59:59'); // post, zt3
|
||||
$start = new DateTime('2010-11-08 18:57:55'); // sp post, zt3
|
||||
examine_diff($end, $start, 'P+0Y0M0DT1H2M4S', 0);
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
test_time_fall_type3_prev_type3_prev: FWD: 2010-11-06 18:38:28 EDT - 2010-10-04 02:18:48 EDT = **P+0Y1M2DT16H19M40S** | BACK: 2010-10-04 02:18:48 EDT + P+0Y1M2DT16H19M40S = **2010-11-06 18:38:28 EDT** | DAYS: **33**
|
||||
test_time_fall_type3_prev_type3_dt: FWD: 2010-11-07 00:10:20 EDT - 2010-11-06 18:38:28 EDT = **P+0Y0M0DT5H31M52S** | BACK: 2010-11-06 18:38:28 EDT + P+0Y0M0DT5H31M52S = **2010-11-07 00:10:20 EDT** | DAYS: **0**
|
||||
test_time_fall_type3_prev_type3_redodt: FWD: 2010-11-07 01:12:33 EDT - 2010-11-06 18:38:28 EDT = **P+0Y0M0DT6H34M5S** | BACK: 2010-11-06 18:38:28 EDT + P+0Y0M0DT6H34M5S = **2010-11-07 01:12:33 EDT** | DAYS: **0**
|
||||
test_time_fall_type3_prev_type3_redost: FWD: 2010-11-07 01:14:44 EST - 2010-11-06 18:38:28 EDT = **P+0Y0M0DT7H36M16S** | BACK: 2010-11-06 18:38:28 EDT + P+0Y0M0DT7H36M16S = **2010-11-07 01:14:44 EST** | DAYS: **0**
|
||||
test_time_fall_type3_prev_type3_st: FWD: 2010-11-07 03:16:55 EST - 2010-11-06 18:38:28 EDT = **P+0Y0M0DT9H38M27S** | BACK: 2010-11-06 18:38:28 EDT + P+0Y0M0DT9H38M27S = **2010-11-07 03:16:55 EST** | DAYS: **0**
|
||||
test_time_fall_type3_prev_type3_post: FWD: 2010-11-08 19:59:59 EST - 2010-11-06 18:38:28 EDT = **P+0Y0M2DT1H21M31S** | BACK: 2010-11-06 18:38:28 EDT + P+0Y0M2DT1H21M31S = **2010-11-08 19:59:59 EST** | DAYS: **2**
|
||||
test_time_fall_type3_dt_type3_prev: FWD: 2010-11-06 18:38:28 EDT - 2010-11-07 00:10:20 EDT = **P-0Y0M0DT5H31M52S** | BACK: 2010-11-07 00:10:20 EDT + P-0Y0M0DT5H31M52S = **2010-11-06 18:38:28 EDT** | DAYS: **0**
|
||||
test_time_fall_type3_dt_type3_dt: FWD: 2010-11-07 00:15:35 EDT - 2010-11-07 00:10:20 EDT = **P+0Y0M0DT0H5M15S** | BACK: 2010-11-07 00:10:20 EDT + P+0Y0M0DT0H5M15S = **2010-11-07 00:15:35 EDT** | DAYS: **0**
|
||||
test_time_fall_type3_dt_type3_redodt: FWD: 2010-11-07 01:12:33 EDT - 2010-11-07 00:10:20 EDT = **P+0Y0M0DT1H2M13S** | BACK: 2010-11-07 00:10:20 EDT + P+0Y0M0DT1H2M13S = **2010-11-07 01:12:33 EDT** | DAYS: **0**
|
||||
test_time_fall_type3_dt_type3_redost: FWD: 2010-11-07 01:14:44 EST - 2010-11-07 00:10:20 EDT = **P+0Y0M0DT2H4M24S** | BACK: 2010-11-07 00:10:20 EDT + P+0Y0M0DT2H4M24S = **2010-11-07 01:14:44 EST** | DAYS: **0**
|
||||
test_time_fall_type3_dt_type3_st: FWD: 2010-11-07 03:16:55 EST - 2010-11-07 00:10:20 EDT = **P+0Y0M0DT4H6M35S** | BACK: 2010-11-07 00:10:20 EDT + P+0Y0M0DT4H6M35S = **2010-11-07 03:16:55 EST** | DAYS: **0**
|
||||
test_time_fall_type3_dt_type3_post: FWD: 2010-11-08 19:59:59 EST - 2010-11-07 00:10:20 EDT = **P+0Y0M1DT20H49M39S** | BACK: 2010-11-07 00:10:20 EDT + P+0Y0M1DT20H49M39S = **2010-11-08 19:59:59 EST** | DAYS: **1**
|
||||
test_time_fall_type3_redodt_type3_prev: FWD: 2010-11-06 18:38:28 EDT - 2010-11-07 01:12:33 EDT = **P-0Y0M0DT6H34M5S** | BACK: 2010-11-07 01:12:33 EDT + P-0Y0M0DT6H34M5S = **2010-11-06 18:38:28 EDT** | DAYS: **0**
|
||||
test_time_fall_type3_redodt_type3_dt: FWD: 2010-11-07 00:10:20 EDT - 2010-11-07 01:12:33 EDT = **P-0Y0M0DT1H2M13S** | BACK: 2010-11-07 01:12:33 EDT + P-0Y0M0DT1H2M13S = **2010-11-07 00:10:20 EDT** | DAYS: **0**
|
||||
test_time_fall_type3_redodt_type3_redodt: FWD: 2010-11-07 01:15:35 EDT - 2010-11-07 01:12:33 EDT = **P+0Y0M0DT0H3M2S** | BACK: 2010-11-07 01:12:33 EDT + P+0Y0M0DT0H3M2S = **2010-11-07 01:15:35 EDT** | DAYS: **0**
|
||||
test_time_fall_type3_redodt_type3_redost: FWD: 2010-11-07 01:14:44 EST - 2010-11-07 01:12:33 EDT = **P+0Y0M0DT1H2M11S** | BACK: 2010-11-07 01:12:33 EDT + P+0Y0M0DT1H2M11S = **2010-11-07 01:14:44 EST** | DAYS: **0**
|
||||
test_time_fall_type3_redodt_type3_st: FWD: 2010-11-07 03:16:55 EST - 2010-11-07 01:12:33 EDT = **P+0Y0M0DT3H4M22S** | BACK: 2010-11-07 01:12:33 EDT + P+0Y0M0DT3H4M22S = **2010-11-07 03:16:55 EST** | DAYS: **0**
|
||||
test_time_fall_type3_redodt_type3_post: FWD: 2010-11-08 19:59:59 EST - 2010-11-07 01:12:33 EDT = **P+0Y0M1DT19H47M26S** | BACK: 2010-11-07 01:12:33 EDT + P+0Y0M1DT19H47M26S = **2010-11-08 19:59:59 EST** | DAYS: **1**
|
||||
test_time_fall_type3_redost_type3_prev: FWD: 2010-11-06 18:38:28 EDT - 2010-11-07 01:14:44 EST = **P-0Y0M0DT7H36M16S** | BACK: 2010-11-07 01:14:44 EST + P-0Y0M0DT7H36M16S = **2010-11-06 18:38:28 EDT** | DAYS: **0**
|
||||
test_time_fall_type3_redost_type3_dt: FWD: 2010-11-07 00:10:20 EDT - 2010-11-07 01:14:44 EST = **P-0Y0M0DT2H4M24S** | BACK: 2010-11-07 01:14:44 EST + P-0Y0M0DT2H4M24S = **2010-11-07 00:10:20 EDT** | DAYS: **0**
|
||||
test_time_fall_type3_redost_type3_redodt: FWD: 2010-11-07 01:12:33 EDT - 2010-11-07 01:14:44 EST = **P-0Y0M0DT1H2M11S** | BACK: 2010-11-07 01:14:44 EST + P-0Y0M0DT1H2M11S = **2010-11-07 01:12:33 EDT** | DAYS: **0**
|
||||
test_time_fall_type3_redost_type3_redost: FWD: 2010-11-07 01:16:54 EST - 2010-11-07 01:14:44 EST = **P+0Y0M0DT0H2M10S** | BACK: 2010-11-07 01:14:44 EST + P+0Y0M0DT0H2M10S = **2010-11-07 01:16:54 EST** | DAYS: **0**
|
||||
test_time_fall_type3_redost_type3_st: FWD: 2010-11-07 03:16:55 EST - 2010-11-07 01:14:44 EST = **P+0Y0M0DT2H2M11S** | BACK: 2010-11-07 01:14:44 EST + P+0Y0M0DT2H2M11S = **2010-11-07 03:16:55 EST** | DAYS: **0**
|
||||
test_time_fall_type3_redost_type3_post: FWD: 2010-11-08 19:59:59 EST - 2010-11-07 01:14:44 EST = **P+0Y0M1DT18H45M15S** | BACK: 2010-11-07 01:14:44 EST + P+0Y0M1DT18H45M15S = **2010-11-08 19:59:59 EST** | DAYS: **1**
|
||||
test_time_fall_type3_st_type3_prev: FWD: 2010-11-06 18:38:28 EDT - 2010-11-07 03:16:55 EST = **P-0Y0M0DT9H38M27S** | BACK: 2010-11-07 03:16:55 EST + P-0Y0M0DT9H38M27S = **2010-11-06 18:38:28 EDT** | DAYS: **0**
|
||||
test_time_fall_type3_st_type3_dt: FWD: 2010-11-07 00:10:20 EDT - 2010-11-07 03:16:55 EST = **P-0Y0M0DT4H6M35S** | BACK: 2010-11-07 03:16:55 EST + P-0Y0M0DT4H6M35S = **2010-11-07 00:10:20 EDT** | DAYS: **0**
|
||||
test_time_fall_type3_st_type3_redodt: FWD: 2010-11-07 01:12:33 EDT - 2010-11-07 03:16:55 EST = **P-0Y0M0DT3H4M22S** | BACK: 2010-11-07 03:16:55 EST + P-0Y0M0DT3H4M22S = **2010-11-07 01:12:33 EDT** | DAYS: **0**
|
||||
test_time_fall_type3_st_type3_redost: FWD: 2010-11-07 01:14:44 EST - 2010-11-07 03:16:55 EST = **P-0Y0M0DT2H2M11S** | BACK: 2010-11-07 03:16:55 EST + P-0Y0M0DT2H2M11S = **2010-11-07 01:14:44 EST** | DAYS: **0**
|
||||
test_time_fall_type3_st_type3_st: FWD: 2010-11-07 05:19:56 EST - 2010-11-07 03:16:55 EST = **P+0Y0M0DT2H3M1S** | BACK: 2010-11-07 03:16:55 EST + P+0Y0M0DT2H3M1S = **2010-11-07 05:19:56 EST** | DAYS: **0**
|
||||
test_time_fall_type3_st_type3_post: FWD: 2010-11-08 19:59:59 EST - 2010-11-07 03:16:55 EST = **P+0Y0M1DT16H43M4S** | BACK: 2010-11-07 03:16:55 EST + P+0Y0M1DT16H43M4S = **2010-11-08 19:59:59 EST** | DAYS: **1**
|
||||
test_time_fall_type3_post_type3_prev: FWD: 2010-11-06 18:38:28 EDT - 2010-11-08 19:59:59 EST = **P-0Y0M2DT1H21M31S** | BACK: 2010-11-08 19:59:59 EST + P-0Y0M2DT1H21M31S = **2010-11-06 18:38:28 EDT** | DAYS: **2**
|
||||
test_time_fall_type3_post_type3_dt: FWD: 2010-11-07 00:10:20 EDT - 2010-11-08 19:59:59 EST = **P-0Y0M1DT20H49M39S** | BACK: 2010-11-08 19:59:59 EST + P-0Y0M1DT20H49M39S = **2010-11-07 00:10:20 EDT** | DAYS: **1**
|
||||
test_time_fall_type3_post_type3_redodt: FWD: 2010-11-07 01:12:33 EDT - 2010-11-08 19:59:59 EST = **P-0Y0M1DT19H47M26S** | BACK: 2010-11-08 19:59:59 EST + P-0Y0M1DT19H47M26S = **2010-11-07 01:12:33 EDT** | DAYS: **1**
|
||||
test_time_fall_type3_post_type3_redost: FWD: 2010-11-07 01:14:44 EST - 2010-11-08 19:59:59 EST = **P-0Y0M1DT18H45M15S** | BACK: 2010-11-08 19:59:59 EST + P-0Y0M1DT18H45M15S = **2010-11-07 01:14:44 EST** | DAYS: **1**
|
||||
test_time_fall_type3_post_type3_st: FWD: 2010-11-07 03:16:55 EST - 2010-11-08 19:59:59 EST = **P-0Y0M1DT16H43M4S** | BACK: 2010-11-08 19:59:59 EST + P-0Y0M1DT16H43M4S = **2010-11-07 03:16:55 EST** | DAYS: **1**
|
||||
test_time_fall_type3_post_type3_post: FWD: 2010-11-08 19:59:59 EST - 2010-11-08 18:57:55 EST = **P+0Y0M0DT1H2M4S** | BACK: 2010-11-08 18:57:55 EST + P+0Y0M0DT1H2M4S = **2010-11-08 19:59:59 EST** | DAYS: **0**
|
||||
@@ -0,0 +1,208 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* Note: test names match method names in a set of PHPUnit tests
|
||||
* in a userland package. Please be so kind as to leave them.
|
||||
*/
|
||||
|
||||
date_default_timezone_set('America/New_York');
|
||||
|
||||
|
||||
/*
|
||||
* Check PHP bug 49081
|
||||
*/
|
||||
echo "test_bug_49081__1: ";
|
||||
examine_diff('2010-03-31', '2010-03-01', 'P+0Y0M30DT0H0M0S', 30);
|
||||
|
||||
echo "test_bug_49081__2: ";
|
||||
examine_diff('2010-04-01', '2010-03-01', 'P+0Y1M0DT0H0M0S', 31);
|
||||
|
||||
echo "test_bug_49081__3: ";
|
||||
examine_diff('2010-04-01', '2010-03-31', 'P+0Y0M1DT0H0M0S', 1);
|
||||
|
||||
echo "test_bug_49081__4: ";
|
||||
examine_diff('2010-04-29', '2010-03-31', 'P+0Y0M29DT0H0M0S', 29);
|
||||
|
||||
echo "test_bug_49081__5: ";
|
||||
examine_diff('2010-04-30', '2010-03-31', 'P+0Y0M30DT0H0M0S', 30);
|
||||
|
||||
echo "test_bug_49081__6: ";
|
||||
examine_diff('2010-04-30', '2010-03-30', 'P+0Y1M0DT0H0M0S', 31);
|
||||
|
||||
echo "test_bug_49081__7: ";
|
||||
examine_diff('2010-04-30', '2010-03-29', 'P+0Y1M1DT0H0M0S', 32);
|
||||
|
||||
echo "test_bug_49081__8: ";
|
||||
examine_diff('2010-01-29', '2010-01-01', 'P+0Y0M28DT0H0M0S', 28);
|
||||
|
||||
echo "test_bug_49081__9: ";
|
||||
examine_diff('2010-01-30', '2010-01-01', 'P+0Y0M29DT0H0M0S', 29);
|
||||
|
||||
echo "test_bug_49081__10: ";
|
||||
examine_diff('2010-01-31', '2010-01-01', 'P+0Y0M30DT0H0M0S', 30);
|
||||
|
||||
echo "test_bug_49081__11: ";
|
||||
examine_diff('2010-02-01', '2010-01-01', 'P+0Y1M0DT0H0M0S', 31);
|
||||
|
||||
echo "test_bug_49081__12: ";
|
||||
examine_diff('2010-02-01', '2010-01-31', 'P+0Y0M1DT0H0M0S', 1);
|
||||
|
||||
echo "test_bug_49081__13: ";
|
||||
examine_diff('2010-02-27', '2010-01-31', 'P+0Y0M27DT0H0M0S', 27);
|
||||
|
||||
echo "test_bug_49081__14: ";
|
||||
examine_diff('2010-02-28', '2010-01-31', 'P+0Y0M28DT0H0M0S', 28);
|
||||
|
||||
echo "test_bug_49081__15: ";
|
||||
examine_diff('2010-02-28', '2010-01-30', 'P+0Y0M29DT0H0M0S', 29);
|
||||
|
||||
echo "test_bug_49081__16: ";
|
||||
examine_diff('2010-02-28', '2010-01-29', 'P+0Y0M30DT0H0M0S', 30);
|
||||
|
||||
echo "test_bug_49081__17: ";
|
||||
examine_diff('2010-02-28', '2010-01-28', 'P+0Y1M0DT0H0M0S', 31);
|
||||
|
||||
echo "test_bug_49081__18: ";
|
||||
examine_diff('2010-02-28', '2010-01-27', 'P+0Y1M1DT0H0M0S', 32);
|
||||
|
||||
echo "test_bug_49081__19: ";
|
||||
examine_diff('2010-03-01', '2010-01-01', 'P+0Y2M0DT0H0M0S', 59);
|
||||
|
||||
echo "test_bug_49081__20: ";
|
||||
examine_diff('2010-03-01', '2010-01-31', 'P+0Y0M29DT0H0M0S', 29);
|
||||
|
||||
echo "test_bug_49081__21: ";
|
||||
examine_diff('2010-03-27', '2010-01-31', 'P+0Y1M24DT0H0M0S', 55);
|
||||
|
||||
echo "test_bug_49081__22: ";
|
||||
examine_diff('2010-03-28', '2010-01-31', 'P+0Y1M25DT0H0M0S', 56);
|
||||
|
||||
echo "test_bug_49081__23: ";
|
||||
examine_diff('2010-03-29', '2010-01-31', 'P+0Y1M26DT0H0M0S', 57);
|
||||
|
||||
echo "test_bug_49081__24: ";
|
||||
examine_diff('2010-03-30', '2010-01-31', 'P+0Y1M27DT0H0M0S', 58);
|
||||
|
||||
echo "test_bug_49081__25: ";
|
||||
examine_diff('2010-03-31', '2010-01-31', 'P+0Y2M0DT0H0M0S', 59);
|
||||
|
||||
echo "test_bug_49081__26: ";
|
||||
examine_diff('2010-03-31', '2010-01-30', 'P+0Y2M1DT0H0M0S', 60);
|
||||
|
||||
echo "test_bug_49081__27: ";
|
||||
examine_diff('2009-01-31', '2009-01-01', 'P+0Y0M30DT0H0M0S', 30);
|
||||
|
||||
echo "test_bug_49081__28: ";
|
||||
examine_diff('2010-03-27', '2010-02-28', 'P+0Y0M27DT0H0M0S', 27);
|
||||
|
||||
echo "test_bug_49081__29: ";
|
||||
examine_diff('2010-03-28', '2010-02-28', 'P+0Y1M0DT0H0M0S', 28);
|
||||
|
||||
echo "test_bug_49081__30: ";
|
||||
examine_diff('2010-03-29', '2010-02-28', 'P+0Y1M1DT0H0M0S', 29);
|
||||
|
||||
echo "test_bug_49081__31: ";
|
||||
examine_diff('2010-03-27', '2010-02-27', 'P+0Y1M0DT0H0M0S', 28);
|
||||
|
||||
echo "test_bug_49081__32: ";
|
||||
examine_diff('2010-03-27', '2010-02-26', 'P+0Y1M1DT0H0M0S', 29);
|
||||
|
||||
|
||||
/*
|
||||
* Check PHP bug 49081, negative
|
||||
*/
|
||||
echo "test_bug_49081_negative__1: ";
|
||||
examine_diff('2010-03-01', '2010-03-31', 'P-0Y0M30DT0H0M0S', 30);
|
||||
|
||||
echo "test_bug_49081_negative__2: ";
|
||||
examine_diff('2010-03-01', '2010-04-01', 'P-0Y1M0DT0H0M0S', 31);
|
||||
|
||||
echo "test_bug_49081_negative__3: ";
|
||||
examine_diff('2010-03-31', '2010-04-01', 'P-0Y0M1DT0H0M0S', 1);
|
||||
|
||||
echo "test_bug_49081_negative__4: ";
|
||||
examine_diff('2010-03-31', '2010-04-29', 'P-0Y0M29DT0H0M0S', 29);
|
||||
|
||||
echo "test_bug_49081_negative__5: ";
|
||||
examine_diff('2010-03-31', '2010-04-30', 'P-0Y0M30DT0H0M0S', 30);
|
||||
|
||||
echo "test_bug_49081_negative__6: ";
|
||||
examine_diff('2010-03-30', '2010-04-30', 'P-0Y1M0DT0H0M0S', 31);
|
||||
|
||||
echo "test_bug_49081_negative__7: ";
|
||||
examine_diff('2010-03-29', '2010-04-30', 'P-0Y1M1DT0H0M0S', 32);
|
||||
|
||||
echo "test_bug_49081_negative__8: ";
|
||||
examine_diff('2010-01-01', '2010-01-29', 'P-0Y0M28DT0H0M0S', 28);
|
||||
|
||||
echo "test_bug_49081_negative__9: ";
|
||||
examine_diff('2010-01-01', '2010-01-30', 'P-0Y0M29DT0H0M0S', 29);
|
||||
|
||||
echo "test_bug_49081_negative__10: ";
|
||||
examine_diff('2010-01-01', '2010-01-31', 'P-0Y0M30DT0H0M0S', 30);
|
||||
|
||||
echo "test_bug_49081_negative__11: ";
|
||||
examine_diff('2010-01-01', '2010-02-01', 'P-0Y1M0DT0H0M0S', 31);
|
||||
|
||||
echo "test_bug_49081_negative__12: ";
|
||||
examine_diff('2010-01-31', '2010-02-01', 'P-0Y0M1DT0H0M0S', 1);
|
||||
|
||||
echo "test_bug_49081_negative__13: ";
|
||||
examine_diff('2010-01-31', '2010-02-27', 'P-0Y0M27DT0H0M0S', 27);
|
||||
|
||||
echo "test_bug_49081_negative__14: ";
|
||||
examine_diff('2010-01-31', '2010-02-28', 'P-0Y0M28DT0H0M0S', 28);
|
||||
|
||||
echo "test_bug_49081_negative__15: ";
|
||||
examine_diff('2010-01-30', '2010-02-28', 'P-0Y0M29DT0H0M0S', 29);
|
||||
|
||||
echo "test_bug_49081_negative__16: ";
|
||||
examine_diff('2010-01-29', '2010-02-28', 'P-0Y0M30DT0H0M0S', 30);
|
||||
|
||||
echo "test_bug_49081_negative__17: ";
|
||||
examine_diff('2010-01-28', '2010-02-28', 'P-0Y1M0DT0H0M0S', 31);
|
||||
|
||||
echo "test_bug_49081_negative__18: ";
|
||||
examine_diff('2010-01-27', '2010-02-28', 'P-0Y1M1DT0H0M0S', 32);
|
||||
|
||||
echo "test_bug_49081_negative__19: ";
|
||||
examine_diff('2010-01-01', '2010-03-01', 'P-0Y2M0DT0H0M0S', 59);
|
||||
|
||||
echo "test_bug_49081_negative__20: ";
|
||||
examine_diff('2010-01-31', '2010-03-01', 'P-0Y1M1DT0H0M0S', 29);
|
||||
|
||||
echo "test_bug_49081_negative__21: ";
|
||||
examine_diff('2010-01-31', '2010-03-27', 'P-0Y1M27DT0H0M0S', 55);
|
||||
|
||||
echo "test_bug_49081_negative__22: ";
|
||||
examine_diff('2010-01-31', '2010-03-28', 'P-0Y1M28DT0H0M0S', 56);
|
||||
|
||||
echo "test_bug_49081_negative__23: ";
|
||||
examine_diff('2010-01-31', '2010-03-29', 'P-0Y1M29DT0H0M0S', 57);
|
||||
|
||||
echo "test_bug_49081_negative__24: ";
|
||||
examine_diff('2010-01-31', '2010-03-30', 'P-0Y1M30DT0H0M0S', 58);
|
||||
|
||||
echo "test_bug_49081_negative__25: ";
|
||||
examine_diff('2010-01-31', '2010-03-31', 'P-0Y2M0DT0H0M0S', 59);
|
||||
|
||||
echo "test_bug_49081_negative__26: ";
|
||||
examine_diff('2010-01-30', '2010-03-31', 'P-0Y2M1DT0H0M0S', 60);
|
||||
|
||||
echo "test_bug_49081_negative__27: ";
|
||||
examine_diff('2009-01-01', '2009-01-31', 'P-0Y0M30DT0H0M0S', 30);
|
||||
|
||||
echo "test_bug_49081_negative__28: ";
|
||||
examine_diff('2010-02-28', '2010-03-27', 'P-0Y0M27DT0H0M0S', 27);
|
||||
|
||||
echo "test_bug_49081_negative__29: ";
|
||||
examine_diff('2010-02-28', '2010-03-28', 'P-0Y1M0DT0H0M0S', 28);
|
||||
|
||||
echo "test_bug_49081_negative__30: ";
|
||||
examine_diff('2010-02-28', '2010-03-29', 'P-0Y1M1DT0H0M0S', 29);
|
||||
|
||||
echo "test_bug_49081_negative__31: ";
|
||||
examine_diff('2010-02-27', '2010-03-27', 'P-0Y1M0DT0H0M0S', 28);
|
||||
|
||||
echo "test_bug_49081_negative__32: ";
|
||||
examine_diff('2010-02-26', '2010-03-27', 'P-0Y1M1DT0H0M0S', 29);
|
||||
-11
@@ -1,8 +1,3 @@
|
||||
--TEST--
|
||||
DateTime::diff() add() sub() -- massive
|
||||
--CREDITS--
|
||||
Daniel Convissor <danielc@php.net>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
/*
|
||||
@@ -10,7 +5,6 @@ Daniel Convissor <danielc@php.net>
|
||||
* in a userland package. Please be so kind as to leave them.
|
||||
*/
|
||||
|
||||
require './examine_diff.inc';
|
||||
date_default_timezone_set('America/New_York');
|
||||
|
||||
|
||||
@@ -38,8 +32,3 @@ $start->setDate(333333, 1, 1);
|
||||
$start->setTime(16, 18, 02);
|
||||
|
||||
examine_diff($end, $start, 'P-666666Y0M0DT0H0M0S', 243494757);
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
test_massive_positive: FWD: 333333-01-01 16:18:02 EST - -333333-01-01 16:18:02 EST = **P+666666Y0M0DT0H0M0S** | BACK: -333333-01-01 16:18:02 EST + P+666666Y0M0DT0H0M0S = **333333-01-01 16:18:02 EST** | DAYS: **243494757**
|
||||
test_massive_negative: FWD: -333333-01-01 16:18:02 EST - 333333-01-01 16:18:02 EST = **P-666666Y0M0DT0H0M0S** | BACK: 333333-01-01 16:18:02 EST + P-666666Y0M0DT0H0M0S = **-333333-01-01 16:18:02 EST** | DAYS: **243494757**
|
||||
-27
@@ -1,10 +1,3 @@
|
||||
--TEST--
|
||||
DateTime::diff() add() sub() -- spring type2 type2
|
||||
--CREDITS--
|
||||
Daniel Convissor <danielc@php.net>
|
||||
--XFAIL--
|
||||
PHP < 5.4 has bugs
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
/*
|
||||
@@ -12,7 +5,6 @@ PHP < 5.4 has bugs
|
||||
* in a userland package. Please be so kind as to leave them.
|
||||
*/
|
||||
|
||||
require './examine_diff.inc';
|
||||
date_default_timezone_set('America/New_York');
|
||||
|
||||
|
||||
@@ -103,22 +95,3 @@ echo "test_time_spring_type2_post_type2_post: ";
|
||||
$end = new DateTime('2010-03-15 19:59:59 EDT'); // post, zt2
|
||||
$start = new DateTime('2010-03-15 18:57:55 EDT'); // sp post, zt2
|
||||
examine_diff($end, $start, 'P+0Y0M0DT1H2M4S', 0);
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
test_time_spring_type2_prev_type2_prev: FWD: 2010-03-13 18:38:28 EST - 2010-02-11 02:18:48 EST = **P+0Y1M2DT16H19M40S** | BACK: 2010-02-11 02:18:48 EST + P+0Y1M2DT16H19M40S = **2010-03-13 18:38:28 EST** | DAYS: **30**
|
||||
test_time_spring_type2_prev_type2_st: FWD: 2010-03-14 00:10:20 EST - 2010-03-13 18:38:28 EST = **P+0Y0M0DT5H31M52S** | BACK: 2010-03-13 18:38:28 EST + P+0Y0M0DT5H31M52S = **2010-03-14 00:10:20 EST** | DAYS: **0**
|
||||
test_time_spring_type2_prev_type2_dt: FWD: 2010-03-14 03:16:55 EDT - 2010-03-13 18:38:28 EST = **P+0Y0M0DT7H38M27S** | BACK: 2010-03-13 18:38:28 EST + P+0Y0M0DT7H38M27S = **2010-03-14 03:16:55 EDT** | DAYS: **0**
|
||||
test_time_spring_type2_prev_type2_post: FWD: 2010-03-15 19:59:59 EDT - 2010-03-13 18:38:28 EST = **P+0Y0M2DT1H21M31S** | BACK: 2010-03-13 18:38:28 EST + P+0Y0M2DT1H21M31S = **2010-03-15 19:59:59 EDT** | DAYS: **2**
|
||||
test_time_spring_type2_st_type2_prev: FWD: 2010-03-13 18:38:28 EST - 2010-03-14 00:10:20 EST = **P-0Y0M0DT5H31M52S** | BACK: 2010-03-14 00:10:20 EST + P-0Y0M0DT5H31M52S = **2010-03-13 18:38:28 EST** | DAYS: **0**
|
||||
test_time_spring_type2_st_type2_st: FWD: 2010-03-14 00:15:35 EST - 2010-03-14 00:10:20 EST = **P+0Y0M0DT0H5M15S** | BACK: 2010-03-14 00:10:20 EST + P+0Y0M0DT0H5M15S = **2010-03-14 00:15:35 EST** | DAYS: **0**
|
||||
test_time_spring_type2_st_type2_dt: FWD: 2010-03-14 03:16:55 EDT - 2010-03-14 00:10:20 EST = **P+0Y0M0DT2H6M35S** | BACK: 2010-03-14 00:10:20 EST + P+0Y0M0DT2H6M35S = **2010-03-14 03:16:55 EDT** | DAYS: **0**
|
||||
test_time_spring_type2_st_type2_post: FWD: 2010-03-15 19:59:59 EDT - 2010-03-14 00:10:20 EST = **P+0Y0M1DT18H49M39S** | BACK: 2010-03-14 00:10:20 EST + P+0Y0M1DT18H49M39S = **2010-03-15 19:59:59 EDT** | DAYS: **1**
|
||||
test_time_spring_type2_dt_type2_prev: FWD: 2010-03-13 18:38:28 EST - 2010-03-14 03:16:55 EDT = **P-0Y0M0DT7H38M27S** | BACK: 2010-03-14 03:16:55 EDT + P-0Y0M0DT7H38M27S = **2010-03-13 18:38:28 EST** | DAYS: **0**
|
||||
test_time_spring_type2_dt_type2_st: FWD: 2010-03-14 00:10:20 EST - 2010-03-14 03:16:55 EDT = **P-0Y0M0DT2H6M35S** | BACK: 2010-03-14 03:16:55 EDT + P-0Y0M0DT2H6M35S = **2010-03-14 00:10:20 EST** | DAYS: **0**
|
||||
test_time_spring_type2_dt_type2_dt: FWD: 2010-03-14 05:19:56 EDT - 2010-03-14 03:16:55 EDT = **P+0Y0M0DT2H3M1S** | BACK: 2010-03-14 03:16:55 EDT + P+0Y0M0DT2H3M1S = **2010-03-14 05:19:56 EDT** | DAYS: **0**
|
||||
test_time_spring_type2_dt_type2_post: FWD: 2010-03-15 19:59:59 EDT - 2010-03-14 03:16:55 EDT = **P+0Y0M1DT16H43M4S** | BACK: 2010-03-14 03:16:55 EDT + P+0Y0M1DT16H43M4S = **2010-03-15 19:59:59 EDT** | DAYS: **1**
|
||||
test_time_spring_type2_post_type2_prev: FWD: 2010-03-13 18:38:28 EST - 2010-03-15 19:59:59 EDT = **P-0Y0M2DT1H21M31S** | BACK: 2010-03-15 19:59:59 EDT + P-0Y0M2DT1H21M31S = **2010-03-13 18:38:28 EST** | DAYS: **2**
|
||||
test_time_spring_type2_post_type2_st: FWD: 2010-03-14 00:10:20 EST - 2010-03-15 19:59:59 EDT = **P-0Y0M1DT18H49M39S** | BACK: 2010-03-15 19:59:59 EDT + P-0Y0M1DT18H49M39S = **2010-03-14 00:10:20 EST** | DAYS: **1**
|
||||
test_time_spring_type2_post_type2_dt: FWD: 2010-03-14 03:16:55 EDT - 2010-03-15 19:59:59 EDT = **P-0Y0M1DT16H43M4S** | BACK: 2010-03-15 19:59:59 EDT + P-0Y0M1DT16H43M4S = **2010-03-14 03:16:55 EDT** | DAYS: **1**
|
||||
test_time_spring_type2_post_type2_post: FWD: 2010-03-15 19:59:59 EDT - 2010-03-15 18:57:55 EDT = **P+0Y0M0DT1H2M4S** | BACK: 2010-03-15 18:57:55 EDT + P+0Y0M0DT1H2M4S = **2010-03-15 19:59:59 EDT** | DAYS: **0**
|
||||
-27
@@ -1,10 +1,3 @@
|
||||
--TEST--
|
||||
DateTime::diff() add() sub() -- spring type2 type3
|
||||
--CREDITS--
|
||||
Daniel Convissor <danielc@php.net>
|
||||
--XFAIL--
|
||||
PHP < 5.4 has bugs
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
/*
|
||||
@@ -12,7 +5,6 @@ PHP < 5.4 has bugs
|
||||
* in a userland package. Please be so kind as to leave them.
|
||||
*/
|
||||
|
||||
require './examine_diff.inc';
|
||||
date_default_timezone_set('America/New_York');
|
||||
|
||||
|
||||
@@ -103,22 +95,3 @@ echo "test_time_spring_type2_post_type3_post: ";
|
||||
$end = new DateTime('2010-03-15 19:59:59'); // post, zt3
|
||||
$start = new DateTime('2010-03-15 18:57:55 EDT'); // sp post, zt2
|
||||
examine_diff($end, $start, 'P+0Y0M0DT1H2M4S', 0);
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
test_time_spring_type2_prev_type3_prev: FWD: 2010-03-13 18:38:28 EST - 2010-02-11 02:18:48 EST = **P+0Y1M2DT16H19M40S** | BACK: 2010-02-11 02:18:48 EST + P+0Y1M2DT16H19M40S = **2010-03-13 18:38:28 EST** | DAYS: **30**
|
||||
test_time_spring_type2_prev_type3_st: FWD: 2010-03-14 00:10:20 EST - 2010-03-13 18:38:28 EST = **P+0Y0M0DT5H31M52S** | BACK: 2010-03-13 18:38:28 EST + P+0Y0M0DT5H31M52S = **2010-03-14 00:10:20 EST** | DAYS: **0**
|
||||
test_time_spring_type2_prev_type3_dt: FWD: 2010-03-14 03:16:55 EDT - 2010-03-13 18:38:28 EST = **P+0Y0M0DT7H38M27S** | BACK: 2010-03-13 18:38:28 EST + P+0Y0M0DT7H38M27S = **2010-03-14 03:16:55 EDT** | DAYS: **0**
|
||||
test_time_spring_type2_prev_type3_post: FWD: 2010-03-15 19:59:59 EDT - 2010-03-13 18:38:28 EST = **P+0Y0M2DT1H21M31S** | BACK: 2010-03-13 18:38:28 EST + P+0Y0M2DT1H21M31S = **2010-03-15 19:59:59 EDT** | DAYS: **2**
|
||||
test_time_spring_type2_st_type3_prev: FWD: 2010-03-13 18:38:28 EST - 2010-03-14 00:10:20 EST = **P-0Y0M0DT5H31M52S** | BACK: 2010-03-14 00:10:20 EST + P-0Y0M0DT5H31M52S = **2010-03-13 18:38:28 EST** | DAYS: **0**
|
||||
test_time_spring_type2_st_type3_st: FWD: 2010-03-14 00:15:35 EST - 2010-03-14 00:10:20 EST = **P+0Y0M0DT0H5M15S** | BACK: 2010-03-14 00:10:20 EST + P+0Y0M0DT0H5M15S = **2010-03-14 00:15:35 EST** | DAYS: **0**
|
||||
test_time_spring_type2_st_type3_dt: FWD: 2010-03-14 03:16:55 EDT - 2010-03-14 00:10:20 EST = **P+0Y0M0DT2H6M35S** | BACK: 2010-03-14 00:10:20 EST + P+0Y0M0DT2H6M35S = **2010-03-14 03:16:55 EDT** | DAYS: **0**
|
||||
test_time_spring_type2_st_type3_post: FWD: 2010-03-15 19:59:59 EDT - 2010-03-14 00:10:20 EST = **P+0Y0M1DT18H49M39S** | BACK: 2010-03-14 00:10:20 EST + P+0Y0M1DT18H49M39S = **2010-03-15 19:59:59 EDT** | DAYS: **1**
|
||||
test_time_spring_type2_dt_type3_prev: FWD: 2010-03-13 18:38:28 EST - 2010-03-14 03:16:55 EDT = **P-0Y0M0DT7H38M27S** | BACK: 2010-03-14 03:16:55 EDT + P-0Y0M0DT7H38M27S = **2010-03-13 18:38:28 EST** | DAYS: **0**
|
||||
test_time_spring_type2_dt_type3_st: FWD: 2010-03-14 00:10:20 EST - 2010-03-14 03:16:55 EDT = **P-0Y0M0DT2H6M35S** | BACK: 2010-03-14 03:16:55 EDT + P-0Y0M0DT2H6M35S = **2010-03-14 00:10:20 EST** | DAYS: **0**
|
||||
test_time_spring_type2_dt_type3_dt: FWD: 2010-03-14 05:19:56 EDT - 2010-03-14 03:16:55 EDT = **P+0Y0M0DT2H3M1S** | BACK: 2010-03-14 03:16:55 EDT + P+0Y0M0DT2H3M1S = **2010-03-14 05:19:56 EDT** | DAYS: **0**
|
||||
test_time_spring_type2_dt_type3_post: FWD: 2010-03-15 19:59:59 EDT - 2010-03-14 03:16:55 EDT = **P+0Y0M1DT16H43M4S** | BACK: 2010-03-14 03:16:55 EDT + P+0Y0M1DT16H43M4S = **2010-03-15 19:59:59 EDT** | DAYS: **1**
|
||||
test_time_spring_type2_post_type3_prev: FWD: 2010-03-13 18:38:28 EST - 2010-03-15 19:59:59 EDT = **P-0Y0M2DT1H21M31S** | BACK: 2010-03-15 19:59:59 EDT + P-0Y0M2DT1H21M31S = **2010-03-13 18:38:28 EST** | DAYS: **2**
|
||||
test_time_spring_type2_post_type3_st: FWD: 2010-03-14 00:10:20 EST - 2010-03-15 19:59:59 EDT = **P-0Y0M1DT18H49M39S** | BACK: 2010-03-15 19:59:59 EDT + P-0Y0M1DT18H49M39S = **2010-03-14 00:10:20 EST** | DAYS: **1**
|
||||
test_time_spring_type2_post_type3_dt: FWD: 2010-03-14 03:16:55 EDT - 2010-03-15 19:59:59 EDT = **P-0Y0M1DT16H43M4S** | BACK: 2010-03-15 19:59:59 EDT + P-0Y0M1DT16H43M4S = **2010-03-14 03:16:55 EDT** | DAYS: **1**
|
||||
test_time_spring_type2_post_type3_post: FWD: 2010-03-15 19:59:59 EDT - 2010-03-15 18:57:55 EDT = **P+0Y0M0DT1H2M4S** | BACK: 2010-03-15 18:57:55 EDT + P+0Y0M0DT1H2M4S = **2010-03-15 19:59:59 EDT** | DAYS: **0**
|
||||
-27
@@ -1,10 +1,3 @@
|
||||
--TEST--
|
||||
DateTime::diff() add() sub() -- spring type3 type2
|
||||
--CREDITS--
|
||||
Daniel Convissor <danielc@php.net>
|
||||
--XFAIL--
|
||||
PHP < 5.4 has bugs
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
/*
|
||||
@@ -12,7 +5,6 @@ PHP < 5.4 has bugs
|
||||
* in a userland package. Please be so kind as to leave them.
|
||||
*/
|
||||
|
||||
require './examine_diff.inc';
|
||||
date_default_timezone_set('America/New_York');
|
||||
|
||||
|
||||
@@ -103,22 +95,3 @@ echo "test_time_spring_type3_post_type2_post: ";
|
||||
$end = new DateTime('2010-03-15 19:59:59 EDT'); // post, zt2
|
||||
$start = new DateTime('2010-03-15 18:57:55'); // sp post, zt3
|
||||
examine_diff($end, $start, 'P+0Y0M0DT1H2M4S', 0);
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
test_time_spring_type3_prev_type2_prev: FWD: 2010-03-13 18:38:28 EST - 2010-02-11 02:18:48 EST = **P+0Y1M2DT16H19M40S** | BACK: 2010-02-11 02:18:48 EST + P+0Y1M2DT16H19M40S = **2010-03-13 18:38:28 EST** | DAYS: **30**
|
||||
test_time_spring_type3_prev_type2_st: FWD: 2010-03-14 00:10:20 EST - 2010-03-13 18:38:28 EST = **P+0Y0M0DT5H31M52S** | BACK: 2010-03-13 18:38:28 EST + P+0Y0M0DT5H31M52S = **2010-03-14 00:10:20 EST** | DAYS: **0**
|
||||
test_time_spring_type3_prev_type2_dt: FWD: 2010-03-14 03:16:55 EDT - 2010-03-13 18:38:28 EST = **P+0Y0M0DT7H38M27S** | BACK: 2010-03-13 18:38:28 EST + P+0Y0M0DT7H38M27S = **2010-03-14 03:16:55 EDT** | DAYS: **0**
|
||||
test_time_spring_type3_prev_type2_post: FWD: 2010-03-15 19:59:59 EDT - 2010-03-13 18:38:28 EST = **P+0Y0M2DT1H21M31S** | BACK: 2010-03-13 18:38:28 EST + P+0Y0M2DT1H21M31S = **2010-03-15 19:59:59 EDT** | DAYS: **2**
|
||||
test_time_spring_type3_st_type2_prev: FWD: 2010-03-13 18:38:28 EST - 2010-03-14 00:10:20 EST = **P-0Y0M0DT5H31M52S** | BACK: 2010-03-14 00:10:20 EST + P-0Y0M0DT5H31M52S = **2010-03-13 18:38:28 EST** | DAYS: **0**
|
||||
test_time_spring_type3_st_type2_st: FWD: 2010-03-14 00:15:35 EST - 2010-03-14 00:10:20 EST = **P+0Y0M0DT0H5M15S** | BACK: 2010-03-14 00:10:20 EST + P+0Y0M0DT0H5M15S = **2010-03-14 00:15:35 EST** | DAYS: **0**
|
||||
test_time_spring_type3_st_type2_dt: FWD: 2010-03-14 03:16:55 EDT - 2010-03-14 00:10:20 EST = **P+0Y0M0DT2H6M35S** | BACK: 2010-03-14 00:10:20 EST + P+0Y0M0DT2H6M35S = **2010-03-14 03:16:55 EDT** | DAYS: **0**
|
||||
test_time_spring_type3_st_type2_post: FWD: 2010-03-15 19:59:59 EDT - 2010-03-14 00:10:20 EST = **P+0Y0M1DT18H49M39S** | BACK: 2010-03-14 00:10:20 EST + P+0Y0M1DT18H49M39S = **2010-03-15 19:59:59 EDT** | DAYS: **1**
|
||||
test_time_spring_type3_dt_type2_prev: FWD: 2010-03-13 18:38:28 EST - 2010-03-14 03:16:55 EDT = **P-0Y0M0DT7H38M27S** | BACK: 2010-03-14 03:16:55 EDT + P-0Y0M0DT7H38M27S = **2010-03-13 18:38:28 EST** | DAYS: **0**
|
||||
test_time_spring_type3_dt_type2_st: FWD: 2010-03-14 00:10:20 EST - 2010-03-14 03:16:55 EDT = **P-0Y0M0DT2H6M35S** | BACK: 2010-03-14 03:16:55 EDT + P-0Y0M0DT2H6M35S = **2010-03-14 00:10:20 EST** | DAYS: **0**
|
||||
test_time_spring_type3_dt_type2_dt: FWD: 2010-03-14 05:19:56 EDT - 2010-03-14 03:16:55 EDT = **P+0Y0M0DT2H3M1S** | BACK: 2010-03-14 03:16:55 EDT + P+0Y0M0DT2H3M1S = **2010-03-14 05:19:56 EDT** | DAYS: **0**
|
||||
test_time_spring_type3_dt_type2_post: FWD: 2010-03-15 19:59:59 EDT - 2010-03-14 03:16:55 EDT = **P+0Y0M1DT16H43M4S** | BACK: 2010-03-14 03:16:55 EDT + P+0Y0M1DT16H43M4S = **2010-03-15 19:59:59 EDT** | DAYS: **1**
|
||||
test_time_spring_type3_post_type2_prev: FWD: 2010-03-13 18:38:28 EST - 2010-03-15 19:59:59 EDT = **P-0Y0M2DT1H21M31S** | BACK: 2010-03-15 19:59:59 EDT + P-0Y0M2DT1H21M31S = **2010-03-13 18:38:28 EST** | DAYS: **2**
|
||||
test_time_spring_type3_post_type2_st: FWD: 2010-03-14 00:10:20 EST - 2010-03-15 19:59:59 EDT = **P-0Y0M1DT18H49M39S** | BACK: 2010-03-15 19:59:59 EDT + P-0Y0M1DT18H49M39S = **2010-03-14 00:10:20 EST** | DAYS: **1**
|
||||
test_time_spring_type3_post_type2_dt: FWD: 2010-03-14 03:16:55 EDT - 2010-03-15 19:59:59 EDT = **P-0Y0M1DT16H43M4S** | BACK: 2010-03-15 19:59:59 EDT + P-0Y0M1DT16H43M4S = **2010-03-14 03:16:55 EDT** | DAYS: **1**
|
||||
test_time_spring_type3_post_type2_post: FWD: 2010-03-15 19:59:59 EDT - 2010-03-15 18:57:55 EDT = **P+0Y0M0DT1H2M4S** | BACK: 2010-03-15 18:57:55 EDT + P+0Y0M0DT1H2M4S = **2010-03-15 19:59:59 EDT** | DAYS: **0**
|
||||
-27
@@ -1,10 +1,3 @@
|
||||
--TEST--
|
||||
DateTime::diff() add() sub() -- spring type3 type3
|
||||
--CREDITS--
|
||||
Daniel Convissor <danielc@php.net>
|
||||
--XFAIL--
|
||||
PHP < 5.4 has bugs
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
/*
|
||||
@@ -12,7 +5,6 @@ PHP < 5.4 has bugs
|
||||
* in a userland package. Please be so kind as to leave them.
|
||||
*/
|
||||
|
||||
require './examine_diff.inc';
|
||||
date_default_timezone_set('America/New_York');
|
||||
|
||||
|
||||
@@ -103,22 +95,3 @@ echo "test_time_spring_type3_post_type3_post: ";
|
||||
$end = new DateTime('2010-03-15 19:59:59'); // post, zt3
|
||||
$start = new DateTime('2010-03-15 18:57:55'); // sp post, zt3
|
||||
examine_diff($end, $start, 'P+0Y0M0DT1H2M4S', 0);
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
test_time_spring_type3_prev_type3_prev: FWD: 2010-03-13 18:38:28 EST - 2010-02-11 02:18:48 EST = **P+0Y1M2DT16H19M40S** | BACK: 2010-02-11 02:18:48 EST + P+0Y1M2DT16H19M40S = **2010-03-13 18:38:28 EST** | DAYS: **30**
|
||||
test_time_spring_type3_prev_type3_st: FWD: 2010-03-14 00:10:20 EST - 2010-03-13 18:38:28 EST = **P+0Y0M0DT5H31M52S** | BACK: 2010-03-13 18:38:28 EST + P+0Y0M0DT5H31M52S = **2010-03-14 00:10:20 EST** | DAYS: **0**
|
||||
test_time_spring_type3_prev_type3_dt: FWD: 2010-03-14 03:16:55 EDT - 2010-03-13 18:38:28 EST = **P+0Y0M0DT7H38M27S** | BACK: 2010-03-13 18:38:28 EST + P+0Y0M0DT7H38M27S = **2010-03-14 03:16:55 EDT** | DAYS: **0**
|
||||
test_time_spring_type3_prev_type3_post: FWD: 2010-03-15 19:59:59 EDT - 2010-03-13 18:38:28 EST = **P+0Y0M2DT1H21M31S** | BACK: 2010-03-13 18:38:28 EST + P+0Y0M2DT1H21M31S = **2010-03-15 19:59:59 EDT** | DAYS: **2**
|
||||
test_time_spring_type3_st_type3_prev: FWD: 2010-03-13 18:38:28 EST - 2010-03-14 00:10:20 EST = **P-0Y0M0DT5H31M52S** | BACK: 2010-03-14 00:10:20 EST + P-0Y0M0DT5H31M52S = **2010-03-13 18:38:28 EST** | DAYS: **0**
|
||||
test_time_spring_type3_st_type3_st: FWD: 2010-03-14 00:15:35 EST - 2010-03-14 00:10:20 EST = **P+0Y0M0DT0H5M15S** | BACK: 2010-03-14 00:10:20 EST + P+0Y0M0DT0H5M15S = **2010-03-14 00:15:35 EST** | DAYS: **0**
|
||||
test_time_spring_type3_st_type3_dt: FWD: 2010-03-14 03:16:55 EDT - 2010-03-14 00:10:20 EST = **P+0Y0M0DT2H6M35S** | BACK: 2010-03-14 00:10:20 EST + P+0Y0M0DT2H6M35S = **2010-03-14 03:16:55 EDT** | DAYS: **0**
|
||||
test_time_spring_type3_st_type3_post: FWD: 2010-03-15 19:59:59 EDT - 2010-03-14 00:10:20 EST = **P+0Y0M1DT18H49M39S** | BACK: 2010-03-14 00:10:20 EST + P+0Y0M1DT18H49M39S = **2010-03-15 19:59:59 EDT** | DAYS: **1**
|
||||
test_time_spring_type3_dt_type3_prev: FWD: 2010-03-13 18:38:28 EST - 2010-03-14 03:16:55 EDT = **P-0Y0M0DT7H38M27S** | BACK: 2010-03-14 03:16:55 EDT + P-0Y0M0DT7H38M27S = **2010-03-13 18:38:28 EST** | DAYS: **0**
|
||||
test_time_spring_type3_dt_type3_st: FWD: 2010-03-14 00:10:20 EST - 2010-03-14 03:16:55 EDT = **P-0Y0M0DT2H6M35S** | BACK: 2010-03-14 03:16:55 EDT + P-0Y0M0DT2H6M35S = **2010-03-14 00:10:20 EST** | DAYS: **0**
|
||||
test_time_spring_type3_dt_type3_dt: FWD: 2010-03-14 05:19:56 EDT - 2010-03-14 03:16:55 EDT = **P+0Y0M0DT2H3M1S** | BACK: 2010-03-14 03:16:55 EDT + P+0Y0M0DT2H3M1S = **2010-03-14 05:19:56 EDT** | DAYS: **0**
|
||||
test_time_spring_type3_dt_type3_post: FWD: 2010-03-15 19:59:59 EDT - 2010-03-14 03:16:55 EDT = **P+0Y0M1DT16H43M4S** | BACK: 2010-03-14 03:16:55 EDT + P+0Y0M1DT16H43M4S = **2010-03-15 19:59:59 EDT** | DAYS: **1**
|
||||
test_time_spring_type3_post_type3_prev: FWD: 2010-03-13 18:38:28 EST - 2010-03-15 19:59:59 EDT = **P-0Y0M2DT1H21M31S** | BACK: 2010-03-15 19:59:59 EDT + P-0Y0M2DT1H21M31S = **2010-03-13 18:38:28 EST** | DAYS: **2**
|
||||
test_time_spring_type3_post_type3_st: FWD: 2010-03-14 00:10:20 EST - 2010-03-15 19:59:59 EDT = **P-0Y0M1DT18H49M39S** | BACK: 2010-03-15 19:59:59 EDT + P-0Y0M1DT18H49M39S = **2010-03-14 00:10:20 EST** | DAYS: **1**
|
||||
test_time_spring_type3_post_type3_dt: FWD: 2010-03-14 03:16:55 EDT - 2010-03-15 19:59:59 EDT = **P-0Y0M1DT16H43M4S** | BACK: 2010-03-15 19:59:59 EDT + P-0Y0M1DT16H43M4S = **2010-03-14 03:16:55 EDT** | DAYS: **1**
|
||||
test_time_spring_type3_post_type3_post: FWD: 2010-03-15 19:59:59 EDT - 2010-03-15 18:57:55 EDT = **P+0Y0M0DT1H2M4S** | BACK: 2010-03-15 18:57:55 EDT + P+0Y0M0DT1H2M4S = **2010-03-15 19:59:59 EDT** | DAYS: **0**
|
||||
@@ -0,0 +1,15 @@
|
||||
--TEST--
|
||||
DateTime::diff() days -- absolute
|
||||
--CREDITS--
|
||||
Daniel Convissor <danielc@php.net>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
require 'examine_diff.inc';
|
||||
define('PHPT_DATETIME_SHOW', PHPT_DATETIME_SHOW_DAYS);
|
||||
require 'DateTime_data-absolute.inc';
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
test_absolute_7: DAYS: **7**
|
||||
test_absolute_negative_7: DAYS: **7**
|
||||
@@ -0,0 +1,29 @@
|
||||
--TEST--
|
||||
DateTime::diff() days -- dates
|
||||
--CREDITS--
|
||||
Daniel Convissor <danielc@php.net>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
require 'examine_diff.inc';
|
||||
define('PHPT_DATETIME_SHOW', PHPT_DATETIME_SHOW_DAYS);
|
||||
require 'DateTime_data-dates.inc';
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
test__7: DAYS: **7**
|
||||
test_years_positive__7_by_0_day: DAYS: **2557**
|
||||
test_years_positive__7_by_1_day: DAYS: **2558**
|
||||
test_years_positive__6_shy_1_day: DAYS: **2556**
|
||||
test_years_positive__7_by_1_month: DAYS: **2585**
|
||||
test_years_positive__6_shy_1_month: DAYS: **2526**
|
||||
test_years_positive__7_by_1_month_split_newyear: DAYS: **2588**
|
||||
test_years_positive__6_shy_1_month_split_newyear: DAYS: **2526**
|
||||
test_negative__7: DAYS: **7**
|
||||
test_years_negative__7_by_0_day: DAYS: **2557**
|
||||
test_years_negative__7_by_1_day: DAYS: **2558**
|
||||
test_years_negative__6_shy_1_day: DAYS: **2556**
|
||||
test_years_negative__7_by_1_month: DAYS: **2585**
|
||||
test_years_negative__6_shy_1_month: DAYS: **2526**
|
||||
test_years_negative__7_by_1_month_split_newyear: DAYS: **2588**
|
||||
test_years_negative__6_shy_1_month_split_newyear: DAYS: **2526**
|
||||
@@ -0,0 +1,49 @@
|
||||
--TEST--
|
||||
DateTime::diff() days -- fall type2 type2
|
||||
--CREDITS--
|
||||
Daniel Convissor <danielc@php.net>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
require 'examine_diff.inc';
|
||||
define('PHPT_DATETIME_SHOW', PHPT_DATETIME_SHOW_DAYS);
|
||||
require 'DateTime_data-fall-type2-type2.inc';
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
test_time_fall_type2_prev_type2_prev: DAYS: **33**
|
||||
test_time_fall_type2_prev_type2_dt: DAYS: **0**
|
||||
test_time_fall_type2_prev_type2_redodt: DAYS: **0**
|
||||
test_time_fall_type2_prev_type2_redost: DAYS: **0**
|
||||
test_time_fall_type2_prev_type2_st: DAYS: **0**
|
||||
test_time_fall_type2_prev_type2_post: DAYS: **2**
|
||||
test_time_fall_type2_dt_type2_prev: DAYS: **0**
|
||||
test_time_fall_type2_dt_type2_dt: DAYS: **0**
|
||||
test_time_fall_type2_dt_type2_redodt: DAYS: **0**
|
||||
test_time_fall_type2_dt_type2_redost: DAYS: **0**
|
||||
test_time_fall_type2_dt_type2_st: DAYS: **0**
|
||||
test_time_fall_type2_dt_type2_post: DAYS: **1**
|
||||
test_time_fall_type2_redodt_type2_prev: DAYS: **0**
|
||||
test_time_fall_type2_redodt_type2_dt: DAYS: **0**
|
||||
test_time_fall_type2_redodt_type2_redodt: DAYS: **0**
|
||||
test_time_fall_type2_redodt_type2_redost: DAYS: **0**
|
||||
test_time_fall_type2_redodt_type2_st: DAYS: **0**
|
||||
test_time_fall_type2_redodt_type2_post: DAYS: **1**
|
||||
test_time_fall_type2_redost_type2_prev: DAYS: **0**
|
||||
test_time_fall_type2_redost_type2_dt: DAYS: **0**
|
||||
test_time_fall_type2_redost_type2_redodt: DAYS: **0**
|
||||
test_time_fall_type2_redost_type2_redost: DAYS: **0**
|
||||
test_time_fall_type2_redost_type2_st: DAYS: **0**
|
||||
test_time_fall_type2_redost_type2_post: DAYS: **1**
|
||||
test_time_fall_type2_st_type2_prev: DAYS: **0**
|
||||
test_time_fall_type2_st_type2_dt: DAYS: **0**
|
||||
test_time_fall_type2_st_type2_redodt: DAYS: **0**
|
||||
test_time_fall_type2_st_type2_redost: DAYS: **0**
|
||||
test_time_fall_type2_st_type2_st: DAYS: **0**
|
||||
test_time_fall_type2_st_type2_post: DAYS: **1**
|
||||
test_time_fall_type2_post_type2_prev: DAYS: **2**
|
||||
test_time_fall_type2_post_type2_dt: DAYS: **1**
|
||||
test_time_fall_type2_post_type2_redodt: DAYS: **1**
|
||||
test_time_fall_type2_post_type2_redost: DAYS: **1**
|
||||
test_time_fall_type2_post_type2_st: DAYS: **1**
|
||||
test_time_fall_type2_post_type2_post: DAYS: **0**
|
||||
@@ -0,0 +1,49 @@
|
||||
--TEST--
|
||||
DateTime::diff() days -- fall type2 type3
|
||||
--CREDITS--
|
||||
Daniel Convissor <danielc@php.net>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
require 'examine_diff.inc';
|
||||
define('PHPT_DATETIME_SHOW', PHPT_DATETIME_SHOW_DAYS);
|
||||
require 'DateTime_data-fall-type2-type3.inc';
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
test_time_fall_type2_prev_type3_prev: DAYS: **33**
|
||||
test_time_fall_type2_prev_type3_dt: DAYS: **0**
|
||||
test_time_fall_type2_prev_type3_redodt: DAYS: **0**
|
||||
test_time_fall_type2_prev_type3_redost: DAYS: **0**
|
||||
test_time_fall_type2_prev_type3_st: DAYS: **0**
|
||||
test_time_fall_type2_prev_type3_post: DAYS: **2**
|
||||
test_time_fall_type2_dt_type3_prev: DAYS: **0**
|
||||
test_time_fall_type2_dt_type3_dt: DAYS: **0**
|
||||
test_time_fall_type2_dt_type3_redodt: DAYS: **0**
|
||||
test_time_fall_type2_dt_type3_redost: DAYS: **0**
|
||||
test_time_fall_type2_dt_type3_st: DAYS: **0**
|
||||
test_time_fall_type2_dt_type3_post: DAYS: **1**
|
||||
test_time_fall_type2_redodt_type3_prev: DAYS: **0**
|
||||
test_time_fall_type2_redodt_type3_dt: DAYS: **0**
|
||||
test_time_fall_type2_redodt_type3_redodt: DAYS: **0**
|
||||
test_time_fall_type2_redodt_type3_redost: DAYS: **0**
|
||||
test_time_fall_type2_redodt_type3_st: DAYS: **0**
|
||||
test_time_fall_type2_redodt_type3_post: DAYS: **1**
|
||||
test_time_fall_type2_redost_type3_prev: DAYS: **0**
|
||||
test_time_fall_type2_redost_type3_dt: DAYS: **0**
|
||||
test_time_fall_type2_redost_type3_redodt: DAYS: **0**
|
||||
test_time_fall_type2_redost_type3_redost: DAYS: **0**
|
||||
test_time_fall_type2_redost_type3_st: DAYS: **0**
|
||||
test_time_fall_type2_redost_type3_post: DAYS: **1**
|
||||
test_time_fall_type2_st_type3_prev: DAYS: **0**
|
||||
test_time_fall_type2_st_type3_dt: DAYS: **0**
|
||||
test_time_fall_type2_st_type3_redodt: DAYS: **0**
|
||||
test_time_fall_type2_st_type3_redost: DAYS: **0**
|
||||
test_time_fall_type2_st_type3_st: DAYS: **0**
|
||||
test_time_fall_type2_st_type3_post: DAYS: **1**
|
||||
test_time_fall_type2_post_type3_prev: DAYS: **2**
|
||||
test_time_fall_type2_post_type3_dt: DAYS: **1**
|
||||
test_time_fall_type2_post_type3_redodt: DAYS: **1**
|
||||
test_time_fall_type2_post_type3_redost: DAYS: **1**
|
||||
test_time_fall_type2_post_type3_st: DAYS: **1**
|
||||
test_time_fall_type2_post_type3_post: DAYS: **0**
|
||||
@@ -0,0 +1,49 @@
|
||||
--TEST--
|
||||
DateTime::diff() days -- fall type3 type2
|
||||
--CREDITS--
|
||||
Daniel Convissor <danielc@php.net>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
require 'examine_diff.inc';
|
||||
define('PHPT_DATETIME_SHOW', PHPT_DATETIME_SHOW_DAYS);
|
||||
require 'DateTime_data-fall-type3-type2.inc';
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
test_time_fall_type3_prev_type2_prev: DAYS: **33**
|
||||
test_time_fall_type3_prev_type2_dt: DAYS: **0**
|
||||
test_time_fall_type3_prev_type2_redodt: DAYS: **0**
|
||||
test_time_fall_type3_prev_type2_redost: DAYS: **0**
|
||||
test_time_fall_type3_prev_type2_st: DAYS: **0**
|
||||
test_time_fall_type3_prev_type2_post: DAYS: **2**
|
||||
test_time_fall_type3_dt_type2_prev: DAYS: **0**
|
||||
test_time_fall_type3_dt_type2_dt: DAYS: **0**
|
||||
test_time_fall_type3_dt_type2_redodt: DAYS: **0**
|
||||
test_time_fall_type3_dt_type2_redost: DAYS: **0**
|
||||
test_time_fall_type3_dt_type2_st: DAYS: **0**
|
||||
test_time_fall_type3_dt_type2_post: DAYS: **1**
|
||||
test_time_fall_type3_redodt_type2_prev: DAYS: **0**
|
||||
test_time_fall_type3_redodt_type2_dt: DAYS: **0**
|
||||
test_time_fall_type3_redodt_type2_redodt: DAYS: **0**
|
||||
test_time_fall_type3_redodt_type2_redost: DAYS: **0**
|
||||
test_time_fall_type3_redodt_type2_st: DAYS: **0**
|
||||
test_time_fall_type3_redodt_type2_post: DAYS: **1**
|
||||
test_time_fall_type3_redost_type2_prev: DAYS: **0**
|
||||
test_time_fall_type3_redost_type2_dt: DAYS: **0**
|
||||
test_time_fall_type3_redost_type2_redodt: DAYS: **0**
|
||||
test_time_fall_type3_redost_type2_redost: DAYS: **0**
|
||||
test_time_fall_type3_redost_type2_st: DAYS: **0**
|
||||
test_time_fall_type3_redost_type2_post: DAYS: **1**
|
||||
test_time_fall_type3_st_type2_prev: DAYS: **0**
|
||||
test_time_fall_type3_st_type2_dt: DAYS: **0**
|
||||
test_time_fall_type3_st_type2_redodt: DAYS: **0**
|
||||
test_time_fall_type3_st_type2_redost: DAYS: **0**
|
||||
test_time_fall_type3_st_type2_st: DAYS: **0**
|
||||
test_time_fall_type3_st_type2_post: DAYS: **1**
|
||||
test_time_fall_type3_post_type2_prev: DAYS: **2**
|
||||
test_time_fall_type3_post_type2_dt: DAYS: **1**
|
||||
test_time_fall_type3_post_type2_redodt: DAYS: **1**
|
||||
test_time_fall_type3_post_type2_redost: DAYS: **1**
|
||||
test_time_fall_type3_post_type2_st: DAYS: **1**
|
||||
test_time_fall_type3_post_type2_post: DAYS: **0**
|
||||
@@ -0,0 +1,49 @@
|
||||
--TEST--
|
||||
DateTime::diff() days -- fall type3 type3
|
||||
--CREDITS--
|
||||
Daniel Convissor <danielc@php.net>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
require 'examine_diff.inc';
|
||||
define('PHPT_DATETIME_SHOW', PHPT_DATETIME_SHOW_DAYS);
|
||||
require 'DateTime_data-fall-type3-type3.inc';
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
test_time_fall_type3_prev_type3_prev: DAYS: **33**
|
||||
test_time_fall_type3_prev_type3_dt: DAYS: **0**
|
||||
test_time_fall_type3_prev_type3_redodt: DAYS: **0**
|
||||
test_time_fall_type3_prev_type3_redost: DAYS: **0**
|
||||
test_time_fall_type3_prev_type3_st: DAYS: **0**
|
||||
test_time_fall_type3_prev_type3_post: DAYS: **2**
|
||||
test_time_fall_type3_dt_type3_prev: DAYS: **0**
|
||||
test_time_fall_type3_dt_type3_dt: DAYS: **0**
|
||||
test_time_fall_type3_dt_type3_redodt: DAYS: **0**
|
||||
test_time_fall_type3_dt_type3_redost: DAYS: **0**
|
||||
test_time_fall_type3_dt_type3_st: DAYS: **0**
|
||||
test_time_fall_type3_dt_type3_post: DAYS: **1**
|
||||
test_time_fall_type3_redodt_type3_prev: DAYS: **0**
|
||||
test_time_fall_type3_redodt_type3_dt: DAYS: **0**
|
||||
test_time_fall_type3_redodt_type3_redodt: DAYS: **0**
|
||||
test_time_fall_type3_redodt_type3_redost: DAYS: **0**
|
||||
test_time_fall_type3_redodt_type3_st: DAYS: **0**
|
||||
test_time_fall_type3_redodt_type3_post: DAYS: **1**
|
||||
test_time_fall_type3_redost_type3_prev: DAYS: **0**
|
||||
test_time_fall_type3_redost_type3_dt: DAYS: **0**
|
||||
test_time_fall_type3_redost_type3_redodt: DAYS: **0**
|
||||
test_time_fall_type3_redost_type3_redost: DAYS: **0**
|
||||
test_time_fall_type3_redost_type3_st: DAYS: **0**
|
||||
test_time_fall_type3_redost_type3_post: DAYS: **1**
|
||||
test_time_fall_type3_st_type3_prev: DAYS: **0**
|
||||
test_time_fall_type3_st_type3_dt: DAYS: **0**
|
||||
test_time_fall_type3_st_type3_redodt: DAYS: **0**
|
||||
test_time_fall_type3_st_type3_redost: DAYS: **0**
|
||||
test_time_fall_type3_st_type3_st: DAYS: **0**
|
||||
test_time_fall_type3_st_type3_post: DAYS: **1**
|
||||
test_time_fall_type3_post_type3_prev: DAYS: **2**
|
||||
test_time_fall_type3_post_type3_dt: DAYS: **1**
|
||||
test_time_fall_type3_post_type3_redodt: DAYS: **1**
|
||||
test_time_fall_type3_post_type3_redost: DAYS: **1**
|
||||
test_time_fall_type3_post_type3_st: DAYS: **1**
|
||||
test_time_fall_type3_post_type3_post: DAYS: **0**
|
||||
@@ -0,0 +1,77 @@
|
||||
--TEST--
|
||||
DateTime::diff() days -- february
|
||||
--CREDITS--
|
||||
Daniel Convissor <danielc@php.net>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
require 'examine_diff.inc';
|
||||
define('PHPT_DATETIME_SHOW', PHPT_DATETIME_SHOW_DAYS);
|
||||
require 'DateTime_data-february.inc';
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
test_bug_49081__1: DAYS: **30**
|
||||
test_bug_49081__2: DAYS: **31**
|
||||
test_bug_49081__3: DAYS: **1**
|
||||
test_bug_49081__4: DAYS: **29**
|
||||
test_bug_49081__5: DAYS: **30**
|
||||
test_bug_49081__6: DAYS: **31**
|
||||
test_bug_49081__7: DAYS: **32**
|
||||
test_bug_49081__8: DAYS: **28**
|
||||
test_bug_49081__9: DAYS: **29**
|
||||
test_bug_49081__10: DAYS: **30**
|
||||
test_bug_49081__11: DAYS: **31**
|
||||
test_bug_49081__12: DAYS: **1**
|
||||
test_bug_49081__13: DAYS: **27**
|
||||
test_bug_49081__14: DAYS: **28**
|
||||
test_bug_49081__15: DAYS: **29**
|
||||
test_bug_49081__16: DAYS: **30**
|
||||
test_bug_49081__17: DAYS: **31**
|
||||
test_bug_49081__18: DAYS: **32**
|
||||
test_bug_49081__19: DAYS: **59**
|
||||
test_bug_49081__20: DAYS: **29**
|
||||
test_bug_49081__21: DAYS: **55**
|
||||
test_bug_49081__22: DAYS: **56**
|
||||
test_bug_49081__23: DAYS: **57**
|
||||
test_bug_49081__24: DAYS: **58**
|
||||
test_bug_49081__25: DAYS: **59**
|
||||
test_bug_49081__26: DAYS: **60**
|
||||
test_bug_49081__27: DAYS: **30**
|
||||
test_bug_49081__28: DAYS: **27**
|
||||
test_bug_49081__29: DAYS: **28**
|
||||
test_bug_49081__30: DAYS: **29**
|
||||
test_bug_49081__31: DAYS: **28**
|
||||
test_bug_49081__32: DAYS: **29**
|
||||
test_bug_49081_negative__1: DAYS: **30**
|
||||
test_bug_49081_negative__2: DAYS: **31**
|
||||
test_bug_49081_negative__3: DAYS: **1**
|
||||
test_bug_49081_negative__4: DAYS: **29**
|
||||
test_bug_49081_negative__5: DAYS: **30**
|
||||
test_bug_49081_negative__6: DAYS: **31**
|
||||
test_bug_49081_negative__7: DAYS: **32**
|
||||
test_bug_49081_negative__8: DAYS: **28**
|
||||
test_bug_49081_negative__9: DAYS: **29**
|
||||
test_bug_49081_negative__10: DAYS: **30**
|
||||
test_bug_49081_negative__11: DAYS: **31**
|
||||
test_bug_49081_negative__12: DAYS: **1**
|
||||
test_bug_49081_negative__13: DAYS: **27**
|
||||
test_bug_49081_negative__14: DAYS: **28**
|
||||
test_bug_49081_negative__15: DAYS: **29**
|
||||
test_bug_49081_negative__16: DAYS: **30**
|
||||
test_bug_49081_negative__17: DAYS: **31**
|
||||
test_bug_49081_negative__18: DAYS: **32**
|
||||
test_bug_49081_negative__19: DAYS: **59**
|
||||
test_bug_49081_negative__20: DAYS: **29**
|
||||
test_bug_49081_negative__21: DAYS: **55**
|
||||
test_bug_49081_negative__22: DAYS: **56**
|
||||
test_bug_49081_negative__23: DAYS: **57**
|
||||
test_bug_49081_negative__24: DAYS: **58**
|
||||
test_bug_49081_negative__25: DAYS: **59**
|
||||
test_bug_49081_negative__26: DAYS: **60**
|
||||
test_bug_49081_negative__27: DAYS: **30**
|
||||
test_bug_49081_negative__28: DAYS: **27**
|
||||
test_bug_49081_negative__29: DAYS: **28**
|
||||
test_bug_49081_negative__30: DAYS: **29**
|
||||
test_bug_49081_negative__31: DAYS: **28**
|
||||
test_bug_49081_negative__32: DAYS: **29**
|
||||
@@ -0,0 +1,15 @@
|
||||
--TEST--
|
||||
DateTime::diff() days -- massive
|
||||
--CREDITS--
|
||||
Daniel Convissor <danielc@php.net>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
require 'examine_diff.inc';
|
||||
define('PHPT_DATETIME_SHOW', PHPT_DATETIME_SHOW_DAYS);
|
||||
require 'DateTime_data-massive.inc';
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
test_massive_positive: DAYS: **243494757**
|
||||
test_massive_negative: DAYS: **243494757**
|
||||
@@ -0,0 +1,29 @@
|
||||
--TEST--
|
||||
DateTime::diff() days -- spring type2 type2
|
||||
--CREDITS--
|
||||
Daniel Convissor <danielc@php.net>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
require 'examine_diff.inc';
|
||||
define('PHPT_DATETIME_SHOW', PHPT_DATETIME_SHOW_DAYS);
|
||||
require 'DateTime_data-spring-type2-type2.inc';
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
test_time_spring_type2_prev_type2_prev: DAYS: **30**
|
||||
test_time_spring_type2_prev_type2_st: DAYS: **0**
|
||||
test_time_spring_type2_prev_type2_dt: DAYS: **0**
|
||||
test_time_spring_type2_prev_type2_post: DAYS: **2**
|
||||
test_time_spring_type2_st_type2_prev: DAYS: **0**
|
||||
test_time_spring_type2_st_type2_st: DAYS: **0**
|
||||
test_time_spring_type2_st_type2_dt: DAYS: **0**
|
||||
test_time_spring_type2_st_type2_post: DAYS: **1**
|
||||
test_time_spring_type2_dt_type2_prev: DAYS: **0**
|
||||
test_time_spring_type2_dt_type2_st: DAYS: **0**
|
||||
test_time_spring_type2_dt_type2_dt: DAYS: **0**
|
||||
test_time_spring_type2_dt_type2_post: DAYS: **1**
|
||||
test_time_spring_type2_post_type2_prev: DAYS: **2**
|
||||
test_time_spring_type2_post_type2_st: DAYS: **1**
|
||||
test_time_spring_type2_post_type2_dt: DAYS: **1**
|
||||
test_time_spring_type2_post_type2_post: DAYS: **0**
|
||||
@@ -0,0 +1,29 @@
|
||||
--TEST--
|
||||
DateTime::diff() days -- spring type2 type3
|
||||
--CREDITS--
|
||||
Daniel Convissor <danielc@php.net>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
require 'examine_diff.inc';
|
||||
define('PHPT_DATETIME_SHOW', PHPT_DATETIME_SHOW_DAYS);
|
||||
require 'DateTime_data-spring-type2-type3.inc';
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
test_time_spring_type2_prev_type3_prev: DAYS: **30**
|
||||
test_time_spring_type2_prev_type3_st: DAYS: **0**
|
||||
test_time_spring_type2_prev_type3_dt: DAYS: **0**
|
||||
test_time_spring_type2_prev_type3_post: DAYS: **2**
|
||||
test_time_spring_type2_st_type3_prev: DAYS: **0**
|
||||
test_time_spring_type2_st_type3_st: DAYS: **0**
|
||||
test_time_spring_type2_st_type3_dt: DAYS: **0**
|
||||
test_time_spring_type2_st_type3_post: DAYS: **1**
|
||||
test_time_spring_type2_dt_type3_prev: DAYS: **0**
|
||||
test_time_spring_type2_dt_type3_st: DAYS: **0**
|
||||
test_time_spring_type2_dt_type3_dt: DAYS: **0**
|
||||
test_time_spring_type2_dt_type3_post: DAYS: **1**
|
||||
test_time_spring_type2_post_type3_prev: DAYS: **2**
|
||||
test_time_spring_type2_post_type3_st: DAYS: **1**
|
||||
test_time_spring_type2_post_type3_dt: DAYS: **1**
|
||||
test_time_spring_type2_post_type3_post: DAYS: **0**
|
||||
@@ -0,0 +1,29 @@
|
||||
--TEST--
|
||||
DateTime::diff() days -- spring type3 type2
|
||||
--CREDITS--
|
||||
Daniel Convissor <danielc@php.net>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
require 'examine_diff.inc';
|
||||
define('PHPT_DATETIME_SHOW', PHPT_DATETIME_SHOW_DAYS);
|
||||
require 'DateTime_data-spring-type3-type2.inc';
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
test_time_spring_type3_prev_type2_prev: DAYS: **30**
|
||||
test_time_spring_type3_prev_type2_st: DAYS: **0**
|
||||
test_time_spring_type3_prev_type2_dt: DAYS: **0**
|
||||
test_time_spring_type3_prev_type2_post: DAYS: **2**
|
||||
test_time_spring_type3_st_type2_prev: DAYS: **0**
|
||||
test_time_spring_type3_st_type2_st: DAYS: **0**
|
||||
test_time_spring_type3_st_type2_dt: DAYS: **0**
|
||||
test_time_spring_type3_st_type2_post: DAYS: **1**
|
||||
test_time_spring_type3_dt_type2_prev: DAYS: **0**
|
||||
test_time_spring_type3_dt_type2_st: DAYS: **0**
|
||||
test_time_spring_type3_dt_type2_dt: DAYS: **0**
|
||||
test_time_spring_type3_dt_type2_post: DAYS: **1**
|
||||
test_time_spring_type3_post_type2_prev: DAYS: **2**
|
||||
test_time_spring_type3_post_type2_st: DAYS: **1**
|
||||
test_time_spring_type3_post_type2_dt: DAYS: **1**
|
||||
test_time_spring_type3_post_type2_post: DAYS: **0**
|
||||
@@ -0,0 +1,29 @@
|
||||
--TEST--
|
||||
DateTime::diff() days -- spring type3 type3
|
||||
--CREDITS--
|
||||
Daniel Convissor <danielc@php.net>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
require 'examine_diff.inc';
|
||||
define('PHPT_DATETIME_SHOW', PHPT_DATETIME_SHOW_DAYS);
|
||||
require 'DateTime_data-spring-type3-type3.inc';
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
test_time_spring_type3_prev_type3_prev: DAYS: **30**
|
||||
test_time_spring_type3_prev_type3_st: DAYS: **0**
|
||||
test_time_spring_type3_prev_type3_dt: DAYS: **0**
|
||||
test_time_spring_type3_prev_type3_post: DAYS: **2**
|
||||
test_time_spring_type3_st_type3_prev: DAYS: **0**
|
||||
test_time_spring_type3_st_type3_st: DAYS: **0**
|
||||
test_time_spring_type3_st_type3_dt: DAYS: **0**
|
||||
test_time_spring_type3_st_type3_post: DAYS: **1**
|
||||
test_time_spring_type3_dt_type3_prev: DAYS: **0**
|
||||
test_time_spring_type3_dt_type3_st: DAYS: **0**
|
||||
test_time_spring_type3_dt_type3_dt: DAYS: **0**
|
||||
test_time_spring_type3_dt_type3_post: DAYS: **1**
|
||||
test_time_spring_type3_post_type3_prev: DAYS: **2**
|
||||
test_time_spring_type3_post_type3_st: DAYS: **1**
|
||||
test_time_spring_type3_post_type3_dt: DAYS: **1**
|
||||
test_time_spring_type3_post_type3_post: DAYS: **0**
|
||||
@@ -0,0 +1,15 @@
|
||||
--TEST--
|
||||
DateTime::diff() -- absolute
|
||||
--CREDITS--
|
||||
Daniel Convissor <danielc@php.net>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
require 'examine_diff.inc';
|
||||
define('PHPT_DATETIME_SHOW', PHPT_DATETIME_SHOW_DIFF);
|
||||
require 'DateTime_data-absolute.inc';
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
test_absolute_7: DIFF: 2009-01-14 00:00:00 EST - 2009-01-07 00:00:00 EST = **P+0Y0M7DT0H0M0S**
|
||||
test_absolute_negative_7: DIFF: 2009-01-07 00:00:00 EST - 2009-01-14 00:00:00 EST = **P+0Y0M7DT0H0M0S**
|
||||
@@ -0,0 +1,29 @@
|
||||
--TEST--
|
||||
DateTime::diff() -- dates
|
||||
--CREDITS--
|
||||
Daniel Convissor <danielc@php.net>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
require 'examine_diff.inc';
|
||||
define('PHPT_DATETIME_SHOW', PHPT_DATETIME_SHOW_DIFF);
|
||||
require 'DateTime_data-dates.inc';
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
test__7: DIFF: 2009-01-14 00:00:00 EST - 2009-01-07 00:00:00 EST = **P+0Y0M7DT0H0M0S**
|
||||
test_years_positive__7_by_0_day: DIFF: 2007-02-07 00:00:00 EST - 2000-02-07 00:00:00 EST = **P+7Y0M0DT0H0M0S**
|
||||
test_years_positive__7_by_1_day: DIFF: 2007-02-08 00:00:00 EST - 2000-02-07 00:00:00 EST = **P+7Y0M1DT0H0M0S**
|
||||
test_years_positive__6_shy_1_day: DIFF: 2007-02-06 00:00:00 EST - 2000-02-07 00:00:00 EST = **P+6Y11M30DT0H0M0S**
|
||||
test_years_positive__7_by_1_month: DIFF: 2007-03-07 00:00:00 EST - 2000-02-07 00:00:00 EST = **P+7Y1M0DT0H0M0S**
|
||||
test_years_positive__6_shy_1_month: DIFF: 2007-01-07 00:00:00 EST - 2000-02-07 00:00:00 EST = **P+6Y11M0DT0H0M0S**
|
||||
test_years_positive__7_by_1_month_split_newyear: DIFF: 2007-01-07 00:00:00 EST - 1999-12-07 00:00:00 EST = **P+7Y1M0DT0H0M0S**
|
||||
test_years_positive__6_shy_1_month_split_newyear: DIFF: 2006-12-07 00:00:00 EST - 2000-01-07 00:00:00 EST = **P+6Y11M0DT0H0M0S**
|
||||
test_negative__7: DIFF: 2009-01-07 00:00:00 EST - 2009-01-14 00:00:00 EST = **P-0Y0M7DT0H0M0S**
|
||||
test_years_negative__7_by_0_day: DIFF: 2000-02-07 00:00:00 EST - 2007-02-07 00:00:00 EST = **P-7Y0M0DT0H0M0S**
|
||||
test_years_negative__7_by_1_day: DIFF: 2000-02-07 00:00:00 EST - 2007-02-08 00:00:00 EST = **P-7Y0M1DT0H0M0S**
|
||||
test_years_negative__6_shy_1_day: DIFF: 2000-02-07 00:00:00 EST - 2007-02-06 00:00:00 EST = **P-6Y11M28DT0H0M0S**
|
||||
test_years_negative__7_by_1_month: DIFF: 2000-02-07 00:00:00 EST - 2007-03-07 00:00:00 EST = **P-7Y1M0DT0H0M0S**
|
||||
test_years_negative__6_shy_1_month: DIFF: 2000-02-07 00:00:00 EST - 2007-01-07 00:00:00 EST = **P-6Y11M0DT0H0M0S**
|
||||
test_years_negative__7_by_1_month_split_newyear: DIFF: 1999-12-07 00:00:00 EST - 2007-01-07 00:00:00 EST = **P-7Y1M0DT0H0M0S**
|
||||
test_years_negative__6_shy_1_month_split_newyear: DIFF: 2000-01-07 00:00:00 EST - 2006-12-07 00:00:00 EST = **P-6Y11M0DT0H0M0S**
|
||||
@@ -0,0 +1,51 @@
|
||||
--TEST--
|
||||
DateTime::diff() -- fall type2 type2
|
||||
--CREDITS--
|
||||
Daniel Convissor <danielc@php.net>
|
||||
--XFAIL--
|
||||
Various bugs exist
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
require 'examine_diff.inc';
|
||||
define('PHPT_DATETIME_SHOW', PHPT_DATETIME_SHOW_DIFF);
|
||||
require 'DateTime_data-fall-type2-type2.inc';
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
test_time_fall_type2_prev_type2_prev: DIFF: 2010-11-06 18:38:28 EDT - 2010-10-04 02:18:48 EDT = **P+0Y1M2DT16H19M40S**
|
||||
test_time_fall_type2_prev_type2_dt: DIFF: 2010-11-07 00:10:20 EDT - 2010-11-06 18:38:28 EDT = **P+0Y0M0DT5H31M52S**
|
||||
test_time_fall_type2_prev_type2_redodt: DIFF: 2010-11-07 01:12:33 EDT - 2010-11-06 18:38:28 EDT = **P+0Y0M0DT6H34M5S**
|
||||
test_time_fall_type2_prev_type2_redost: DIFF: 2010-11-07 01:14:44 EST - 2010-11-06 18:38:28 EDT = **P+0Y0M0DT7H36M16S**
|
||||
test_time_fall_type2_prev_type2_st: DIFF: 2010-11-07 03:16:55 EST - 2010-11-06 18:38:28 EDT = **P+0Y0M0DT9H38M27S**
|
||||
test_time_fall_type2_prev_type2_post: DIFF: 2010-11-08 19:59:59 EST - 2010-11-06 18:38:28 EDT = **P+0Y0M2DT1H21M31S**
|
||||
test_time_fall_type2_dt_type2_prev: DIFF: 2010-11-06 18:38:28 EDT - 2010-11-07 00:10:20 EDT = **P-0Y0M0DT5H31M52S**
|
||||
test_time_fall_type2_dt_type2_dt: DIFF: 2010-11-07 00:15:35 EDT - 2010-11-07 00:10:20 EDT = **P+0Y0M0DT0H5M15S**
|
||||
test_time_fall_type2_dt_type2_redodt: DIFF: 2010-11-07 01:12:33 EDT - 2010-11-07 00:10:20 EDT = **P+0Y0M0DT1H2M13S**
|
||||
test_time_fall_type2_dt_type2_redost: DIFF: 2010-11-07 01:14:44 EST - 2010-11-07 00:10:20 EDT = **P+0Y0M0DT2H4M24S**
|
||||
test_time_fall_type2_dt_type2_st: DIFF: 2010-11-07 03:16:55 EST - 2010-11-07 00:10:20 EDT = **P+0Y0M0DT4H6M35S**
|
||||
test_time_fall_type2_dt_type2_post: DIFF: 2010-11-08 19:59:59 EST - 2010-11-07 00:10:20 EDT = **P+0Y0M1DT20H49M39S**
|
||||
test_time_fall_type2_redodt_type2_prev: DIFF: 2010-11-06 18:38:28 EDT - 2010-11-07 01:12:33 EDT = **P-0Y0M0DT6H34M5S**
|
||||
test_time_fall_type2_redodt_type2_dt: DIFF: 2010-11-07 00:10:20 EDT - 2010-11-07 01:12:33 EDT = **P-0Y0M0DT1H2M13S**
|
||||
test_time_fall_type2_redodt_type2_redodt: DIFF: 2010-11-07 01:15:35 EDT - 2010-11-07 01:12:33 EDT = **P+0Y0M0DT0H3M2S**
|
||||
test_time_fall_type2_redodt_type2_redost: DIFF: 2010-11-07 01:14:44 EST - 2010-11-07 01:12:33 EDT = **P+0Y0M0DT1H2M11S**
|
||||
test_time_fall_type2_redodt_type2_st: DIFF: 2010-11-07 03:16:55 EST - 2010-11-07 01:12:33 EDT = **P+0Y0M0DT3H4M22S**
|
||||
test_time_fall_type2_redodt_type2_post: DIFF: 2010-11-08 19:59:59 EST - 2010-11-07 01:12:33 EDT = **P+0Y0M1DT19H47M26S**
|
||||
test_time_fall_type2_redost_type2_prev: DIFF: 2010-11-06 18:38:28 EDT - 2010-11-07 01:14:44 EST = **P-0Y0M0DT7H36M16S**
|
||||
test_time_fall_type2_redost_type2_dt: DIFF: 2010-11-07 00:10:20 EDT - 2010-11-07 01:14:44 EST = **P-0Y0M0DT2H4M24S**
|
||||
test_time_fall_type2_redost_type2_redodt: DIFF: 2010-11-07 01:12:33 EDT - 2010-11-07 01:14:44 EST = **P-0Y0M0DT1H2M11S**
|
||||
test_time_fall_type2_redost_type2_redost: DIFF: 2010-11-07 01:16:54 EST - 2010-11-07 01:14:44 EST = **P+0Y0M0DT0H2M10S**
|
||||
test_time_fall_type2_redost_type2_st: DIFF: 2010-11-07 03:16:55 EST - 2010-11-07 01:14:44 EST = **P+0Y0M0DT2H2M11S**
|
||||
test_time_fall_type2_redost_type2_post: DIFF: 2010-11-08 19:59:59 EST - 2010-11-07 01:14:44 EST = **P+0Y0M1DT18H45M15S**
|
||||
test_time_fall_type2_st_type2_prev: DIFF: 2010-11-06 18:38:28 EDT - 2010-11-07 03:16:55 EST = **P-0Y0M0DT9H38M27S**
|
||||
test_time_fall_type2_st_type2_dt: DIFF: 2010-11-07 00:10:20 EDT - 2010-11-07 03:16:55 EST = **P-0Y0M0DT4H6M35S**
|
||||
test_time_fall_type2_st_type2_redodt: DIFF: 2010-11-07 01:12:33 EDT - 2010-11-07 03:16:55 EST = **P-0Y0M0DT3H4M22S**
|
||||
test_time_fall_type2_st_type2_redost: DIFF: 2010-11-07 01:14:44 EST - 2010-11-07 03:16:55 EST = **P-0Y0M0DT2H2M11S**
|
||||
test_time_fall_type2_st_type2_st: DIFF: 2010-11-07 05:19:56 EST - 2010-11-07 03:16:55 EST = **P+0Y0M0DT2H3M1S**
|
||||
test_time_fall_type2_st_type2_post: DIFF: 2010-11-08 19:59:59 EST - 2010-11-07 03:16:55 EST = **P+0Y0M1DT16H43M4S**
|
||||
test_time_fall_type2_post_type2_prev: DIFF: 2010-11-06 18:38:28 EDT - 2010-11-08 19:59:59 EST = **P-0Y0M2DT1H21M31S**
|
||||
test_time_fall_type2_post_type2_dt: DIFF: 2010-11-07 00:10:20 EDT - 2010-11-08 19:59:59 EST = **P-0Y0M1DT20H49M39S**
|
||||
test_time_fall_type2_post_type2_redodt: DIFF: 2010-11-07 01:12:33 EDT - 2010-11-08 19:59:59 EST = **P-0Y0M1DT19H47M26S**
|
||||
test_time_fall_type2_post_type2_redost: DIFF: 2010-11-07 01:14:44 EST - 2010-11-08 19:59:59 EST = **P-0Y0M1DT18H45M15S**
|
||||
test_time_fall_type2_post_type2_st: DIFF: 2010-11-07 03:16:55 EST - 2010-11-08 19:59:59 EST = **P-0Y0M1DT16H43M4S**
|
||||
test_time_fall_type2_post_type2_post: DIFF: 2010-11-08 19:59:59 EST - 2010-11-08 18:57:55 EST = **P+0Y0M0DT1H2M4S**
|
||||
@@ -0,0 +1,51 @@
|
||||
--TEST--
|
||||
DateTime::diff() -- fall type2 type3
|
||||
--CREDITS--
|
||||
Daniel Convissor <danielc@php.net>
|
||||
--XFAIL--
|
||||
Various bugs exist
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
require 'examine_diff.inc';
|
||||
define('PHPT_DATETIME_SHOW', PHPT_DATETIME_SHOW_DIFF);
|
||||
require 'DateTime_data-fall-type2-type3.inc';
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
test_time_fall_type2_prev_type3_prev: DIFF: 2010-11-06 18:38:28 EDT - 2010-10-04 02:18:48 EDT = **P+0Y1M2DT16H19M40S**
|
||||
test_time_fall_type2_prev_type3_dt: DIFF: 2010-11-07 00:10:20 EDT - 2010-11-06 18:38:28 EDT = **P+0Y0M0DT5H31M52S**
|
||||
test_time_fall_type2_prev_type3_redodt: DIFF: 2010-11-07 01:12:33 EDT - 2010-11-06 18:38:28 EDT = **P+0Y0M0DT6H34M5S**
|
||||
test_time_fall_type2_prev_type3_redost: DIFF: 2010-11-07 01:14:44 EST - 2010-11-06 18:38:28 EDT = **P+0Y0M0DT7H36M16S**
|
||||
test_time_fall_type2_prev_type3_st: DIFF: 2010-11-07 03:16:55 EST - 2010-11-06 18:38:28 EDT = **P+0Y0M0DT9H38M27S**
|
||||
test_time_fall_type2_prev_type3_post: DIFF: 2010-11-08 19:59:59 EST - 2010-11-06 18:38:28 EDT = **P+0Y0M2DT1H21M31S**
|
||||
test_time_fall_type2_dt_type3_prev: DIFF: 2010-11-06 18:38:28 EDT - 2010-11-07 00:10:20 EDT = **P-0Y0M0DT5H31M52S**
|
||||
test_time_fall_type2_dt_type3_dt: DIFF: 2010-11-07 00:15:35 EDT - 2010-11-07 00:10:20 EDT = **P+0Y0M0DT0H5M15S**
|
||||
test_time_fall_type2_dt_type3_redodt: DIFF: 2010-11-07 01:12:33 EDT - 2010-11-07 00:10:20 EDT = **P+0Y0M0DT1H2M13S**
|
||||
test_time_fall_type2_dt_type3_redost: DIFF: 2010-11-07 01:14:44 EST - 2010-11-07 00:10:20 EDT = **P+0Y0M0DT2H4M24S**
|
||||
test_time_fall_type2_dt_type3_st: DIFF: 2010-11-07 03:16:55 EST - 2010-11-07 00:10:20 EDT = **P+0Y0M0DT4H6M35S**
|
||||
test_time_fall_type2_dt_type3_post: DIFF: 2010-11-08 19:59:59 EST - 2010-11-07 00:10:20 EDT = **P+0Y0M1DT20H49M39S**
|
||||
test_time_fall_type2_redodt_type3_prev: DIFF: 2010-11-06 18:38:28 EDT - 2010-11-07 01:12:33 EDT = **P-0Y0M0DT6H34M5S**
|
||||
test_time_fall_type2_redodt_type3_dt: DIFF: 2010-11-07 00:10:20 EDT - 2010-11-07 01:12:33 EDT = **P-0Y0M0DT1H2M13S**
|
||||
test_time_fall_type2_redodt_type3_redodt: DIFF: 2010-11-07 01:15:35 EDT - 2010-11-07 01:12:33 EDT = **P+0Y0M0DT0H3M2S**
|
||||
test_time_fall_type2_redodt_type3_redost: DIFF: 2010-11-07 01:14:44 EST - 2010-11-07 01:12:33 EDT = **P+0Y0M0DT1H2M11S**
|
||||
test_time_fall_type2_redodt_type3_st: DIFF: 2010-11-07 03:16:55 EST - 2010-11-07 01:12:33 EDT = **P+0Y0M0DT3H4M22S**
|
||||
test_time_fall_type2_redodt_type3_post: DIFF: 2010-11-08 19:59:59 EST - 2010-11-07 01:12:33 EDT = **P+0Y0M1DT19H47M26S**
|
||||
test_time_fall_type2_redost_type3_prev: DIFF: 2010-11-06 18:38:28 EDT - 2010-11-07 01:14:44 EST = **P-0Y0M0DT7H36M16S**
|
||||
test_time_fall_type2_redost_type3_dt: DIFF: 2010-11-07 00:10:20 EDT - 2010-11-07 01:14:44 EST = **P-0Y0M0DT2H4M24S**
|
||||
test_time_fall_type2_redost_type3_redodt: DIFF: 2010-11-07 01:12:33 EDT - 2010-11-07 01:14:44 EST = **P-0Y0M0DT1H2M11S**
|
||||
test_time_fall_type2_redost_type3_redost: DIFF: 2010-11-07 01:16:54 EST - 2010-11-07 01:14:44 EST = **P+0Y0M0DT0H2M10S**
|
||||
test_time_fall_type2_redost_type3_st: DIFF: 2010-11-07 03:16:55 EST - 2010-11-07 01:14:44 EST = **P+0Y0M0DT2H2M11S**
|
||||
test_time_fall_type2_redost_type3_post: DIFF: 2010-11-08 19:59:59 EST - 2010-11-07 01:14:44 EST = **P+0Y0M1DT18H45M15S**
|
||||
test_time_fall_type2_st_type3_prev: DIFF: 2010-11-06 18:38:28 EDT - 2010-11-07 03:16:55 EST = **P-0Y0M0DT9H38M27S**
|
||||
test_time_fall_type2_st_type3_dt: DIFF: 2010-11-07 00:10:20 EDT - 2010-11-07 03:16:55 EST = **P-0Y0M0DT4H6M35S**
|
||||
test_time_fall_type2_st_type3_redodt: DIFF: 2010-11-07 01:12:33 EDT - 2010-11-07 03:16:55 EST = **P-0Y0M0DT3H4M22S**
|
||||
test_time_fall_type2_st_type3_redost: DIFF: 2010-11-07 01:14:44 EST - 2010-11-07 03:16:55 EST = **P-0Y0M0DT2H2M11S**
|
||||
test_time_fall_type2_st_type3_st: DIFF: 2010-11-07 05:19:56 EST - 2010-11-07 03:16:55 EST = **P+0Y0M0DT2H3M1S**
|
||||
test_time_fall_type2_st_type3_post: DIFF: 2010-11-08 19:59:59 EST - 2010-11-07 03:16:55 EST = **P+0Y0M1DT16H43M4S**
|
||||
test_time_fall_type2_post_type3_prev: DIFF: 2010-11-06 18:38:28 EDT - 2010-11-08 19:59:59 EST = **P-0Y0M2DT1H21M31S**
|
||||
test_time_fall_type2_post_type3_dt: DIFF: 2010-11-07 00:10:20 EDT - 2010-11-08 19:59:59 EST = **P-0Y0M1DT20H49M39S**
|
||||
test_time_fall_type2_post_type3_redodt: DIFF: 2010-11-07 01:12:33 EDT - 2010-11-08 19:59:59 EST = **P-0Y0M1DT19H47M26S**
|
||||
test_time_fall_type2_post_type3_redost: DIFF: 2010-11-07 01:14:44 EST - 2010-11-08 19:59:59 EST = **P-0Y0M1DT18H45M15S**
|
||||
test_time_fall_type2_post_type3_st: DIFF: 2010-11-07 03:16:55 EST - 2010-11-08 19:59:59 EST = **P-0Y0M1DT16H43M4S**
|
||||
test_time_fall_type2_post_type3_post: DIFF: 2010-11-08 19:59:59 EST - 2010-11-08 18:57:55 EST = **P+0Y0M0DT1H2M4S**
|
||||
@@ -0,0 +1,51 @@
|
||||
--TEST--
|
||||
DateTime::diff() -- fall type3 type2
|
||||
--CREDITS--
|
||||
Daniel Convissor <danielc@php.net>
|
||||
--XFAIL--
|
||||
Various bugs exist
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
require 'examine_diff.inc';
|
||||
define('PHPT_DATETIME_SHOW', PHPT_DATETIME_SHOW_DIFF);
|
||||
require 'DateTime_data-fall-type3-type2.inc';
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
test_time_fall_type3_prev_type2_prev: DIFF: 2010-11-06 18:38:28 EDT - 2010-10-04 02:18:48 EDT = **P+0Y1M2DT16H19M40S**
|
||||
test_time_fall_type3_prev_type2_dt: DIFF: 2010-11-07 00:10:20 EDT - 2010-11-06 18:38:28 EDT = **P+0Y0M0DT5H31M52S**
|
||||
test_time_fall_type3_prev_type2_redodt: DIFF: 2010-11-07 01:12:33 EDT - 2010-11-06 18:38:28 EDT = **P+0Y0M0DT6H34M5S**
|
||||
test_time_fall_type3_prev_type2_redost: DIFF: 2010-11-07 01:14:44 EST - 2010-11-06 18:38:28 EDT = **P+0Y0M0DT7H36M16S**
|
||||
test_time_fall_type3_prev_type2_st: DIFF: 2010-11-07 03:16:55 EST - 2010-11-06 18:38:28 EDT = **P+0Y0M0DT9H38M27S**
|
||||
test_time_fall_type3_prev_type2_post: DIFF: 2010-11-08 19:59:59 EST - 2010-11-06 18:38:28 EDT = **P+0Y0M2DT1H21M31S**
|
||||
test_time_fall_type3_dt_type2_prev: DIFF: 2010-11-06 18:38:28 EDT - 2010-11-07 00:10:20 EDT = **P-0Y0M0DT5H31M52S**
|
||||
test_time_fall_type3_dt_type2_dt: DIFF: 2010-11-07 00:15:35 EDT - 2010-11-07 00:10:20 EDT = **P+0Y0M0DT0H5M15S**
|
||||
test_time_fall_type3_dt_type2_redodt: DIFF: 2010-11-07 01:12:33 EDT - 2010-11-07 00:10:20 EDT = **P+0Y0M0DT1H2M13S**
|
||||
test_time_fall_type3_dt_type2_redost: DIFF: 2010-11-07 01:14:44 EST - 2010-11-07 00:10:20 EDT = **P+0Y0M0DT2H4M24S**
|
||||
test_time_fall_type3_dt_type2_st: DIFF: 2010-11-07 03:16:55 EST - 2010-11-07 00:10:20 EDT = **P+0Y0M0DT4H6M35S**
|
||||
test_time_fall_type3_dt_type2_post: DIFF: 2010-11-08 19:59:59 EST - 2010-11-07 00:10:20 EDT = **P+0Y0M1DT20H49M39S**
|
||||
test_time_fall_type3_redodt_type2_prev: DIFF: 2010-11-06 18:38:28 EDT - 2010-11-07 01:12:33 EDT = **P-0Y0M0DT6H34M5S**
|
||||
test_time_fall_type3_redodt_type2_dt: DIFF: 2010-11-07 00:10:20 EDT - 2010-11-07 01:12:33 EDT = **P-0Y0M0DT1H2M13S**
|
||||
test_time_fall_type3_redodt_type2_redodt: DIFF: 2010-11-07 01:15:35 EDT - 2010-11-07 01:12:33 EDT = **P+0Y0M0DT0H3M2S**
|
||||
test_time_fall_type3_redodt_type2_redost: DIFF: 2010-11-07 01:14:44 EST - 2010-11-07 01:12:33 EDT = **P+0Y0M0DT1H2M11S**
|
||||
test_time_fall_type3_redodt_type2_st: DIFF: 2010-11-07 03:16:55 EST - 2010-11-07 01:12:33 EDT = **P+0Y0M0DT3H4M22S**
|
||||
test_time_fall_type3_redodt_type2_post: DIFF: 2010-11-08 19:59:59 EST - 2010-11-07 01:12:33 EDT = **P+0Y0M1DT19H47M26S**
|
||||
test_time_fall_type3_redost_type2_prev: DIFF: 2010-11-06 18:38:28 EDT - 2010-11-07 01:14:44 EST = **P-0Y0M0DT7H36M16S**
|
||||
test_time_fall_type3_redost_type2_dt: DIFF: 2010-11-07 00:10:20 EDT - 2010-11-07 01:14:44 EST = **P-0Y0M0DT2H4M24S**
|
||||
test_time_fall_type3_redost_type2_redodt: DIFF: 2010-11-07 01:12:33 EDT - 2010-11-07 01:14:44 EST = **P-0Y0M0DT1H2M11S**
|
||||
test_time_fall_type3_redost_type2_redost: DIFF: 2010-11-07 01:16:54 EST - 2010-11-07 01:14:44 EST = **P+0Y0M0DT0H2M10S**
|
||||
test_time_fall_type3_redost_type2_st: DIFF: 2010-11-07 03:16:55 EST - 2010-11-07 01:14:44 EST = **P+0Y0M0DT2H2M11S**
|
||||
test_time_fall_type3_redost_type2_post: DIFF: 2010-11-08 19:59:59 EST - 2010-11-07 01:14:44 EST = **P+0Y0M1DT18H45M15S**
|
||||
test_time_fall_type3_st_type2_prev: DIFF: 2010-11-06 18:38:28 EDT - 2010-11-07 03:16:55 EST = **P-0Y0M0DT9H38M27S**
|
||||
test_time_fall_type3_st_type2_dt: DIFF: 2010-11-07 00:10:20 EDT - 2010-11-07 03:16:55 EST = **P-0Y0M0DT4H6M35S**
|
||||
test_time_fall_type3_st_type2_redodt: DIFF: 2010-11-07 01:12:33 EDT - 2010-11-07 03:16:55 EST = **P-0Y0M0DT3H4M22S**
|
||||
test_time_fall_type3_st_type2_redost: DIFF: 2010-11-07 01:14:44 EST - 2010-11-07 03:16:55 EST = **P-0Y0M0DT2H2M11S**
|
||||
test_time_fall_type3_st_type2_st: DIFF: 2010-11-07 05:19:56 EST - 2010-11-07 03:16:55 EST = **P+0Y0M0DT2H3M1S**
|
||||
test_time_fall_type3_st_type2_post: DIFF: 2010-11-08 19:59:59 EST - 2010-11-07 03:16:55 EST = **P+0Y0M1DT16H43M4S**
|
||||
test_time_fall_type3_post_type2_prev: DIFF: 2010-11-06 18:38:28 EDT - 2010-11-08 19:59:59 EST = **P-0Y0M2DT1H21M31S**
|
||||
test_time_fall_type3_post_type2_dt: DIFF: 2010-11-07 00:10:20 EDT - 2010-11-08 19:59:59 EST = **P-0Y0M1DT20H49M39S**
|
||||
test_time_fall_type3_post_type2_redodt: DIFF: 2010-11-07 01:12:33 EDT - 2010-11-08 19:59:59 EST = **P-0Y0M1DT19H47M26S**
|
||||
test_time_fall_type3_post_type2_redost: DIFF: 2010-11-07 01:14:44 EST - 2010-11-08 19:59:59 EST = **P-0Y0M1DT18H45M15S**
|
||||
test_time_fall_type3_post_type2_st: DIFF: 2010-11-07 03:16:55 EST - 2010-11-08 19:59:59 EST = **P-0Y0M1DT16H43M4S**
|
||||
test_time_fall_type3_post_type2_post: DIFF: 2010-11-08 19:59:59 EST - 2010-11-08 18:57:55 EST = **P+0Y0M0DT1H2M4S**
|
||||
@@ -0,0 +1,51 @@
|
||||
--TEST--
|
||||
DateTime::diff() -- fall type3 type3
|
||||
--CREDITS--
|
||||
Daniel Convissor <danielc@php.net>
|
||||
--XFAIL--
|
||||
Various bugs exist
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
require 'examine_diff.inc';
|
||||
define('PHPT_DATETIME_SHOW', PHPT_DATETIME_SHOW_DIFF);
|
||||
require 'DateTime_data-fall-type3-type3.inc';
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
test_time_fall_type3_prev_type3_prev: DIFF: 2010-11-06 18:38:28 EDT - 2010-10-04 02:18:48 EDT = **P+0Y1M2DT16H19M40S**
|
||||
test_time_fall_type3_prev_type3_dt: DIFF: 2010-11-07 00:10:20 EDT - 2010-11-06 18:38:28 EDT = **P+0Y0M0DT5H31M52S**
|
||||
test_time_fall_type3_prev_type3_redodt: DIFF: 2010-11-07 01:12:33 EDT - 2010-11-06 18:38:28 EDT = **P+0Y0M0DT6H34M5S**
|
||||
test_time_fall_type3_prev_type3_redost: DIFF: 2010-11-07 01:14:44 EST - 2010-11-06 18:38:28 EDT = **P+0Y0M0DT7H36M16S**
|
||||
test_time_fall_type3_prev_type3_st: DIFF: 2010-11-07 03:16:55 EST - 2010-11-06 18:38:28 EDT = **P+0Y0M0DT9H38M27S**
|
||||
test_time_fall_type3_prev_type3_post: DIFF: 2010-11-08 19:59:59 EST - 2010-11-06 18:38:28 EDT = **P+0Y0M2DT1H21M31S**
|
||||
test_time_fall_type3_dt_type3_prev: DIFF: 2010-11-06 18:38:28 EDT - 2010-11-07 00:10:20 EDT = **P-0Y0M0DT5H31M52S**
|
||||
test_time_fall_type3_dt_type3_dt: DIFF: 2010-11-07 00:15:35 EDT - 2010-11-07 00:10:20 EDT = **P+0Y0M0DT0H5M15S**
|
||||
test_time_fall_type3_dt_type3_redodt: DIFF: 2010-11-07 01:12:33 EDT - 2010-11-07 00:10:20 EDT = **P+0Y0M0DT1H2M13S**
|
||||
test_time_fall_type3_dt_type3_redost: DIFF: 2010-11-07 01:14:44 EST - 2010-11-07 00:10:20 EDT = **P+0Y0M0DT2H4M24S**
|
||||
test_time_fall_type3_dt_type3_st: DIFF: 2010-11-07 03:16:55 EST - 2010-11-07 00:10:20 EDT = **P+0Y0M0DT4H6M35S**
|
||||
test_time_fall_type3_dt_type3_post: DIFF: 2010-11-08 19:59:59 EST - 2010-11-07 00:10:20 EDT = **P+0Y0M1DT20H49M39S**
|
||||
test_time_fall_type3_redodt_type3_prev: DIFF: 2010-11-06 18:38:28 EDT - 2010-11-07 01:12:33 EDT = **P-0Y0M0DT6H34M5S**
|
||||
test_time_fall_type3_redodt_type3_dt: DIFF: 2010-11-07 00:10:20 EDT - 2010-11-07 01:12:33 EDT = **P-0Y0M0DT1H2M13S**
|
||||
test_time_fall_type3_redodt_type3_redodt: DIFF: 2010-11-07 01:15:35 EDT - 2010-11-07 01:12:33 EDT = **P+0Y0M0DT0H3M2S**
|
||||
test_time_fall_type3_redodt_type3_redost: DIFF: 2010-11-07 01:14:44 EST - 2010-11-07 01:12:33 EDT = **P+0Y0M0DT1H2M11S**
|
||||
test_time_fall_type3_redodt_type3_st: DIFF: 2010-11-07 03:16:55 EST - 2010-11-07 01:12:33 EDT = **P+0Y0M0DT3H4M22S**
|
||||
test_time_fall_type3_redodt_type3_post: DIFF: 2010-11-08 19:59:59 EST - 2010-11-07 01:12:33 EDT = **P+0Y0M1DT19H47M26S**
|
||||
test_time_fall_type3_redost_type3_prev: DIFF: 2010-11-06 18:38:28 EDT - 2010-11-07 01:14:44 EST = **P-0Y0M0DT7H36M16S**
|
||||
test_time_fall_type3_redost_type3_dt: DIFF: 2010-11-07 00:10:20 EDT - 2010-11-07 01:14:44 EST = **P-0Y0M0DT2H4M24S**
|
||||
test_time_fall_type3_redost_type3_redodt: DIFF: 2010-11-07 01:12:33 EDT - 2010-11-07 01:14:44 EST = **P-0Y0M0DT1H2M11S**
|
||||
test_time_fall_type3_redost_type3_redost: DIFF: 2010-11-07 01:16:54 EST - 2010-11-07 01:14:44 EST = **P+0Y0M0DT0H2M10S**
|
||||
test_time_fall_type3_redost_type3_st: DIFF: 2010-11-07 03:16:55 EST - 2010-11-07 01:14:44 EST = **P+0Y0M0DT2H2M11S**
|
||||
test_time_fall_type3_redost_type3_post: DIFF: 2010-11-08 19:59:59 EST - 2010-11-07 01:14:44 EST = **P+0Y0M1DT18H45M15S**
|
||||
test_time_fall_type3_st_type3_prev: DIFF: 2010-11-06 18:38:28 EDT - 2010-11-07 03:16:55 EST = **P-0Y0M0DT9H38M27S**
|
||||
test_time_fall_type3_st_type3_dt: DIFF: 2010-11-07 00:10:20 EDT - 2010-11-07 03:16:55 EST = **P-0Y0M0DT4H6M35S**
|
||||
test_time_fall_type3_st_type3_redodt: DIFF: 2010-11-07 01:12:33 EDT - 2010-11-07 03:16:55 EST = **P-0Y0M0DT3H4M22S**
|
||||
test_time_fall_type3_st_type3_redost: DIFF: 2010-11-07 01:14:44 EST - 2010-11-07 03:16:55 EST = **P-0Y0M0DT2H2M11S**
|
||||
test_time_fall_type3_st_type3_st: DIFF: 2010-11-07 05:19:56 EST - 2010-11-07 03:16:55 EST = **P+0Y0M0DT2H3M1S**
|
||||
test_time_fall_type3_st_type3_post: DIFF: 2010-11-08 19:59:59 EST - 2010-11-07 03:16:55 EST = **P+0Y0M1DT16H43M4S**
|
||||
test_time_fall_type3_post_type3_prev: DIFF: 2010-11-06 18:38:28 EDT - 2010-11-08 19:59:59 EST = **P-0Y0M2DT1H21M31S**
|
||||
test_time_fall_type3_post_type3_dt: DIFF: 2010-11-07 00:10:20 EDT - 2010-11-08 19:59:59 EST = **P-0Y0M1DT20H49M39S**
|
||||
test_time_fall_type3_post_type3_redodt: DIFF: 2010-11-07 01:12:33 EDT - 2010-11-08 19:59:59 EST = **P-0Y0M1DT19H47M26S**
|
||||
test_time_fall_type3_post_type3_redost: DIFF: 2010-11-07 01:14:44 EST - 2010-11-08 19:59:59 EST = **P-0Y0M1DT18H45M15S**
|
||||
test_time_fall_type3_post_type3_st: DIFF: 2010-11-07 03:16:55 EST - 2010-11-08 19:59:59 EST = **P-0Y0M1DT16H43M4S**
|
||||
test_time_fall_type3_post_type3_post: DIFF: 2010-11-08 19:59:59 EST - 2010-11-08 18:57:55 EST = **P+0Y0M0DT1H2M4S**
|
||||
@@ -0,0 +1,77 @@
|
||||
--TEST--
|
||||
DateTime::diff() -- february
|
||||
--CREDITS--
|
||||
Daniel Convissor <danielc@php.net>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
require 'examine_diff.inc';
|
||||
define('PHPT_DATETIME_SHOW', PHPT_DATETIME_SHOW_DIFF);
|
||||
require 'DateTime_data-february.inc';
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
test_bug_49081__1: DIFF: 2010-03-31 00:00:00 EDT - 2010-03-01 00:00:00 EST = **P+0Y0M30DT0H0M0S**
|
||||
test_bug_49081__2: DIFF: 2010-04-01 00:00:00 EDT - 2010-03-01 00:00:00 EST = **P+0Y1M0DT0H0M0S**
|
||||
test_bug_49081__3: DIFF: 2010-04-01 00:00:00 EDT - 2010-03-31 00:00:00 EDT = **P+0Y0M1DT0H0M0S**
|
||||
test_bug_49081__4: DIFF: 2010-04-29 00:00:00 EDT - 2010-03-31 00:00:00 EDT = **P+0Y0M29DT0H0M0S**
|
||||
test_bug_49081__5: DIFF: 2010-04-30 00:00:00 EDT - 2010-03-31 00:00:00 EDT = **P+0Y0M30DT0H0M0S**
|
||||
test_bug_49081__6: DIFF: 2010-04-30 00:00:00 EDT - 2010-03-30 00:00:00 EDT = **P+0Y1M0DT0H0M0S**
|
||||
test_bug_49081__7: DIFF: 2010-04-30 00:00:00 EDT - 2010-03-29 00:00:00 EDT = **P+0Y1M1DT0H0M0S**
|
||||
test_bug_49081__8: DIFF: 2010-01-29 00:00:00 EST - 2010-01-01 00:00:00 EST = **P+0Y0M28DT0H0M0S**
|
||||
test_bug_49081__9: DIFF: 2010-01-30 00:00:00 EST - 2010-01-01 00:00:00 EST = **P+0Y0M29DT0H0M0S**
|
||||
test_bug_49081__10: DIFF: 2010-01-31 00:00:00 EST - 2010-01-01 00:00:00 EST = **P+0Y0M30DT0H0M0S**
|
||||
test_bug_49081__11: DIFF: 2010-02-01 00:00:00 EST - 2010-01-01 00:00:00 EST = **P+0Y1M0DT0H0M0S**
|
||||
test_bug_49081__12: DIFF: 2010-02-01 00:00:00 EST - 2010-01-31 00:00:00 EST = **P+0Y0M1DT0H0M0S**
|
||||
test_bug_49081__13: DIFF: 2010-02-27 00:00:00 EST - 2010-01-31 00:00:00 EST = **P+0Y0M27DT0H0M0S**
|
||||
test_bug_49081__14: DIFF: 2010-02-28 00:00:00 EST - 2010-01-31 00:00:00 EST = **P+0Y0M28DT0H0M0S**
|
||||
test_bug_49081__15: DIFF: 2010-02-28 00:00:00 EST - 2010-01-30 00:00:00 EST = **P+0Y0M29DT0H0M0S**
|
||||
test_bug_49081__16: DIFF: 2010-02-28 00:00:00 EST - 2010-01-29 00:00:00 EST = **P+0Y0M30DT0H0M0S**
|
||||
test_bug_49081__17: DIFF: 2010-02-28 00:00:00 EST - 2010-01-28 00:00:00 EST = **P+0Y1M0DT0H0M0S**
|
||||
test_bug_49081__18: DIFF: 2010-02-28 00:00:00 EST - 2010-01-27 00:00:00 EST = **P+0Y1M1DT0H0M0S**
|
||||
test_bug_49081__19: DIFF: 2010-03-01 00:00:00 EST - 2010-01-01 00:00:00 EST = **P+0Y2M0DT0H0M0S**
|
||||
test_bug_49081__20: DIFF: 2010-03-01 00:00:00 EST - 2010-01-31 00:00:00 EST = **P+0Y0M29DT0H0M0S**
|
||||
test_bug_49081__21: DIFF: 2010-03-27 00:00:00 EDT - 2010-01-31 00:00:00 EST = **P+0Y1M24DT0H0M0S**
|
||||
test_bug_49081__22: DIFF: 2010-03-28 00:00:00 EDT - 2010-01-31 00:00:00 EST = **P+0Y1M25DT0H0M0S**
|
||||
test_bug_49081__23: DIFF: 2010-03-29 00:00:00 EDT - 2010-01-31 00:00:00 EST = **P+0Y1M26DT0H0M0S**
|
||||
test_bug_49081__24: DIFF: 2010-03-30 00:00:00 EDT - 2010-01-31 00:00:00 EST = **P+0Y1M27DT0H0M0S**
|
||||
test_bug_49081__25: DIFF: 2010-03-31 00:00:00 EDT - 2010-01-31 00:00:00 EST = **P+0Y2M0DT0H0M0S**
|
||||
test_bug_49081__26: DIFF: 2010-03-31 00:00:00 EDT - 2010-01-30 00:00:00 EST = **P+0Y2M1DT0H0M0S**
|
||||
test_bug_49081__27: DIFF: 2009-01-31 00:00:00 EST - 2009-01-01 00:00:00 EST = **P+0Y0M30DT0H0M0S**
|
||||
test_bug_49081__28: DIFF: 2010-03-27 00:00:00 EDT - 2010-02-28 00:00:00 EST = **P+0Y0M27DT0H0M0S**
|
||||
test_bug_49081__29: DIFF: 2010-03-28 00:00:00 EDT - 2010-02-28 00:00:00 EST = **P+0Y1M0DT0H0M0S**
|
||||
test_bug_49081__30: DIFF: 2010-03-29 00:00:00 EDT - 2010-02-28 00:00:00 EST = **P+0Y1M1DT0H0M0S**
|
||||
test_bug_49081__31: DIFF: 2010-03-27 00:00:00 EDT - 2010-02-27 00:00:00 EST = **P+0Y1M0DT0H0M0S**
|
||||
test_bug_49081__32: DIFF: 2010-03-27 00:00:00 EDT - 2010-02-26 00:00:00 EST = **P+0Y1M1DT0H0M0S**
|
||||
test_bug_49081_negative__1: DIFF: 2010-03-01 00:00:00 EST - 2010-03-31 00:00:00 EDT = **P-0Y0M30DT0H0M0S**
|
||||
test_bug_49081_negative__2: DIFF: 2010-03-01 00:00:00 EST - 2010-04-01 00:00:00 EDT = **P-0Y1M0DT0H0M0S**
|
||||
test_bug_49081_negative__3: DIFF: 2010-03-31 00:00:00 EDT - 2010-04-01 00:00:00 EDT = **P-0Y0M1DT0H0M0S**
|
||||
test_bug_49081_negative__4: DIFF: 2010-03-31 00:00:00 EDT - 2010-04-29 00:00:00 EDT = **P-0Y0M29DT0H0M0S**
|
||||
test_bug_49081_negative__5: DIFF: 2010-03-31 00:00:00 EDT - 2010-04-30 00:00:00 EDT = **P-0Y0M30DT0H0M0S**
|
||||
test_bug_49081_negative__6: DIFF: 2010-03-30 00:00:00 EDT - 2010-04-30 00:00:00 EDT = **P-0Y1M0DT0H0M0S**
|
||||
test_bug_49081_negative__7: DIFF: 2010-03-29 00:00:00 EDT - 2010-04-30 00:00:00 EDT = **P-0Y1M1DT0H0M0S**
|
||||
test_bug_49081_negative__8: DIFF: 2010-01-01 00:00:00 EST - 2010-01-29 00:00:00 EST = **P-0Y0M28DT0H0M0S**
|
||||
test_bug_49081_negative__9: DIFF: 2010-01-01 00:00:00 EST - 2010-01-30 00:00:00 EST = **P-0Y0M29DT0H0M0S**
|
||||
test_bug_49081_negative__10: DIFF: 2010-01-01 00:00:00 EST - 2010-01-31 00:00:00 EST = **P-0Y0M30DT0H0M0S**
|
||||
test_bug_49081_negative__11: DIFF: 2010-01-01 00:00:00 EST - 2010-02-01 00:00:00 EST = **P-0Y1M0DT0H0M0S**
|
||||
test_bug_49081_negative__12: DIFF: 2010-01-31 00:00:00 EST - 2010-02-01 00:00:00 EST = **P-0Y0M1DT0H0M0S**
|
||||
test_bug_49081_negative__13: DIFF: 2010-01-31 00:00:00 EST - 2010-02-27 00:00:00 EST = **P-0Y0M27DT0H0M0S**
|
||||
test_bug_49081_negative__14: DIFF: 2010-01-31 00:00:00 EST - 2010-02-28 00:00:00 EST = **P-0Y0M28DT0H0M0S**
|
||||
test_bug_49081_negative__15: DIFF: 2010-01-30 00:00:00 EST - 2010-02-28 00:00:00 EST = **P-0Y0M29DT0H0M0S**
|
||||
test_bug_49081_negative__16: DIFF: 2010-01-29 00:00:00 EST - 2010-02-28 00:00:00 EST = **P-0Y0M30DT0H0M0S**
|
||||
test_bug_49081_negative__17: DIFF: 2010-01-28 00:00:00 EST - 2010-02-28 00:00:00 EST = **P-0Y1M0DT0H0M0S**
|
||||
test_bug_49081_negative__18: DIFF: 2010-01-27 00:00:00 EST - 2010-02-28 00:00:00 EST = **P-0Y1M1DT0H0M0S**
|
||||
test_bug_49081_negative__19: DIFF: 2010-01-01 00:00:00 EST - 2010-03-01 00:00:00 EST = **P-0Y2M0DT0H0M0S**
|
||||
test_bug_49081_negative__20: DIFF: 2010-01-31 00:00:00 EST - 2010-03-01 00:00:00 EST = **P-0Y1M1DT0H0M0S**
|
||||
test_bug_49081_negative__21: DIFF: 2010-01-31 00:00:00 EST - 2010-03-27 00:00:00 EDT = **P-0Y1M27DT0H0M0S**
|
||||
test_bug_49081_negative__22: DIFF: 2010-01-31 00:00:00 EST - 2010-03-28 00:00:00 EDT = **P-0Y1M28DT0H0M0S**
|
||||
test_bug_49081_negative__23: DIFF: 2010-01-31 00:00:00 EST - 2010-03-29 00:00:00 EDT = **P-0Y1M29DT0H0M0S**
|
||||
test_bug_49081_negative__24: DIFF: 2010-01-31 00:00:00 EST - 2010-03-30 00:00:00 EDT = **P-0Y1M30DT0H0M0S**
|
||||
test_bug_49081_negative__25: DIFF: 2010-01-31 00:00:00 EST - 2010-03-31 00:00:00 EDT = **P-0Y2M0DT0H0M0S**
|
||||
test_bug_49081_negative__26: DIFF: 2010-01-30 00:00:00 EST - 2010-03-31 00:00:00 EDT = **P-0Y2M1DT0H0M0S**
|
||||
test_bug_49081_negative__27: DIFF: 2009-01-01 00:00:00 EST - 2009-01-31 00:00:00 EST = **P-0Y0M30DT0H0M0S**
|
||||
test_bug_49081_negative__28: DIFF: 2010-02-28 00:00:00 EST - 2010-03-27 00:00:00 EDT = **P-0Y0M27DT0H0M0S**
|
||||
test_bug_49081_negative__29: DIFF: 2010-02-28 00:00:00 EST - 2010-03-28 00:00:00 EDT = **P-0Y1M0DT0H0M0S**
|
||||
test_bug_49081_negative__30: DIFF: 2010-02-28 00:00:00 EST - 2010-03-29 00:00:00 EDT = **P-0Y1M1DT0H0M0S**
|
||||
test_bug_49081_negative__31: DIFF: 2010-02-27 00:00:00 EST - 2010-03-27 00:00:00 EDT = **P-0Y1M0DT0H0M0S**
|
||||
test_bug_49081_negative__32: DIFF: 2010-02-26 00:00:00 EST - 2010-03-27 00:00:00 EDT = **P-0Y1M1DT0H0M0S**
|
||||
@@ -0,0 +1,15 @@
|
||||
--TEST--
|
||||
DateTime::diff() -- massive
|
||||
--CREDITS--
|
||||
Daniel Convissor <danielc@php.net>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
require 'examine_diff.inc';
|
||||
define('PHPT_DATETIME_SHOW', PHPT_DATETIME_SHOW_DIFF);
|
||||
require 'DateTime_data-massive.inc';
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
test_massive_positive: DIFF: 333333-01-01 16:18:02 EST - -333333-01-01 16:18:02 EST = **P+666666Y0M0DT0H0M0S**
|
||||
test_massive_negative: DIFF: -333333-01-01 16:18:02 EST - 333333-01-01 16:18:02 EST = **P-666666Y0M0DT0H0M0S**
|
||||
@@ -0,0 +1,31 @@
|
||||
--TEST--
|
||||
DateTime::diff() -- spring type2 type2
|
||||
--CREDITS--
|
||||
Daniel Convissor <danielc@php.net>
|
||||
--XFAIL--
|
||||
Various bugs exist
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
require 'examine_diff.inc';
|
||||
define('PHPT_DATETIME_SHOW', PHPT_DATETIME_SHOW_DIFF);
|
||||
require 'DateTime_data-spring-type2-type2.inc';
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
test_time_spring_type2_prev_type2_prev: DIFF: 2010-03-13 18:38:28 EST - 2010-02-11 02:18:48 EST = **P+0Y1M2DT16H19M40S**
|
||||
test_time_spring_type2_prev_type2_st: DIFF: 2010-03-14 00:10:20 EST - 2010-03-13 18:38:28 EST = **P+0Y0M0DT5H31M52S**
|
||||
test_time_spring_type2_prev_type2_dt: DIFF: 2010-03-14 03:16:55 EDT - 2010-03-13 18:38:28 EST = **P+0Y0M0DT7H38M27S**
|
||||
test_time_spring_type2_prev_type2_post: DIFF: 2010-03-15 19:59:59 EDT - 2010-03-13 18:38:28 EST = **P+0Y0M2DT1H21M31S**
|
||||
test_time_spring_type2_st_type2_prev: DIFF: 2010-03-13 18:38:28 EST - 2010-03-14 00:10:20 EST = **P-0Y0M0DT5H31M52S**
|
||||
test_time_spring_type2_st_type2_st: DIFF: 2010-03-14 00:15:35 EST - 2010-03-14 00:10:20 EST = **P+0Y0M0DT0H5M15S**
|
||||
test_time_spring_type2_st_type2_dt: DIFF: 2010-03-14 03:16:55 EDT - 2010-03-14 00:10:20 EST = **P+0Y0M0DT2H6M35S**
|
||||
test_time_spring_type2_st_type2_post: DIFF: 2010-03-15 19:59:59 EDT - 2010-03-14 00:10:20 EST = **P+0Y0M1DT18H49M39S**
|
||||
test_time_spring_type2_dt_type2_prev: DIFF: 2010-03-13 18:38:28 EST - 2010-03-14 03:16:55 EDT = **P-0Y0M0DT7H38M27S**
|
||||
test_time_spring_type2_dt_type2_st: DIFF: 2010-03-14 00:10:20 EST - 2010-03-14 03:16:55 EDT = **P-0Y0M0DT2H6M35S**
|
||||
test_time_spring_type2_dt_type2_dt: DIFF: 2010-03-14 05:19:56 EDT - 2010-03-14 03:16:55 EDT = **P+0Y0M0DT2H3M1S**
|
||||
test_time_spring_type2_dt_type2_post: DIFF: 2010-03-15 19:59:59 EDT - 2010-03-14 03:16:55 EDT = **P+0Y0M1DT16H43M4S**
|
||||
test_time_spring_type2_post_type2_prev: DIFF: 2010-03-13 18:38:28 EST - 2010-03-15 19:59:59 EDT = **P-0Y0M2DT1H21M31S**
|
||||
test_time_spring_type2_post_type2_st: DIFF: 2010-03-14 00:10:20 EST - 2010-03-15 19:59:59 EDT = **P-0Y0M1DT18H49M39S**
|
||||
test_time_spring_type2_post_type2_dt: DIFF: 2010-03-14 03:16:55 EDT - 2010-03-15 19:59:59 EDT = **P-0Y0M1DT16H43M4S**
|
||||
test_time_spring_type2_post_type2_post: DIFF: 2010-03-15 19:59:59 EDT - 2010-03-15 18:57:55 EDT = **P+0Y0M0DT1H2M4S**
|
||||
@@ -0,0 +1,31 @@
|
||||
--TEST--
|
||||
DateTime::diff() -- spring type2 type3
|
||||
--CREDITS--
|
||||
Daniel Convissor <danielc@php.net>
|
||||
--XFAIL--
|
||||
Various bugs exist
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
require 'examine_diff.inc';
|
||||
define('PHPT_DATETIME_SHOW', PHPT_DATETIME_SHOW_DIFF);
|
||||
require 'DateTime_data-spring-type2-type3.inc';
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
test_time_spring_type2_prev_type3_prev: DIFF: 2010-03-13 18:38:28 EST - 2010-02-11 02:18:48 EST = **P+0Y1M2DT16H19M40S**
|
||||
test_time_spring_type2_prev_type3_st: DIFF: 2010-03-14 00:10:20 EST - 2010-03-13 18:38:28 EST = **P+0Y0M0DT5H31M52S**
|
||||
test_time_spring_type2_prev_type3_dt: DIFF: 2010-03-14 03:16:55 EDT - 2010-03-13 18:38:28 EST = **P+0Y0M0DT7H38M27S**
|
||||
test_time_spring_type2_prev_type3_post: DIFF: 2010-03-15 19:59:59 EDT - 2010-03-13 18:38:28 EST = **P+0Y0M2DT1H21M31S**
|
||||
test_time_spring_type2_st_type3_prev: DIFF: 2010-03-13 18:38:28 EST - 2010-03-14 00:10:20 EST = **P-0Y0M0DT5H31M52S**
|
||||
test_time_spring_type2_st_type3_st: DIFF: 2010-03-14 00:15:35 EST - 2010-03-14 00:10:20 EST = **P+0Y0M0DT0H5M15S**
|
||||
test_time_spring_type2_st_type3_dt: DIFF: 2010-03-14 03:16:55 EDT - 2010-03-14 00:10:20 EST = **P+0Y0M0DT2H6M35S**
|
||||
test_time_spring_type2_st_type3_post: DIFF: 2010-03-15 19:59:59 EDT - 2010-03-14 00:10:20 EST = **P+0Y0M1DT18H49M39S**
|
||||
test_time_spring_type2_dt_type3_prev: DIFF: 2010-03-13 18:38:28 EST - 2010-03-14 03:16:55 EDT = **P-0Y0M0DT7H38M27S**
|
||||
test_time_spring_type2_dt_type3_st: DIFF: 2010-03-14 00:10:20 EST - 2010-03-14 03:16:55 EDT = **P-0Y0M0DT2H6M35S**
|
||||
test_time_spring_type2_dt_type3_dt: DIFF: 2010-03-14 05:19:56 EDT - 2010-03-14 03:16:55 EDT = **P+0Y0M0DT2H3M1S**
|
||||
test_time_spring_type2_dt_type3_post: DIFF: 2010-03-15 19:59:59 EDT - 2010-03-14 03:16:55 EDT = **P+0Y0M1DT16H43M4S**
|
||||
test_time_spring_type2_post_type3_prev: DIFF: 2010-03-13 18:38:28 EST - 2010-03-15 19:59:59 EDT = **P-0Y0M2DT1H21M31S**
|
||||
test_time_spring_type2_post_type3_st: DIFF: 2010-03-14 00:10:20 EST - 2010-03-15 19:59:59 EDT = **P-0Y0M1DT18H49M39S**
|
||||
test_time_spring_type2_post_type3_dt: DIFF: 2010-03-14 03:16:55 EDT - 2010-03-15 19:59:59 EDT = **P-0Y0M1DT16H43M4S**
|
||||
test_time_spring_type2_post_type3_post: DIFF: 2010-03-15 19:59:59 EDT - 2010-03-15 18:57:55 EDT = **P+0Y0M0DT1H2M4S**
|
||||
@@ -0,0 +1,31 @@
|
||||
--TEST--
|
||||
DateTime::diff() -- spring type3 type2
|
||||
--CREDITS--
|
||||
Daniel Convissor <danielc@php.net>
|
||||
--XFAIL--
|
||||
Various bugs exist
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
require 'examine_diff.inc';
|
||||
define('PHPT_DATETIME_SHOW', PHPT_DATETIME_SHOW_DIFF);
|
||||
require 'DateTime_data-spring-type3-type2.inc';
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
test_time_spring_type3_prev_type2_prev: DIFF: 2010-03-13 18:38:28 EST - 2010-02-11 02:18:48 EST = **P+0Y1M2DT16H19M40S**
|
||||
test_time_spring_type3_prev_type2_st: DIFF: 2010-03-14 00:10:20 EST - 2010-03-13 18:38:28 EST = **P+0Y0M0DT5H31M52S**
|
||||
test_time_spring_type3_prev_type2_dt: DIFF: 2010-03-14 03:16:55 EDT - 2010-03-13 18:38:28 EST = **P+0Y0M0DT7H38M27S**
|
||||
test_time_spring_type3_prev_type2_post: DIFF: 2010-03-15 19:59:59 EDT - 2010-03-13 18:38:28 EST = **P+0Y0M2DT1H21M31S**
|
||||
test_time_spring_type3_st_type2_prev: DIFF: 2010-03-13 18:38:28 EST - 2010-03-14 00:10:20 EST = **P-0Y0M0DT5H31M52S**
|
||||
test_time_spring_type3_st_type2_st: DIFF: 2010-03-14 00:15:35 EST - 2010-03-14 00:10:20 EST = **P+0Y0M0DT0H5M15S**
|
||||
test_time_spring_type3_st_type2_dt: DIFF: 2010-03-14 03:16:55 EDT - 2010-03-14 00:10:20 EST = **P+0Y0M0DT2H6M35S**
|
||||
test_time_spring_type3_st_type2_post: DIFF: 2010-03-15 19:59:59 EDT - 2010-03-14 00:10:20 EST = **P+0Y0M1DT18H49M39S**
|
||||
test_time_spring_type3_dt_type2_prev: DIFF: 2010-03-13 18:38:28 EST - 2010-03-14 03:16:55 EDT = **P-0Y0M0DT7H38M27S**
|
||||
test_time_spring_type3_dt_type2_st: DIFF: 2010-03-14 00:10:20 EST - 2010-03-14 03:16:55 EDT = **P-0Y0M0DT2H6M35S**
|
||||
test_time_spring_type3_dt_type2_dt: DIFF: 2010-03-14 05:19:56 EDT - 2010-03-14 03:16:55 EDT = **P+0Y0M0DT2H3M1S**
|
||||
test_time_spring_type3_dt_type2_post: DIFF: 2010-03-15 19:59:59 EDT - 2010-03-14 03:16:55 EDT = **P+0Y0M1DT16H43M4S**
|
||||
test_time_spring_type3_post_type2_prev: DIFF: 2010-03-13 18:38:28 EST - 2010-03-15 19:59:59 EDT = **P-0Y0M2DT1H21M31S**
|
||||
test_time_spring_type3_post_type2_st: DIFF: 2010-03-14 00:10:20 EST - 2010-03-15 19:59:59 EDT = **P-0Y0M1DT18H49M39S**
|
||||
test_time_spring_type3_post_type2_dt: DIFF: 2010-03-14 03:16:55 EDT - 2010-03-15 19:59:59 EDT = **P-0Y0M1DT16H43M4S**
|
||||
test_time_spring_type3_post_type2_post: DIFF: 2010-03-15 19:59:59 EDT - 2010-03-15 18:57:55 EDT = **P+0Y0M0DT1H2M4S**
|
||||
@@ -0,0 +1,31 @@
|
||||
--TEST--
|
||||
DateTime::diff() -- spring type3 type3
|
||||
--CREDITS--
|
||||
Daniel Convissor <danielc@php.net>
|
||||
--XFAIL--
|
||||
Various bugs exist
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
require 'examine_diff.inc';
|
||||
define('PHPT_DATETIME_SHOW', PHPT_DATETIME_SHOW_DIFF);
|
||||
require 'DateTime_data-spring-type3-type3.inc'
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
test_time_spring_type3_prev_type3_prev: DIFF: 2010-03-13 18:38:28 EST - 2010-02-11 02:18:48 EST = **P+0Y1M2DT16H19M40S**
|
||||
test_time_spring_type3_prev_type3_st: DIFF: 2010-03-14 00:10:20 EST - 2010-03-13 18:38:28 EST = **P+0Y0M0DT5H31M52S**
|
||||
test_time_spring_type3_prev_type3_dt: DIFF: 2010-03-14 03:16:55 EDT - 2010-03-13 18:38:28 EST = **P+0Y0M0DT7H38M27S**
|
||||
test_time_spring_type3_prev_type3_post: DIFF: 2010-03-15 19:59:59 EDT - 2010-03-13 18:38:28 EST = **P+0Y0M2DT1H21M31S**
|
||||
test_time_spring_type3_st_type3_prev: DIFF: 2010-03-13 18:38:28 EST - 2010-03-14 00:10:20 EST = **P-0Y0M0DT5H31M52S**
|
||||
test_time_spring_type3_st_type3_st: DIFF: 2010-03-14 00:15:35 EST - 2010-03-14 00:10:20 EST = **P+0Y0M0DT0H5M15S**
|
||||
test_time_spring_type3_st_type3_dt: DIFF: 2010-03-14 03:16:55 EDT - 2010-03-14 00:10:20 EST = **P+0Y0M0DT2H6M35S**
|
||||
test_time_spring_type3_st_type3_post: DIFF: 2010-03-15 19:59:59 EDT - 2010-03-14 00:10:20 EST = **P+0Y0M1DT18H49M39S**
|
||||
test_time_spring_type3_dt_type3_prev: DIFF: 2010-03-13 18:38:28 EST - 2010-03-14 03:16:55 EDT = **P-0Y0M0DT7H38M27S**
|
||||
test_time_spring_type3_dt_type3_st: DIFF: 2010-03-14 00:10:20 EST - 2010-03-14 03:16:55 EDT = **P-0Y0M0DT2H6M35S**
|
||||
test_time_spring_type3_dt_type3_dt: DIFF: 2010-03-14 05:19:56 EDT - 2010-03-14 03:16:55 EDT = **P+0Y0M0DT2H3M1S**
|
||||
test_time_spring_type3_dt_type3_post: DIFF: 2010-03-15 19:59:59 EDT - 2010-03-14 03:16:55 EDT = **P+0Y0M1DT16H43M4S**
|
||||
test_time_spring_type3_post_type3_prev: DIFF: 2010-03-13 18:38:28 EST - 2010-03-15 19:59:59 EDT = **P-0Y0M2DT1H21M31S**
|
||||
test_time_spring_type3_post_type3_st: DIFF: 2010-03-14 00:10:20 EST - 2010-03-15 19:59:59 EDT = **P-0Y0M1DT18H49M39S**
|
||||
test_time_spring_type3_post_type3_dt: DIFF: 2010-03-14 03:16:55 EDT - 2010-03-15 19:59:59 EDT = **P-0Y0M1DT16H43M4S**
|
||||
test_time_spring_type3_post_type3_post: DIFF: 2010-03-15 19:59:59 EDT - 2010-03-15 18:57:55 EDT = **P+0Y0M0DT1H2M4S**
|
||||
@@ -1,29 +0,0 @@
|
||||
--TEST--
|
||||
DateTime::diff() add() sub() -- absolute
|
||||
--CREDITS--
|
||||
Daniel Convissor <danielc@php.net>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
/*
|
||||
* Note: test names match method names in a set of PHPUnit tests
|
||||
* in a userland package. Please be so kind as to leave them.
|
||||
*/
|
||||
|
||||
require './examine_diff.inc';
|
||||
date_default_timezone_set('America/New_York');
|
||||
|
||||
|
||||
/*
|
||||
* Absolute
|
||||
*/
|
||||
echo "test_absolute_7: ";
|
||||
examine_diff('2009-01-14', '2009-01-07', 'P+0Y0M7DT0H0M0S', 7, true);
|
||||
|
||||
echo "test_absolute_negative_7: ";
|
||||
examine_diff('2009-01-07', '2009-01-14', 'P+0Y0M7DT0H0M0S', 7, true);
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
test_absolute_7: FWD: 2009-01-14 00:00:00 EST - 2009-01-07 00:00:00 EST = **P+0Y0M7DT0H0M0S** | BACK: 2009-01-07 00:00:00 EST + P+0Y0M7DT0H0M0S = **2009-01-14 00:00:00 EST** | DAYS: **7**
|
||||
test_absolute_negative_7: FWD: 2009-01-07 00:00:00 EST - 2009-01-14 00:00:00 EST = **P+0Y0M7DT0H0M0S** | BACK: 2009-01-14 00:00:00 EST - P+0Y0M7DT0H0M0S = **2009-01-07 00:00:00 EST** | DAYS: **7**
|
||||
Loaded 100 of 721 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user