mirror of
https://github.com/bdnugget/php-src.git
synced 2026-11-11 11:10:49 +00:00
Compare commits
587
Commits
PHP-7.1.1
...
php-7.0.23
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
65a9f5f822 | ||
|
|
5100c51d52 | ||
|
|
def573ddaf | ||
|
|
d8c80af71e | ||
|
|
2def85688d | ||
|
|
259477826c | ||
|
|
ab07265573 | ||
|
|
71fd58652f | ||
|
|
f555224743 | ||
|
|
f64be0b013 | ||
|
|
472b25921e | ||
|
|
1a23ebc1ff | ||
|
|
b59718bdc4 | ||
|
|
b06f8cb58b | ||
|
|
afb20f4895 | ||
|
|
075986f214 | ||
|
|
618dcd6520 | ||
|
|
4c9fe5a490 | ||
|
|
d058e30917 | ||
|
|
159e5c1048 | ||
|
|
9689796c10 | ||
|
|
9ba2cfd33e | ||
|
|
c2b8066efb | ||
|
|
9ca1b2a775 | ||
|
|
2cc1cbf2f4 | ||
|
|
15abb2b56e | ||
|
|
e78712791d | ||
|
|
b112d09013 | ||
|
|
666cb6c802 | ||
|
|
b2934d2612 | ||
|
|
0c0cbb43da | ||
|
|
64e6ddc7f7 | ||
|
|
a8e25fdbf8 | ||
|
|
2d96fdd54f | ||
|
|
74a696d53b | ||
|
|
4d6f808c16 | ||
|
|
e3d25e78eb | ||
|
|
b01336814d | ||
|
|
34e5d3a87d | ||
|
|
9fcfe52d03 | ||
|
|
e36c04ef48 | ||
|
|
c7aa8ba0ee | ||
|
|
3306b3aa60 | ||
|
|
bd00fe81cc | ||
|
|
6b1fbafdf0 | ||
|
|
de65a2243f | ||
|
|
3fd7d819b8 | ||
|
|
69b48f83df | ||
|
|
cdf9178c43 | ||
|
|
924ff6164e | ||
|
|
a769d873f8 | ||
|
|
23c124ec75 | ||
|
|
c4e11c8ef3 | ||
|
|
418da85f15 | ||
|
|
775b4b54d8 | ||
|
|
c562d44321 | ||
|
|
ad12da4908 | ||
|
|
bad5d0d6c5 | ||
|
|
e405ff59f9 | ||
|
|
256ec5bebb | ||
|
|
3a7b0027f3 | ||
|
|
9b3c26d4f4 | ||
|
|
95d2908814 | ||
|
|
ce06677069 | ||
|
|
ecad9a470f | ||
|
|
f67a3cc9bd | ||
|
|
c9fd093127 | ||
|
|
2cca43b3ab | ||
|
|
e5beb4e828 | ||
|
|
afc22828ea | ||
|
|
51cdd3dc50 | ||
|
|
0da10134f2 | ||
|
|
649027b963 | ||
|
|
4ef9f536ba | ||
|
|
4d08b9dac0 | ||
|
|
0db20a7cb1 | ||
|
|
c1504b81d3 | ||
|
|
2f606dc5e8 | ||
|
|
04cc2f6473 | ||
|
|
3bcab31749 | ||
|
|
b47cff48de | ||
|
|
a797421e98 | ||
|
|
2689917b17 | ||
|
|
5cf54f6073 | ||
|
|
62700f76cb | ||
|
|
b5338c0b7d | ||
|
|
0fdceb6cd5 | ||
|
|
5ca02ca494 | ||
|
|
af07b76ccf | ||
|
|
390f64701d | ||
|
|
7991a88675 | ||
|
|
aa3fceeaad | ||
|
|
8b1559b9f4 | ||
|
|
55b880070c | ||
|
|
703be4f77e | ||
|
|
27a743b82b | ||
|
|
bdf7393ddb | ||
|
|
2693e52113 | ||
|
|
4e68b2c52b | ||
|
|
54840f9c8f | ||
|
|
f269cdcd4f | ||
|
|
f76a6cd023 | ||
|
|
6b18d956de | ||
|
|
e46d589624 | ||
|
|
0496f5407f | ||
|
|
3a25a56a92 | ||
|
|
0525574913 | ||
|
|
73cabfedf5 | ||
|
|
12107d619b | ||
|
|
f7f4fd4706 | ||
|
|
e8b7698f5e | ||
|
|
2aae60461c | ||
|
|
f8c514ba6b | ||
|
|
8dc4f4dc9e | ||
|
|
5f8380d33e | ||
|
|
89637c6b41 | ||
|
|
4b38feabe7 | ||
|
|
a29264eb8c | ||
|
|
4903f044d3 | ||
|
|
ce64b82ebb | ||
|
|
d02f953faf | ||
|
|
d0b7eed0c9 | ||
|
|
c71b773a62 | ||
|
|
e3cc15daf2 | ||
|
|
2a1ad88538 | ||
|
|
3f4340a796 | ||
|
|
08089f014c | ||
|
|
751d19f698 | ||
|
|
604827b694 | ||
|
|
cfee5116dd | ||
|
|
0c4f11ecaa | ||
|
|
2fddc4a7f1 | ||
|
|
de66e80d75 | ||
|
|
fda0a8b735 | ||
|
|
cd1869bcf2 | ||
|
|
3eecee16d1 | ||
|
|
4d6100569b | ||
|
|
b255b97e43 | ||
|
|
b1301a0686 | ||
|
|
660250f4da | ||
|
|
81c2a4b9ba | ||
|
|
db287b2303 | ||
|
|
b3bd379198 | ||
|
|
cda87977a5 | ||
|
|
b4c5f20c46 | ||
|
|
fa3615f14e | ||
|
|
3fbbcf7f93 | ||
|
|
1bdc290017 | ||
|
|
18b6de7a91 | ||
|
|
14c422a32f | ||
|
|
6a854e2740 | ||
|
|
b4fa2ba295 | ||
|
|
0f8cf3b849 | ||
|
|
27d6814351 | ||
|
|
64447030bb | ||
|
|
073ac50374 | ||
|
|
98bcc0bd43 | ||
|
|
135265ef69 | ||
|
|
ec6ac50812 | ||
|
|
1b797f7ad3 | ||
|
|
a6c67a088a | ||
|
|
51a7e35c24 | ||
|
|
509f5097ab | ||
|
|
887fabe78f | ||
|
|
4a39d33ee5 | ||
|
|
f19dfac830 | ||
|
|
648be8600f | ||
|
|
c4d7cfa536 | ||
|
|
78970d5338 | ||
|
|
5f07a895cc | ||
|
|
aea8c6ddc1 | ||
|
|
81b2533a68 | ||
|
|
3968ffe7b3 | ||
|
|
e05f79c3de | ||
|
|
91f129ebf7 | ||
|
|
c3b910370c | ||
|
|
ee0e6963f3 | ||
|
|
9997767dc3 | ||
|
|
3704947696 | ||
|
|
585c9f3c4b | ||
|
|
d027bc2add | ||
|
|
95c4564f93 | ||
|
|
9c5717d0de | ||
|
|
77cbf8a657 | ||
|
|
dc7e53690f | ||
|
|
46bb35a853 | ||
|
|
1c845d2950 | ||
|
|
5416deec66 | ||
|
|
6a8ae7cf8d | ||
|
|
60b1829e1c | ||
|
|
1e0c4386ab | ||
|
|
2dee44c74c | ||
|
|
8dcfec9789 | ||
|
|
6d2d0bbda7 | ||
|
|
05849a242a | ||
|
|
60912e66c8 | ||
|
|
ece7d223e8 | ||
|
|
5269c4cacb | ||
|
|
49d1cdc393 | ||
|
|
d51b8f915f | ||
|
|
872e43d6e5 | ||
|
|
fff1cab367 | ||
|
|
c4ae856912 | ||
|
|
464c1639ae | ||
|
|
0954ea8d6d | ||
|
|
ef09bc0645 | ||
|
|
e347b2ded6 | ||
|
|
8a1713e39c | ||
|
|
9f49ebb5ba | ||
|
|
d74fbfb38f | ||
|
|
89dd7fb328 | ||
|
|
777929b1ae | ||
|
|
b8e0351978 | ||
|
|
1b22e9dc2e | ||
|
|
d40a852919 | ||
|
|
99549ce79c | ||
|
|
b39c70b4a7 | ||
|
|
1a06fae543 | ||
|
|
ca870dfee7 | ||
|
|
abad134681 | ||
|
|
b966a8b5fa | ||
|
|
87d56a3d07 | ||
|
|
5c957b502e | ||
|
|
561f1afe6e | ||
|
|
622dc2a611 | ||
|
|
c0c0871911 | ||
|
|
36c53036e7 | ||
|
|
20a608d9da | ||
|
|
4c0e50c88a | ||
|
|
f50df1d0e3 | ||
|
|
a581e64199 | ||
|
|
1967950dc3 | ||
|
|
d9dfac90bf | ||
|
|
a0b9554f94 | ||
|
|
7b392c7154 | ||
|
|
e7166ea9be | ||
|
|
e67096dbbb | ||
|
|
09ef61e3ca | ||
|
|
bf3e2dce7b | ||
|
|
36301bd615 | ||
|
|
c0203c0ceb | ||
|
|
f639b64dca | ||
|
|
8cfaea656c | ||
|
|
53a702c020 | ||
|
|
6aac86ec29 | ||
|
|
cda7dcf4ca | ||
|
|
6afcd6c86a | ||
|
|
e969966468 | ||
|
|
9fa347997a | ||
|
|
f7b8322b14 | ||
|
|
dd36541f2c | ||
|
|
f3c4e2f5bf | ||
|
|
366b1640d0 | ||
|
|
5d1fd66faf | ||
|
|
793a8bd886 | ||
|
|
9b7f13cb1b | ||
|
|
464742bd2a | ||
|
|
32c5b8efd6 | ||
|
|
618d97962a | ||
|
|
7dc6b04f45 | ||
|
|
ce330ad8aa | ||
|
|
ca543ff01c | ||
|
|
9719621e07 | ||
|
|
e433c23b96 | ||
|
|
0beccc51f1 | ||
|
|
35a28fac51 | ||
|
|
f05d74feb8 | ||
|
|
da41afeb48 | ||
|
|
bc4bb7882b | ||
|
|
f4a41fe750 | ||
|
|
28ddfbb892 | ||
|
|
8bba2df2eb | ||
|
|
b74b325aea | ||
|
|
eb03f16442 | ||
|
|
dd17659b86 | ||
|
|
76c9b58431 | ||
|
|
7cdf520319 | ||
|
|
6e23f2bceb | ||
|
|
6f950e83eb | ||
|
|
8c53c346d4 | ||
|
|
d9e2f80375 | ||
|
|
42e576ace2 | ||
|
|
e642375764 | ||
|
|
60b68f19f0 | ||
|
|
4bebcb84ad | ||
|
|
66411ee62e | ||
|
|
d2923ec1e5 | ||
|
|
a93832f414 | ||
|
|
d9a05807d2 | ||
|
|
9c7cb2cdcd | ||
|
|
341ff7119f | ||
|
|
a87ee7c57b | ||
|
|
75b83ec2fd | ||
|
|
744c4a5592 | ||
|
|
ba6561d3cc | ||
|
|
948ad747d7 | ||
|
|
cdc33251d2 | ||
|
|
27120d4412 | ||
|
|
4ca3468e78 | ||
|
|
feeb35e438 | ||
|
|
670041b60e | ||
|
|
46d286574b | ||
|
|
e0102f81aa | ||
|
|
ef3140e544 | ||
|
|
d6f70f0ee3 | ||
|
|
5c93a31804 | ||
|
|
ef8632c9dc | ||
|
|
ddad991c18 | ||
|
|
5b12d08e1f | ||
|
|
ee8b5de5a0 | ||
|
|
6da475367a | ||
|
|
1f8fc0fb56 | ||
|
|
867c29caf0 | ||
|
|
eb5d4bcd4f | ||
|
|
eb13003f6c | ||
|
|
d719b46222 | ||
|
|
f5951cc81b | ||
|
|
0fb640c717 | ||
|
|
1517fdb36c | ||
|
|
1dbef2e27a | ||
|
|
bc2b500d3e | ||
|
|
6d066dc421 | ||
|
|
2e83082605 | ||
|
|
df135ffa7a | ||
|
|
53e2c9158d | ||
|
|
183cd048f1 | ||
|
|
0c8ad36d92 | ||
|
|
98f4ce9363 | ||
|
|
7fba8bda4c | ||
|
|
8be63ce0e2 | ||
|
|
b9d3dbc84e | ||
|
|
960e5cde02 | ||
|
|
ba70478a21 | ||
|
|
8e5d080d54 | ||
|
|
f0e67d1a56 | ||
|
|
411f4b1b6f | ||
|
|
760ff21bf3 | ||
|
|
53cc72ef86 | ||
|
|
17e9fc9bfe | ||
|
|
8e45583006 | ||
|
|
29ee3e3c49 | ||
|
|
c398198c0a | ||
|
|
9b16d4c999 | ||
|
|
177f87cf05 | ||
|
|
247ce052cd | ||
|
|
b224e74267 | ||
|
|
bab0b99f37 | ||
|
|
549a30d2cd | ||
|
|
648b756f35 | ||
|
|
c082c92b7e | ||
|
|
18f7e26257 | ||
|
|
c7b2c698d0 | ||
|
|
fab5ce347c | ||
|
|
cf60f26da6 | ||
|
|
61e9b7354f | ||
|
|
29333550d2 | ||
|
|
e80ea04c79 | ||
|
|
dfcb11d7d1 | ||
|
|
53a08fd07d | ||
|
|
868930e079 | ||
|
|
21a05b0418 | ||
|
|
c564924d31 | ||
|
|
008fb28eaf | ||
|
|
bbfa1b6419 | ||
|
|
eac8166bd4 | ||
|
|
9450e23b32 | ||
|
|
ff8a6b1232 | ||
|
|
cc10515056 | ||
|
|
e9873d9853 | ||
|
|
330a7b62c3 | ||
|
|
1d4eead995 | ||
|
|
015a80ef7b | ||
|
|
9eaf551c86 | ||
|
|
593a4d8fe9 | ||
|
|
bd7e5c1548 | ||
|
|
c836ad1c7e | ||
|
|
1623ef10c9 | ||
|
|
513582814b | ||
|
|
61e59db99d | ||
|
|
cf3ef36323 | ||
|
|
708973c9bd | ||
|
|
3b91ed112f | ||
|
|
5432d6f982 | ||
|
|
e79754dee3 | ||
|
|
89a5bd6750 | ||
|
|
3917350531 | ||
|
|
eb1373e509 | ||
|
|
f0519f4837 | ||
|
|
26fdebc63b | ||
|
|
01c1afa79f | ||
|
|
ee25eb0eae | ||
|
|
981c58705a | ||
|
|
7e5cf2aa19 | ||
|
|
9814be4bc2 | ||
|
|
db7c0badd4 | ||
|
|
185304a61e | ||
|
|
80c8d84af3 | ||
|
|
7a0adb4cd2 | ||
|
|
714d825b62 | ||
|
|
044dd30440 | ||
|
|
fd521a22f7 | ||
|
|
8a8aa67844 | ||
|
|
9ea0949f43 | ||
|
|
21d7878690 | ||
|
|
dcaf4da8a6 | ||
|
|
9ffc6ca62f | ||
|
|
6988d070ea | ||
|
|
4df993d89d | ||
|
|
75ad2b301a | ||
|
|
0b56ba51d0 | ||
|
|
25271feeb0 | ||
|
|
8faf5f979c | ||
|
|
dd9cf23457 | ||
|
|
acda2563ce | ||
|
|
a15bffd105 | ||
|
|
570a273807 | ||
|
|
6fc0ae638a | ||
|
|
1d7f8eb693 | ||
|
|
74c95fb3fb | ||
|
|
3446e3b749 | ||
|
|
69a2e4ece2 | ||
|
|
3f89b630b4 | ||
|
|
15e9aa1706 | ||
|
|
8dfa428ccd | ||
|
|
15404bda13 | ||
|
|
2cd0d8b711 | ||
|
|
ec43a11581 | ||
|
|
d9ca5d9637 | ||
|
|
0e21d8066b | ||
|
|
aa9742d80d | ||
|
|
163bb87897 | ||
|
|
5b5130c4ff | ||
|
|
536b3ca1e1 | ||
|
|
543141ae3b | ||
|
|
f39cabe610 | ||
|
|
bf0f53270f | ||
|
|
368958b3e4 | ||
|
|
dd227c2b23 | ||
|
|
62938bf088 | ||
|
|
4b1afc829c | ||
|
|
2b7e5468c9 | ||
|
|
df16579642 | ||
|
|
2fcf1259c6 | ||
|
|
a3d3f76827 | ||
|
|
f65ae82c55 | ||
|
|
a15c1990eb | ||
|
|
721a189742 | ||
|
|
737ee0661c | ||
|
|
c44efbbbb1 | ||
|
|
80a851b4dd | ||
|
|
d636467937 | ||
|
|
6f912f7c04 | ||
|
|
71efe9d8fd | ||
|
|
e56fe7e5e7 | ||
|
|
42d53f3bc0 | ||
|
|
f67d599a01 | ||
|
|
8da8756312 | ||
|
|
21ac79e94b | ||
|
|
2e3d68ed1b | ||
|
|
f81b7df618 | ||
|
|
cad2598fcb | ||
|
|
8c75dbc498 | ||
|
|
cf649f59cb | ||
|
|
8ba6d622e5 | ||
|
|
f9226f9bf3 | ||
|
|
fb8486f3bd | ||
|
|
280e9cb28d | ||
|
|
e7e96fe2e0 | ||
|
|
6af7753e36 | ||
|
|
6af22d0d3e | ||
|
|
a22f181736 | ||
|
|
e00c2f335c | ||
|
|
db894fa6aa | ||
|
|
3f960255f4 | ||
|
|
5d07438cb3 | ||
|
|
d2274b01cb | ||
|
|
f1b2afc9d9 | ||
|
|
b28c2e20ca | ||
|
|
e0ca519a8b | ||
|
|
6477bb724e | ||
|
|
50b38322b9 | ||
|
|
cc9893eb44 | ||
|
|
2c7909697a | ||
|
|
814966ad33 | ||
|
|
43d0f2abc5 | ||
|
|
0ab1af7d3e | ||
|
|
4f19bb7af6 | ||
|
|
60aff0bd30 | ||
|
|
fbf655afbd | ||
|
|
a4accc0e3e | ||
|
|
aaaef22db6 | ||
|
|
8e993b427c | ||
|
|
3500262b7d | ||
|
|
fd92b91188 | ||
|
|
04379bcb1d | ||
|
|
bd75f9e613 | ||
|
|
1ee1f79e27 | ||
|
|
ef42f49470 | ||
|
|
b2782c6dc5 | ||
|
|
51d487786c | ||
|
|
d9cd2876d9 | ||
|
|
13edec75a3 | ||
|
|
07340553a5 | ||
|
|
291e3f0762 | ||
|
|
ad9c552b12 | ||
|
|
15837bab8c | ||
|
|
6a9efa2d3e | ||
|
|
dcaed51ba0 | ||
|
|
1bdffee820 | ||
|
|
125ee6a68e | ||
|
|
69fbe3a9ad | ||
|
|
69058f35f8 | ||
|
|
14c72cc582 | ||
|
|
9ad3413190 | ||
|
|
7e49e8e797 | ||
|
|
28f2959b83 | ||
|
|
f1ad170a15 | ||
|
|
add4f43f0e | ||
|
|
ef7e5e0d69 | ||
|
|
4f1b24d974 | ||
|
|
63e08cbef7 | ||
|
|
b655f2d632 | ||
|
|
f7cb79431f | ||
|
|
8dd523a216 | ||
|
|
8c653c163a | ||
|
|
b8215c0817 | ||
|
|
47007455dc | ||
|
|
5b5483dc8e | ||
|
|
7f1247004e | ||
|
|
c75287dc85 | ||
|
|
eb02876e74 | ||
|
|
5df97b339e | ||
|
|
b36f4ac708 | ||
|
|
ec1b7b933d | ||
|
|
5146d9f8ac | ||
|
|
a46bbdda2e | ||
|
|
f346bd6ee6 | ||
|
|
2cb8950cc2 | ||
|
|
fc777296bf | ||
|
|
486fc0424a | ||
|
|
80a5ae4f53 | ||
|
|
49a0c166f3 | ||
|
|
d0279242ce | ||
|
|
b351ec8baf | ||
|
|
21f287915c | ||
|
|
574f7bc3d4 | ||
|
|
98c2cd4311 | ||
|
|
41c1d0291c | ||
|
|
3401f553b9 | ||
|
|
f98d8f6c15 | ||
|
|
4568618030 | ||
|
|
71e84e2c36 | ||
|
|
1516132167 | ||
|
|
826122fa8e | ||
|
|
e55e93a1e3 | ||
|
|
699ab98f9d | ||
|
|
62e9e1fecd | ||
|
|
9a0dac124e | ||
|
|
053b966134 | ||
|
|
ad08aa3956 | ||
|
|
ba0751a915 | ||
|
|
2d42423953 | ||
|
|
3a79f35fdc | ||
|
|
ff6b309c6f | ||
|
|
b0ff9ee688 | ||
|
|
6a03b43e5f | ||
|
|
a49aaf9ab0 | ||
|
|
12bbeaa45e | ||
|
|
8e39a27b76 | ||
|
|
4f1335cd4c | ||
|
|
49b2cbf763 | ||
|
|
81fb61f97c | ||
|
|
782b84c6d5 | ||
|
|
66b698c3cf | ||
|
|
db890956ec | ||
|
|
a7c444b939 | ||
|
|
a43a3798d3 | ||
|
|
3b14d7b84b | ||
|
|
372144508c | ||
|
|
183a34a5cf | ||
|
|
995ecffbb2 | ||
|
|
e7f23e164b | ||
|
|
c36ce04dd3 | ||
|
|
650e073f7a | ||
|
|
2edf296a92 | ||
|
|
a2c461d58a | ||
|
|
2ece3ea699 |
No files matched your search
+2
-2
@@ -24,7 +24,7 @@ environment:
|
||||
PHP_BUILD_CACHE_BASE_DIR: c:\build-cache
|
||||
PHP_BUILD_OBJ_DIR: c:\obj
|
||||
PHP_BUILD_CACHE_SDK_DIR: c:\build-cache\sdk
|
||||
PHP_BUILD_SDK_BRANCH: php-sdk-2.0.0beta1
|
||||
PHP_BUILD_SDK_BRANCH: php-sdk-2.0.9
|
||||
# ext and env setup for tests
|
||||
#MYSQL_TEST_PASSWD: Password12!
|
||||
#MYSQL_TEST_USER: root
|
||||
@@ -43,7 +43,7 @@ environment:
|
||||
services:
|
||||
# the setup scripts have to be touched, once some other db version is used
|
||||
- mysql
|
||||
- postgresql95
|
||||
- postgresql96
|
||||
|
||||
platform:
|
||||
- x64
|
||||
|
||||
@@ -29,22 +29,33 @@ document ____executor_globals
|
||||
end
|
||||
|
||||
define print_cvs
|
||||
____executor_globals
|
||||
set $p = $eg.current_execute_data.CVs
|
||||
set $c = $eg.current_execute_data.op_array.last_var
|
||||
set $v = $eg.current_execute_data.op_array.vars
|
||||
set $i = 0
|
||||
|
||||
printf "Compiled variables count: %d\n", $c
|
||||
while $i < $c
|
||||
printf "%d = %s\n", $i, $v[$i].name
|
||||
if $p[$i] != 0
|
||||
printzv *$p[$i]
|
||||
else
|
||||
printf "*uninitialized*\n"
|
||||
end
|
||||
set $i = $i + 1
|
||||
if $argc == 0
|
||||
____executor_globals
|
||||
set $cv_ex_ptr = $eg.current_execute_data
|
||||
else
|
||||
set $cv_ex_ptr = (zend_execute_data *)$arg0
|
||||
end
|
||||
set $cv_count = $cv_ex_ptr.func.op_array.last_var
|
||||
set $cv = $cv_ex_ptr.func.op_array.vars
|
||||
set $cv_idx = 0
|
||||
set $callFrameSize = (sizeof(zend_execute_data) + sizeof(zval) - 1) / sizeof(zval)
|
||||
|
||||
printf "Compiled variables count: %d\n\n", $cv_count
|
||||
while $cv_idx < $cv_count
|
||||
printf "[%d] '%s'\n", $cv_idx, $cv[$cv_idx].val
|
||||
set $zvalue = ((zval *) $cv_ex_ptr) + $callFrameSize + $cv_idx
|
||||
printzv $zvalue
|
||||
set $cv_idx = $cv_idx + 1
|
||||
end
|
||||
end
|
||||
|
||||
document print_cvs
|
||||
Prints the compiled variables and their values.
|
||||
If a zend_execute_data pointer is set this will print the compiled
|
||||
variables of that scope. If no parameter is used it will use
|
||||
current_execute_data for scope.
|
||||
|
||||
usage: print_cvs [zend_execute_data *]
|
||||
end
|
||||
|
||||
define dump_bt
|
||||
@@ -196,12 +207,17 @@ define ____printzv_contents
|
||||
____executor_globals
|
||||
set $handle = $zvalue->value.obj.handle
|
||||
set $handlers = $zvalue->value.obj.handlers
|
||||
set $zobj = $zvalue->value.obj
|
||||
set $cname = $zobj->ce->name->val
|
||||
set $zobj = $zvalue->value.obj
|
||||
set $cname = $zobj->ce->name->val
|
||||
printf "(%s) #%d", $cname, $handle
|
||||
if ! $arg1
|
||||
if $handlers->get_properties == &zend_std_get_properties
|
||||
set $ht = $zobj->properties
|
||||
if $zobj->properties
|
||||
set $ht = $zobj->properties
|
||||
else
|
||||
set $ht = &$zobj->ce->properties_info
|
||||
end
|
||||
printf "\nProperties "
|
||||
if $ht
|
||||
set $ind = $ind + 1
|
||||
____print_ht $ht 1
|
||||
@@ -212,7 +228,7 @@ define ____printzv_contents
|
||||
set $i = $i - 1
|
||||
end
|
||||
else
|
||||
echo "no properties found"
|
||||
echo "not found"
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -455,9 +471,9 @@ define print_inh
|
||||
end
|
||||
|
||||
define print_pi
|
||||
set $pi = $arg0
|
||||
set $pi = (zend_property_info *)$arg0
|
||||
printf "[%p] {\n", $pi
|
||||
printf " h = %lu\n", $pi->h
|
||||
printf " ce = [%p] %s\n", $pi->ce, $pi->ce->name->val
|
||||
printf " flags = %d (", $pi->flags
|
||||
if $pi->flags & 0x100
|
||||
printf "ZEND_ACC_PUBLIC"
|
||||
@@ -476,16 +492,27 @@ define print_pi
|
||||
end
|
||||
printf ")\n"
|
||||
printf " name = "
|
||||
____print_str $pi->name $pi->name_length
|
||||
printf "\n}\n"
|
||||
print_zstr $pi->name
|
||||
printf "}\n"
|
||||
end
|
||||
|
||||
document print_pi
|
||||
Takes a pointer to an object's property and prints the property information
|
||||
usage: print_pi <ptr>
|
||||
end
|
||||
|
||||
define ____print_str
|
||||
set $tmp = 0
|
||||
set $str = $arg0
|
||||
if $argc > 2
|
||||
set $maxlen = $arg2
|
||||
else
|
||||
set $maxlen = 256
|
||||
end
|
||||
|
||||
printf "\""
|
||||
while $tmp < $arg1 && $tmp < 256
|
||||
if $str[$tmp] > 32 && $str[$tmp] < 127
|
||||
while $tmp < $arg1 && $tmp < $maxlen
|
||||
if $str[$tmp] > 31 && $str[$tmp] < 127
|
||||
printf "%c", $str[$tmp]
|
||||
else
|
||||
printf "\\%o", $str[$tmp]
|
||||
@@ -554,6 +581,23 @@ document printzops
|
||||
dump operands of the current opline
|
||||
end
|
||||
|
||||
define print_zstr
|
||||
set $zstr = (zend_string *)$arg0
|
||||
if $argc == 2
|
||||
set $maxlen = $arg1
|
||||
else
|
||||
set $maxlen = $zstr->len
|
||||
end
|
||||
printf "string(%d) ", $zstr->len
|
||||
____print_str $zstr->val $zstr->len $maxlen
|
||||
printf "\n"
|
||||
end
|
||||
|
||||
document print_zstr
|
||||
print the length and contents of a zend string
|
||||
usage: print_zstr <ptr> [max length]
|
||||
end
|
||||
|
||||
define zbacktrace
|
||||
____executor_globals
|
||||
dump_bt $eg.current_execute_data
|
||||
@@ -566,79 +610,6 @@ document zbacktrace
|
||||
> (gdb) dump_bt $eg.current_execute_data
|
||||
end
|
||||
|
||||
define zmemcheck
|
||||
set $p = alloc_globals.head
|
||||
set $stat = "?"
|
||||
set $total_size = 0
|
||||
if $arg0 != 0
|
||||
set $not_found = 1
|
||||
else
|
||||
set $not_found = 0
|
||||
end
|
||||
printf " block size status file:line\n"
|
||||
printf "-------------------------------------------------------------------------------\n"
|
||||
while $p
|
||||
set $aptr = $p + sizeof(struct _zend_mem_header) + sizeof(align_test)
|
||||
if $arg0 == 0 || (void *)$aptr == (void *)$arg0
|
||||
if $p->magic == 0x7312f8dc
|
||||
set $stat = "OK"
|
||||
end
|
||||
if $p->magic == 0x99954317
|
||||
set $stat = "FREED"
|
||||
end
|
||||
if $p->magic == 0xfb8277dc
|
||||
set $stat = "CACHED"
|
||||
end
|
||||
set $filename = strrchr($p->filename->val, '/')
|
||||
if !$filename
|
||||
set $filename = $p->filename->val
|
||||
else
|
||||
set $filename = $filename + 1
|
||||
end
|
||||
printf " %p ", $aptr
|
||||
if $p->size == sizeof(struct _zval_struct) && ((struct _zval_struct *)$aptr)->type >= 0 && ((struct _zval_struct *)$aptr)->type < 10
|
||||
printf "ZVAL?(%-2d) ", $p->size
|
||||
else
|
||||
printf "%-9d ", $p->size
|
||||
end
|
||||
set $total_size = $total_size + $p->size
|
||||
printf "%-06s %s:%d", $stat, $filename, $p->lineno
|
||||
if $p->orig_filename
|
||||
set $orig_filename = strrchr($p->orig_filename, '/')
|
||||
if !$orig_filename
|
||||
set $orig_filename = $p->orig_filename
|
||||
else
|
||||
set $orig_filename = $orig_filename + 1
|
||||
end
|
||||
printf " <= %s:%d\n", $orig_filename, $p->orig_lineno
|
||||
else
|
||||
printf "\n"
|
||||
end
|
||||
if $arg0 != 0
|
||||
set $p = 0
|
||||
set $not_found = 0
|
||||
else
|
||||
set $p = $p->pNext
|
||||
end
|
||||
else
|
||||
set $p = $p->pNext
|
||||
end
|
||||
end
|
||||
if $not_found
|
||||
printf "no such block that begins at %p.\n", $aptr
|
||||
end
|
||||
if $arg0 == 0
|
||||
printf "-------------------------------------------------------------------------------\n"
|
||||
printf " total: %d bytes\n", $total_size
|
||||
end
|
||||
end
|
||||
|
||||
document zmemcheck
|
||||
show status of a memory block.
|
||||
usage: zmemcheck [ptr].
|
||||
if ptr is 0, all blocks will be listed.
|
||||
end
|
||||
|
||||
define lookup_root
|
||||
set $found = 0
|
||||
if gc_globals->roots
|
||||
|
||||
+1
-1
@@ -286,7 +286,7 @@ MAINTENANCE: Odd fixes
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: gd
|
||||
PRIMARY MAINTAINER: Pierre-Alain Joye <pajoye@php.net>
|
||||
PRIMARY MAINTAINER: Pierre-Alain Joye <pajoye@php.net>, Christoph M. Becker <cmb@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
+1
-1
@@ -53,7 +53,7 @@ install-headers:
|
||||
paths="$$paths $(INSTALL_ROOT)$(phpincludedir)/$$i"; \
|
||||
done; \
|
||||
$(mkinstalldirs) $$paths && \
|
||||
echo "Installing header files: $(INSTALL_ROOT)$(phpincludedir)/" && \
|
||||
echo "Installing header files: $(INSTALL_ROOT)$(phpincludedir)/" && \
|
||||
for i in `echo $(INSTALL_HEADERS)`; do \
|
||||
if test "$(PHP_PECL_EXTENSION)"; then \
|
||||
src=`echo $$i | $(SED) -e "s#ext/$(PHP_PECL_EXTENSION)/##g"`; \
|
||||
|
||||
@@ -1,8 +1,483 @@
|
||||
PHP NEWS
|
||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||
?? ??? 2017 PHP 7.0.16
|
||||
31 Aug 2017 PHP 7.0.23
|
||||
|
||||
- Core:
|
||||
. Fixed bug #74947 (Segfault in scanner on INF number). (Laruence)
|
||||
. Fixed bug #74954 (null deref and segfault in zend_generator_resume()). (Bob)
|
||||
. Fixed bug #74725 (html_errors=1 breaks unhandled exceptions). (Andrea)
|
||||
|
||||
- cURL:
|
||||
. Fixed bug #74125 (Fixed finding CURL on systems with multiarch support).
|
||||
(cebe)
|
||||
|
||||
- Date:
|
||||
. Fixed bug #75002 (Null Pointer Dereference in timelib_time_clone). (Derick)
|
||||
|
||||
- Intl:
|
||||
. Fixed bug #74993 (Wrong reflection on some locale_* functions). (Sara)
|
||||
|
||||
- Mbstring:
|
||||
. Fixed bug #71606 (Segmentation fault mb_strcut with HTML-ENTITIES encoding).
|
||||
(cmb)
|
||||
. Fixed bug #62934 (mb_convert_kana() does not convert iteration marks).
|
||||
(Nikita)
|
||||
. Fixed bug #75001 (Wrong reflection on mb_eregi_replace). (Fabien
|
||||
Villepinte)
|
||||
|
||||
- MySQLi:
|
||||
. Fixed bug #74968 (PHP crashes when calling mysqli_result::fetch_object with
|
||||
an abstract class). (Anatol)
|
||||
|
||||
- OCI8:
|
||||
. Expose oci_unregister_taf_callback() (Tianfang Yang)
|
||||
|
||||
- phar:
|
||||
. Fixed bug #74991 (include_path has a 4096 char limit in some cases).
|
||||
(bwbroersma)
|
||||
|
||||
- Reflection:
|
||||
. Fixed bug #74949 (null pointer dereference in _function_string). (Laruence)
|
||||
|
||||
- Session:
|
||||
. Fixed bug #74833 (SID constant created with wrong module number). (Anatol)
|
||||
|
||||
- SimpleXML:
|
||||
. Fixed bug #74950 (nullpointer deref in simplexml_element_getDocNamespaces).
|
||||
(Laruence)
|
||||
|
||||
- SPL:
|
||||
. Fixed bug #75049 (spl_autoload_unregister can't handle
|
||||
spl_autoload_functions results). (Laruence)
|
||||
. Fixed bug #74669 (Unserialize ArrayIterator broken). (Andrew Nester)
|
||||
. Fixed bug #75015 (Crash in recursive iterator destructors). (Julien)
|
||||
|
||||
- Standard:
|
||||
. Fixed bug #75075 (unpack with X* causes infinity loop). (Laruence)
|
||||
. Fixed bug #74103 (heap-use-after-free when unserializing invalid array
|
||||
size). (Nikita)
|
||||
. Fixed bug #75054 (A Denial of Service Vulnerability was found when
|
||||
performing deserialization). (Nikita)
|
||||
|
||||
- WDDX:
|
||||
. Fixed bug #73793 (WDDX uses wrong decimal seperator). (cmb)
|
||||
|
||||
- XMLRPC:
|
||||
. Fixed bug #74975 (Incorrect xmlrpc serialization for classes with declared
|
||||
properties). (blar)
|
||||
|
||||
03 Aug 2017 PHP 7.0.22
|
||||
|
||||
- Core:
|
||||
. Fixed bug #74832 (Loading PHP extension with already registered function
|
||||
name leads to a crash). (jpauli)
|
||||
. Fixed bug #74780 (parse_url() borken when query string contains colon).
|
||||
(jhdxr)
|
||||
. Fixed bug #74761 (Unary operator expected error on some systems). (petk)
|
||||
. Fixed bug #73900 (Use After Free in unserialize() SplFixedArray). (nikic)
|
||||
. Fixed bug #74913 (fixed incorrect poll.h include). (petk)
|
||||
. Fixed bug #74906 (fixed incorrect errno.h include). (petk)
|
||||
|
||||
- Date:
|
||||
. Fixed bug #74852 (property_exists returns true on unknown DateInterval
|
||||
property). (jhdxr)
|
||||
|
||||
- OCI8:
|
||||
. Fixed bug #74625 (Integer overflow in oci_bind_array_by_name). (Ingmar Runge)
|
||||
|
||||
- Opcache:
|
||||
. Fixed bug #74840 (Opcache overwrites argument of GENERATOR_RETURN within
|
||||
finally). (Bob)
|
||||
|
||||
- PDO:
|
||||
. Fixed bug #69356 (PDOStatement::debugDumpParams() truncates query). (Adam
|
||||
Baratz)
|
||||
|
||||
- SPL:
|
||||
. Fixed bug #73471 (PHP freezes with AppendIterator). (jhdxr)
|
||||
|
||||
- SQLite3:
|
||||
. Fixed bug #74883 (SQLite3::__construct() produces "out of memory" exception
|
||||
with invalid flags). (Anatol)
|
||||
|
||||
- Wddx:
|
||||
. Fixed bug #73173 (huge memleak when wddx_unserialize).
|
||||
(tloi at fortinet dot com)
|
||||
|
||||
- zlib:
|
||||
. Fixed bug #73944 (dictionary option of inflate_init() does not work).
|
||||
(wapmorgan)
|
||||
|
||||
06 Jul 2017 PHP 7.0.21
|
||||
|
||||
- Core:
|
||||
. Fixed bug #74738 (Multiple [PATH=] and [HOST=] sections not properly
|
||||
parsed). (Manuel Mausz)
|
||||
. Fixed bug #74658 (Undefined constants in array properties result in broken
|
||||
properties). (Laruence)
|
||||
. Fixed misparsing of abstract unix domain socket names. (Sara)
|
||||
. Fixed bug #74101, bug #74614 (Unserialize Heap Use-After-Free (READ: 1) in
|
||||
zval_get_type). (Nikita)
|
||||
. Fixed bug #74111 (Heap buffer overread (READ: 1) finish_nested_data from
|
||||
unserialize). (Nikita)
|
||||
. Fixed bug #74603 (PHP INI Parsing Stack Buffer Overflow Vulnerability).
|
||||
(Stas)
|
||||
. Fixed bug #74819 (wddx_deserialize() heap out-of-bound read via
|
||||
php_parse_date()). (Derick)
|
||||
|
||||
- DOM:
|
||||
. Fixed bug #69373 (References to deleted XPath query results). (ttoohey)
|
||||
|
||||
- GD:
|
||||
. Fixed bug #74435 (Buffer over-read into uninitialized memory). (cmb)
|
||||
|
||||
- Intl:
|
||||
. Fixed bug #73473 (Stack Buffer Overflow in msgfmt_parse_message). (libnex)
|
||||
. Fixed bug #74705 (Wrong reflection on Collator::getSortKey and
|
||||
collator_get_sort_key). (Tyson Andre, Remi)
|
||||
. Fixed bug #73634 (grapheme_strpos illegal memory access). (Stas)
|
||||
|
||||
- Mbstring:
|
||||
. Add oniguruma upstream fix (CVE-2017-9224, CVE-2017-9226, CVE-2017-9227,
|
||||
CVE-2017-9228, CVE-2017-9229) (Remi, Mamoru TASAKA)
|
||||
|
||||
- OCI8:
|
||||
. Add TAF callback (PR #2459). (KoenigsKind)
|
||||
|
||||
- Opcache:
|
||||
. Fixed bug #74663 (Segfault with opcache.memory_protect and
|
||||
validate_timestamp). (Laruence)
|
||||
|
||||
- OpenSSL:
|
||||
. Fixed bug #74651 (negative-size-param (-1) in memcpy in zif_openssl_seal()).
|
||||
(Stas)
|
||||
|
||||
- PCRE:
|
||||
. Fixed bug #74087 (Segmentation fault in PHP7.1.1(compiled using the bundled PCRE library)).
|
||||
(Stas)
|
||||
|
||||
- PDO_OCI:
|
||||
. Support Instant Client 12.2 in --with-pdo-oci configure option.
|
||||
(Tianfang Yang)
|
||||
|
||||
- Reflection:
|
||||
. Fixed bug #74673 (Segfault when cast Reflection object to string with
|
||||
undefined constant). (Laruence)
|
||||
|
||||
- SPL:
|
||||
. Fixed bug #74478 (null coalescing operator failing with SplFixedArray).
|
||||
(jhdxr)
|
||||
|
||||
- Standard:
|
||||
. Fixed bug #74708 (Invalid Reflection signatures for random_bytes and
|
||||
random_int). (Tyson Andre, Remi)
|
||||
. Fixed bug #73648 (Heap buffer overflow in substr). (Stas)
|
||||
|
||||
- FTP:
|
||||
. Fixed bug #74598 (ftp:// wrapper ignores context arg). (Sara)
|
||||
|
||||
- PHAR:
|
||||
. Fixed bug #74386 (Phar::__construct reflection incorrect). (villfa)
|
||||
|
||||
- SOAP
|
||||
. Fixed bug #74679 (Incorrect conversion array with WSDL_CACHE_MEMORY).
|
||||
(Dmitry)
|
||||
|
||||
- Streams:
|
||||
. Fixed bug #74556 (stream_socket_get_name() returns '\0'). (Sara)
|
||||
|
||||
8 Jun 2017 PHP 7.0.20
|
||||
|
||||
- Core:
|
||||
. Fixed bug #74600 (crash (SIGSEGV) in _zend_hash_add_or_update_i).
|
||||
(Laruence)
|
||||
. Fixed bug #74546 (SIGILL in ZEND_FETCH_CLASS_CONSTANT_SPEC_CONST_CONST).
|
||||
(Laruence)
|
||||
|
||||
- intl:
|
||||
. Fixed bug #74468 (wrong reflection on Collator::sortWithSortKeys). (villfa)
|
||||
|
||||
- MySQLi:
|
||||
. Fixed bug #74547 (mysqli::change_user() doesn't accept null as $database
|
||||
argument w/strict_types). (Anatol)
|
||||
|
||||
- Opcache:
|
||||
. Fixed bug #74596 (SIGSEGV with opcache.revalidate_path enabled). (Laruence)
|
||||
|
||||
- phar:
|
||||
. Fixed bug #51918 (Phar::webPhar() does not handle requests sent through PUT
|
||||
and DELETE method). (Christian Weiske)
|
||||
|
||||
- Standard:
|
||||
. Fixed bug #74510 (win32/sendmail.c anchors CC header but not BCC).
|
||||
(Damian Wadley, Anatol)
|
||||
|
||||
- xmlreader:
|
||||
. Fixed bug #74457 (Wrong reflection on XMLReader::expand). (villfa)
|
||||
|
||||
11 May 2017 PHP 7.0.19
|
||||
|
||||
- Core:
|
||||
. Fixed bug #74188 (Null coalescing operator fails for undeclared static
|
||||
class properties). (tpunt)
|
||||
. Fixed bug #74408 (Endless loop bypassing execution time limit). (Laruence)
|
||||
. Fixed bug #74410 (stream_select() is broken on Windows Nanoserver).
|
||||
(Matt Ficken)
|
||||
. Fixed bug #74337 (php-cgi.exe crash on facebook callback).
|
||||
(Anton Serbulov)
|
||||
. Patch for bug #74216 was reverted. (Anatol)
|
||||
|
||||
- Date:
|
||||
. Fixed bug #74404 (Wrong reflection on DateTimeZone::getTransitions).
|
||||
(krakjoe)
|
||||
. Fixed bug #74080 (add constant for RFC7231 format datetime). (duncan3dc)
|
||||
|
||||
- DOM:
|
||||
. Fixed bug #74416 (Wrong reflection on DOMNode::cloneNode).
|
||||
(Remi, Fabien Villepinte)
|
||||
|
||||
- Fileinfo:
|
||||
. Fixed bug #74379 (syntax error compile error in libmagic/apprentice.c).
|
||||
(Laruence)
|
||||
|
||||
- GD:
|
||||
. Fixed bug #74343 (compile fails on solaris 11 with system gd2 library).
|
||||
(krakjoe)
|
||||
|
||||
- intl:
|
||||
. Fixed bug #74433 (wrong reflection for Normalizer methods). (villfa)
|
||||
. Fixed bug #74439 (wrong reflection for Locale methods). (villfa)
|
||||
|
||||
- MySQLi:
|
||||
. Fixed bug #74432 (mysqli_connect adding ":3306" to $host if $port parameter
|
||||
not given). (Anatol)
|
||||
|
||||
- MySQLnd:
|
||||
. Added support for MySQL 8.0 types. (Johannes)
|
||||
. Fixed bug #74376 (Invalid free of persistent results on error/connection
|
||||
loss). (Yussuf Khalil)
|
||||
|
||||
- OpenSSL:
|
||||
. Fixed bug #73833 (null character not allowed in openssl_pkey_get_private).
|
||||
(Jakub Zelenka)
|
||||
. Fixed bug #73711 (Segfault in openssl_pkey_new when generating DSA or DH
|
||||
key). (Jakub Zelenka)
|
||||
. Fixed bug #74341 (openssl_x509_parse fails to parse ASN.1 UTCTime without
|
||||
seconds). (Moritz Fain)
|
||||
. Added OpenSSL 1.1.0 support. (Jakub Zelenka)
|
||||
|
||||
- phar:
|
||||
. Fixed bug #74383 (phar method parameters reflection correction).
|
||||
(mhagstrand)
|
||||
|
||||
- Standard:
|
||||
. Fixed bug #74409 (Reflection information for ini_get_all() is incomplete).
|
||||
(Sebastian Bergmann)
|
||||
. Fixed bug #72071 (setcookie allows max-age to be negative). (Craig Duncan)
|
||||
|
||||
- Streams:
|
||||
. Fixed bug #74429 (Remote socket URI with unique persistence identifier
|
||||
broken). (Sara)
|
||||
|
||||
- SQLite3:
|
||||
. Fixed bug #74413 (incorrect reflection for SQLite3::enableExceptions).
|
||||
(krakjoe)
|
||||
|
||||
13 Apr 2017 PHP 7.0.18
|
||||
|
||||
- Core:
|
||||
. Fixed bug #73370 (falsely exits with "Out of Memory" when using
|
||||
USE_ZEND_ALLOC=0). (Nikita)
|
||||
. Fixed bug #73960 (Leak with instance method calling static method with
|
||||
referenced return). (Nikita)
|
||||
. Fixed bug #74265 (Build problems after 7.0.17 release: undefined reference
|
||||
to `isfinite'). (Nikita)
|
||||
. Fixed bug #74302 (yield fromLABEL is over-greedy). (Sara)
|
||||
|
||||
- Apache:
|
||||
. Reverted patch for bug #61471, fixes bug #74318. (Anatol)
|
||||
|
||||
- Date:
|
||||
. Fixed bug #72096 (Swatch time value incorrect for dates before 1970). (mcq8)
|
||||
|
||||
- DOM:
|
||||
. Fixed bug #74004 (LIBXML_NOWARNING flag ingnored on loadHTML*).
|
||||
(somedaysummer)
|
||||
|
||||
- iconv:
|
||||
. Fixed bug #74230 (iconv fails to fail on surrogates). (Anatol)
|
||||
|
||||
- OCI8:
|
||||
. Fixed uninitialized data causing random crash. (Dmitry)
|
||||
|
||||
- OpenSSL:
|
||||
. Fixed bug #72333 (fwrite() on non-blocking SSL sockets doesn't work).
|
||||
(Jakub Zelenka)
|
||||
|
||||
- PDO MySQL:
|
||||
. Fixed bug #71003 (Expose MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT to PDO
|
||||
interface). (Thomas Orozco)
|
||||
|
||||
- Streams:
|
||||
. Fixed bug #74216 (Correctly fail on invalid IP address ports). (Sara)
|
||||
|
||||
- Zlib:
|
||||
. Fixed bug #74240 (deflate_add can allocate too much memory). (Matt Bonneau)
|
||||
|
||||
16 Mar 2017 PHP 7.0.17
|
||||
|
||||
- Core:
|
||||
. Fixed bug #73989 (PHP 7.1 Segfaults within Symfony test suite).
|
||||
(Dmitry, Laruence)
|
||||
. Fixed bug #74084 (Out of bound read - zend_mm_alloc_small). (Laruence)
|
||||
. Fixed bug #73807 (Performance problem with processing large post request).
|
||||
(Nikita)
|
||||
. Fixed bug #73998 (array_key_exists fails on arrays created by
|
||||
get_object_vars). (mhagstrand)
|
||||
. Fixed bug #73954 (NAN check fails on Alpine Linux with musl). (Andrea)
|
||||
. Fixed bug #74039 (is_infinite(-INF) returns false). (Christian Schmidt)
|
||||
. Fixed bug #73677 (Generating phar.phar core dump with gcc ASAN enabled
|
||||
build). (ondrej)
|
||||
|
||||
- Apache:
|
||||
. Fixed bug #61471 (Incomplete POST does not timeout but is passed to PHP).
|
||||
(Zheng Shao)
|
||||
|
||||
- Date:
|
||||
. Fixed bug #72719 (Relative datetime format ignores weekday on sundays
|
||||
only). (Derick)
|
||||
. Fixed bug #73294 (DateTime wrong when date string is negative). (Derick)
|
||||
. Fixed bug #73489 (wrong timestamp when call setTimeZone multi times with
|
||||
UTC offset). (xiami, Derick)
|
||||
. Fixed bug #73858 (first/last day of' flag is not being reset). (Derick)
|
||||
. Fixed bug #73942 ($date->modify('Friday this week') doesn't return a Friday
|
||||
if $date is a Sunday). (Derick)
|
||||
. Fixed bug #74057 (wrong day when using "this week" in strtotime). (Derick)
|
||||
|
||||
- FPM:
|
||||
. Fixed bug #69860 (php-fpm process accounting is broken with keepalive).
|
||||
(Denis Yeldandi)
|
||||
|
||||
- Hash:
|
||||
. Fixed bug #73127 (gost-crypto hash incorrect if input data contains long
|
||||
0xFF sequence). (Grundik)
|
||||
|
||||
- GD:
|
||||
. Fixed bug #74031 (ReflectionFunction for imagepng is missing last two
|
||||
parameters). (finwe)
|
||||
|
||||
- Mysqlnd:
|
||||
. Fixed bug #74021 (fetch_array broken data. Data more then MEDIUMBLOB).
|
||||
(Andrew Nester, Nikita)
|
||||
|
||||
- Opcache:
|
||||
. Fixed bug #74152 (if statement says true to a null variable). (Laruence)
|
||||
. Fixed bug #74019 (Segfault with list). (Laruence)
|
||||
|
||||
- OpenSSL:
|
||||
. Fixed bug #74022 (PHP Fast CGI crashes when reading from a pfx file).
|
||||
(Anatol)
|
||||
|
||||
- PDO_OCI:
|
||||
. Fixed bug #54379 (PDO_OCI: UTF-8 output gets truncated). (gureedo / Oracle)
|
||||
|
||||
- Standard:
|
||||
. Fixed bug #74148 (ReflectionFunction incorrectly reports the number of
|
||||
arguments). (Laruence)
|
||||
. Fixed bug #74005 (mail.add_x_header causes RFC-breaking lone line feed).
|
||||
(Anatol)
|
||||
. Fixed bug #73118 (is_callable callable name reports misleading value for
|
||||
anonymous classes). (Adam Saponara)
|
||||
. Fixed bug #74105 (PHP on Linux should use /dev/urandom when getrandom is
|
||||
not available). (Benjamin Robin)
|
||||
|
||||
- Streams:
|
||||
. Fixed bug #73496 (Invalid memory access in zend_inline_hash_func).
|
||||
(Laruence)
|
||||
. Fixed bug #74090 (stream_get_contents maxlength>-1 returns empty string).
|
||||
(Anatol)
|
||||
|
||||
|
||||
16 Feb 2017 PHP 7.0.16
|
||||
|
||||
- Core:
|
||||
. Fixed bug #73916 (zend_print_flat_zval_r doesn't consider reference).
|
||||
(Laruence)
|
||||
. Fixed bug #73876 (Crash when exporting **= in expansion of assign op).
|
||||
(Sara)
|
||||
. Fixed bug #73969 (segfault in debug_print_backtrace). (andrewnester)
|
||||
. Fixed bug #73973 (assertion error in debug_zval_dump). (andrewnester)
|
||||
|
||||
- DOM:
|
||||
. Fixed bug #54382 (getAttributeNodeNS doesn't get xmlns* attributes).
|
||||
(aboks)
|
||||
|
||||
- DTrace:
|
||||
. Fixed bug #73965 (DTrace reported as enabled when disabled). (Remi)
|
||||
|
||||
- FPM:
|
||||
. Fixed bug #67583 (double fastcgi_end_request on max_children limit).
|
||||
(Dmitry Saprykin)
|
||||
. Fixed bug #69865 (php-fpm does not close stderr when using syslog).
|
||||
(m6w6)
|
||||
|
||||
- GD:
|
||||
. Fixed bug #73968 (Premature failing of XBM reading). (cmb)
|
||||
|
||||
- GMP:
|
||||
. Fixed bug #69993 (test for gmp.h needs to test machine includes).
|
||||
(Jordan Gigov)
|
||||
|
||||
- Intl:
|
||||
. Fix bug #73956 (Link use CC instead of CXX). (Remi)
|
||||
|
||||
- LDAP:
|
||||
. Fixed bug #73933 (error/segfault with ldap_mod_replace and opcache).
|
||||
(Laruence)
|
||||
|
||||
- MySQLi:
|
||||
. Fixed bug #73949 (leak in mysqli_fetch_object). (krakjoe)
|
||||
|
||||
- Mysqlnd:
|
||||
. Fixed bug #69899 (segfault on close() after free_result() with mysqlnd).
|
||||
(Richard Fussenegger)
|
||||
|
||||
- Opcache:
|
||||
. Fixed bug #73983 (crash on finish work with phar in cli + opcache).
|
||||
(Anatol)
|
||||
|
||||
- OpenSSL:
|
||||
. Fixed bug #71519 (add serial hex to return value array). (xrobau)
|
||||
|
||||
- PDO_Firebird:
|
||||
. Implemented FR #72583 (All data are fetched as strings). (Dorin Marcoci)
|
||||
|
||||
- PDO_PgSQL:
|
||||
. Fixed bug #73959 (lastInsertId fails to throw an exception for wrong
|
||||
sequence name). (andrewnester)
|
||||
|
||||
- Phar:
|
||||
. Fixed bug #70417 (PharData::compress() doesn't close temp file). (cmb)
|
||||
|
||||
- posix:
|
||||
. Fixed bug #71219 (configure script incorrectly checks for ttyname_r). (atoth)
|
||||
|
||||
- Session:
|
||||
. Fixed bug #69582 (session not readable by root in CLI). (EvgeniySpinov)
|
||||
|
||||
- SPL:
|
||||
. Fixed bug #73896 (spl_autoload() crashes when calls magic _call()). (Dmitry)
|
||||
|
||||
- Standard:
|
||||
. Fixed bug #69442 (closing of fd incorrect when PTS enabled). (jaytaph)
|
||||
. Fixed bug #47021 (SoapClient stumbles over WSDL delivered with
|
||||
"Transfer-Encoding: chunked"). (Rowan Collins)
|
||||
. Fixed bug #72974 (imap is undefined service on AIX). (matthieu.sarter)
|
||||
. Fixed bug #72979 (money_format stores wrong length AIX). (matthieu.sarter)
|
||||
|
||||
- ZIP:
|
||||
. Fixed bug #70103 (ZipArchive::addGlob ignores remove_all_path option). (cmb,
|
||||
Mitch Hagstrand)
|
||||
|
||||
19 Jan 2017 PHP 7.0.15
|
||||
|
||||
@@ -13,6 +488,15 @@ PHP NEWS
|
||||
. Fixed bug #73585 (Logging of "Internal Zend error - Missing class
|
||||
information" missing class name). (Laruence)
|
||||
. Fixed bug #73753 (unserialized array pointer not advancing). (David Walker)
|
||||
. Fixed bug #73825 (Heap out of bounds read on unserialize in
|
||||
finish_nested_data()). (Stas)
|
||||
. Fixed bug #73831 (NULL Pointer Dereference while unserialize php object).
|
||||
(Stas)
|
||||
. Fixed bug #73832 (Use of uninitialized memory in unserialize()). (Stas)
|
||||
. Fixed bug #73092 (Unserialize use-after-free when resizing object's
|
||||
properties hash table). (Nikita)
|
||||
. Fixed bug #69425 (Use After Free in unserialize()). (Nikita)
|
||||
. Fixed bug #72731 (Type Confusion in Object Deserialization). (Nikita)
|
||||
|
||||
- COM:
|
||||
. Fixed bug #73679 (DOTNET read access violation using invalid codepage).
|
||||
@@ -21,6 +505,17 @@ PHP NEWS
|
||||
- DOM:
|
||||
. Fixed bug #67474 (getElementsByTagNameNS filter on default ns). (aboks)
|
||||
|
||||
- EXIF:
|
||||
. Bug bug #73737 (FPE when parsing a tag format). (Stas)
|
||||
|
||||
- GD:
|
||||
. Fixed bug #73869 (Signed Integer Overflow gd_io.c). (cmb)
|
||||
. Fixed bug #73868 (DOS vulnerability in gdImageCreateFromGd2Ctx()). (cmb)
|
||||
|
||||
- GMP:
|
||||
. Fixed bug #70513 (GMP Deserialization Type Confusion Vulnerability).
|
||||
(Nikita)
|
||||
|
||||
- Mysqli:
|
||||
. Fixed bug #73462 (Persistent connections don't set $connect_errno).
|
||||
(darkain)
|
||||
@@ -38,9 +533,10 @@ PHP NEWS
|
||||
. Fixed bug #72931 (PDO_FIREBIRD with Firebird 3.0 not work on returning
|
||||
statement). (Dorin Marcoci)
|
||||
|
||||
- Streams:
|
||||
. Fixed bug #73586 (php_user_filter::$stream is not set to the stream the
|
||||
filter is working on). (Dmitry)
|
||||
- Phar:
|
||||
. Fixed bug #73773 (Seg fault when loading hostile phar). (Stas)
|
||||
. Fixed bug #73768 (Memory corruption when loading hostile phar). (Stas)
|
||||
. Fixed bug #73764 (Crash while loading hostile phar archive). (Stas)
|
||||
|
||||
- Phpdbg:
|
||||
. Fixed bug #73615 (phpdbg without option never load .phpdbginit at startup).
|
||||
@@ -51,6 +547,10 @@ PHP NEWS
|
||||
- Reflection:
|
||||
. Fixed bug #46103 (ReflectionObject memory leak). (Nikita)
|
||||
|
||||
- Streams:
|
||||
. Fixed bug #73586 (php_user_filter::$stream is not set to the stream the
|
||||
filter is working on). (Dmitry)
|
||||
|
||||
- SQLite3:
|
||||
. Reverted fix for bug #73530 (Unsetting result set may reset other result
|
||||
set). (cmb)
|
||||
@@ -91,6 +591,7 @@ PHP NEWS
|
||||
|
||||
- JSON:
|
||||
. Fixed bug #73526 (php_json_encode depth issue). (Jakub Zelenka)
|
||||
. Install headers on windows. (Darek Slusarczyk)
|
||||
|
||||
- Mysqlnd:
|
||||
. Fixed bug #64526 (Add missing mysqlnd.* parameters to php.ini-*). (cmb)
|
||||
@@ -2152,4 +2653,3 @@ PHP NEWS
|
||||
. Update bundled libzip to 1.0.1. (Remi, Anatol)
|
||||
. Fixed bug #67161 (ZipArchive::getStream() returns NULL for certain file).
|
||||
(Christoph M. Becker)
|
||||
|
||||
+12
-9
@@ -93,24 +93,27 @@ Commit the changes to the main branch.
|
||||
12. run: ``PHPROOT=. ./makedist 5.4.2RC2``, this will export the tree, create configure
|
||||
and build three tarballs (gz, bz2 and xz).
|
||||
|
||||
13. Copy those tarballs (scp, rsync) to downloads.php.net, in your homedir there should be a
|
||||
13. run ``scripts/dev/gen_verify_stub <version> [identity]``, this will sign the tarballs
|
||||
and output verification information to be included in announcement email
|
||||
|
||||
14. Copy those tarballs (scp, rsync) to downloads.php.net, in your homedir there should be a
|
||||
directory "downloads/". Copy them into there, so that the system can generate
|
||||
MD5 sums. If you do not have this directory, talk to Derick or Dan.
|
||||
|
||||
14. Now the RC can be found on http://downloads.php.net/yourname,
|
||||
15. Now the RC can be found on http://downloads.php.net/yourname,
|
||||
f.e. http://downloads.php.net/derick/
|
||||
|
||||
15. Once the release has been tagged, contact the PHP Windows development team
|
||||
16. Once the release has been tagged, contact the PHP Windows development team
|
||||
(internals-win@lists.php.net) so that Windows binaries can be created. Once
|
||||
those are made, they should be placed into the same directory as the source snapshots.
|
||||
|
||||
Getting the non stable release (alpha/beta/RC) announced
|
||||
--------------------------------------------------------
|
||||
|
||||
1. Send an email (see example here: http://news.php.net/php.internals/19486)
|
||||
**To** ``internals@lists.php.net`` and ``php-general@lists.php.net`` lists
|
||||
pointing out "the location of the release" and "the possible release date of
|
||||
either the next RC, or the final release".
|
||||
1. Send an email **To** ``internals@lists.php.net`` and ``php-general@lists.php.net``
|
||||
lists pointing out "the location of the release" and "the possible release date of
|
||||
either the next RC, or the final release". Include in this information the verification
|
||||
information output by ``gen_verify_stub``.
|
||||
|
||||
2. Send an email (see example here http://news.php.net/php.pear.qa/5201) **To**
|
||||
``php-qa@lists.php.net`` and ``primary-qa-tester@lists.php.net``.
|
||||
@@ -190,8 +193,8 @@ Check if the pear files are updated (phar).
|
||||
This is to fetch the last commit id from php-distributions.git and commit this
|
||||
last commit id to web/php.git, then, mirrors will now sync
|
||||
|
||||
12. Once the release has been tagged, contact the PHP Windows development team
|
||||
(internals-win@lists.php.net) so that Windows binaries can be created.
|
||||
12. Once the release has been tagged, contact release managers, windows builders, and package maintainers
|
||||
so that they can build releases. Do not send this announcement to any public lists.
|
||||
|
||||
Getting the stable release announced
|
||||
------------------------------------
|
||||
|
||||
+2
-3
@@ -671,7 +671,6 @@ TSRM_API int shmget(int key, int size, int flags)
|
||||
TSRM_API void *shmat(int key, const void *shmaddr, int flags)
|
||||
{
|
||||
shm_pair *shm = shm_get(key, NULL);
|
||||
int err;
|
||||
|
||||
if (!shm->segment) {
|
||||
return (void*)-1;
|
||||
@@ -679,8 +678,8 @@ TSRM_API void *shmat(int key, const void *shmaddr, int flags)
|
||||
|
||||
shm->addr = MapViewOfFileEx(shm->segment, FILE_MAP_ALL_ACCESS, 0, 0, 0, NULL);
|
||||
|
||||
err = GetLastError();
|
||||
if (err) {
|
||||
if (NULL == shm->addr) {
|
||||
int err = GetLastError();
|
||||
/* Catch more errors */
|
||||
if (ERROR_NOT_ENOUGH_MEMORY == err) {
|
||||
_set_errno(ENOMEM);
|
||||
|
||||
@@ -652,6 +652,11 @@ Other
|
||||
Since 7.0.9, getenv() has optional second parameter, making it only
|
||||
consider local environment and not SAPI environment if true.
|
||||
|
||||
- fopen()
|
||||
Since 7.0.16, mode 'e' was added, which sets the close-on-exec flag
|
||||
on the opened file descriptor. This mode is only available in PHP compiled on
|
||||
POSIX.1-2008 conform systems.
|
||||
|
||||
========================================
|
||||
6. New Functions
|
||||
========================================
|
||||
@@ -722,6 +727,13 @@ out, that the corresponding SDK isn't available anymore.
|
||||
Mhash is not an extension anymore, use function_exists("mhash") to check whether
|
||||
it is avaliable.
|
||||
|
||||
- PDO_Firebird
|
||||
As of PHP 7.0.16, the fetched data for integer fields is aware of the Firebird
|
||||
datatypes. Previously all integers was fetched as strings, starting with the
|
||||
aforementioned PHP version integer fields are translated to the PHP integer
|
||||
datatype. The 64-bit integers are still fetched as strings in 32-bit PHP
|
||||
builds.
|
||||
|
||||
- GD
|
||||
The bundled libgd requires libwebp instead of libvpx for the WebP functionality.
|
||||
|
||||
@@ -788,6 +800,7 @@ out, that the corresponding SDK isn't available anymore.
|
||||
. Removed asp_tags ini directive. Trying to enable it will result in a fatal
|
||||
error.
|
||||
. Removed always_populate_raw_post_data ini directive.
|
||||
. realpath_cache_size set to 4096k by default
|
||||
|
||||
========================================
|
||||
12. Windows Support
|
||||
|
||||
+1
-1
@@ -100,7 +100,7 @@ AC_FUNC_ALLOCA
|
||||
AC_CHECK_FUNCS(memcpy strdup getpid kill strtod strtol finite fpclass sigsetjmp)
|
||||
AC_ZEND_BROKEN_SPRINTF
|
||||
|
||||
AC_CHECK_FUNCS(finite isfinite isinf isnan)
|
||||
AC_CHECK_DECLS([isfinite, isnan, isinf], [], [], [[#include <math.h>]])
|
||||
|
||||
ZEND_FP_EXCEPT
|
||||
|
||||
|
||||
+8
-8
@@ -64,33 +64,33 @@ int zend_sprintf(char *buffer, const char *format, ...);
|
||||
|
||||
/* To enable the is_nan, is_infinite and is_finite PHP functions */
|
||||
#ifdef NETWARE
|
||||
#define HAVE_ISNAN 1
|
||||
#define HAVE_ISINF 1
|
||||
#define HAVE_ISFINITE 1
|
||||
#define HAVE_DECL_ISNAN 1
|
||||
#define HAVE_DECL_ISINF 1
|
||||
#define HAVE_DECL_ISFINITE 1
|
||||
#endif
|
||||
|
||||
#ifndef zend_isnan
|
||||
#ifdef HAVE_ISNAN
|
||||
#if HAVE_DECL_ISNAN
|
||||
#define zend_isnan(a) isnan(a)
|
||||
#elif defined(HAVE_FPCLASS)
|
||||
#define zend_isnan(a) ((fpclass(a) == FP_SNAN) || (fpclass(a) == FP_QNAN))
|
||||
#else
|
||||
#define zend_isnan(a) 0
|
||||
#define zend_isnan(a) ((a) != (a))
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_ISINF
|
||||
#if HAVE_DECL_ISINF
|
||||
#define zend_isinf(a) isinf(a)
|
||||
#elif defined(INFINITY)
|
||||
/* Might not work, but is required by ISO C99 */
|
||||
#define zend_isinf(a) (((a)==INFINITY)?1:0)
|
||||
#define zend_isinf(a) (((a)==INFINITY || (a)==-INFINITY)?1:0)
|
||||
#elif defined(HAVE_FPCLASS)
|
||||
#define zend_isinf(a) ((fpclass(a) == FP_PINF) || (fpclass(a) == FP_NINF))
|
||||
#else
|
||||
#define zend_isinf(a) 0
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_ISFINITE) || defined(isfinite)
|
||||
#if HAVE_DECL_ISFINITE
|
||||
#define zend_finite(a) isfinite(a)
|
||||
#elif defined(HAVE_FINITE)
|
||||
#define zend_finite(a) finite(a)
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
--TEST--
|
||||
ZEND_POW_ASSIGN
|
||||
--INI--
|
||||
zend.assertions=1
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
assert_options(ASSERT_WARNING);
|
||||
assert(false && ($a **= 2));
|
||||
--EXPECTF--
|
||||
Warning: assert(): assert(false && ($a **= 2)) failed in %s%ezend-pow-assign.php on line %d
|
||||
@@ -53,27 +53,43 @@ string(3) "1st"
|
||||
string(3) "2nd"
|
||||
NULL
|
||||
string(3) "4th"
|
||||
array(3) {
|
||||
array(4) {
|
||||
[0]=>
|
||||
string(3) "1st"
|
||||
[1]=>
|
||||
&string(3) "2nd"
|
||||
[2]=>
|
||||
NULL
|
||||
[3]=>
|
||||
string(3) "4th"
|
||||
}
|
||||
array(2) {
|
||||
array(4) {
|
||||
[0]=>
|
||||
NULL
|
||||
[1]=>
|
||||
string(3) "2nd"
|
||||
[2]=>
|
||||
NULL
|
||||
[3]=>
|
||||
string(3) "4th"
|
||||
}
|
||||
array(2) {
|
||||
array(4) {
|
||||
[0]=>
|
||||
NULL
|
||||
[1]=>
|
||||
&string(3) "2nd"
|
||||
[2]=>
|
||||
NULL
|
||||
[3]=>
|
||||
string(3) "4th"
|
||||
}
|
||||
array(1) {
|
||||
array(4) {
|
||||
[0]=>
|
||||
NULL
|
||||
[1]=>
|
||||
NULL
|
||||
[2]=>
|
||||
NULL
|
||||
[3]=>
|
||||
string(3) "4th"
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ Stack trace:
|
||||
#0 %sbug72101.php(8): {closure}(2, 'Parameter 1 to ...', '%s', 8, Array)
|
||||
#1 %sbug72101.php(27): PHPUnit_Framework_MockObject_Stub_ReturnCallback->invoke(Object(PHPUnit_Framework_MockObject_Invocation_Static))
|
||||
#2 %sbug72101.php(19): PHPUnit_Framework_MockObject_Matcher->invoked(Object(PHPUnit_Framework_MockObject_Invocation_Static))
|
||||
#3 %sbug72101.php(51): PHPUnit_Framework_MockObject_InvocationMocker->invoke(Object(PHPUnit_Framework_MockObject_Invocation_Static))
|
||||
#3 %sbug72101.php(52): PHPUnit_Framework_MockObject_InvocationMocker->invoke(Object(PHPUnit_Framework_MockObject_Invocation_Static))
|
||||
#4 %sbug72101.php(72): Mock_MethodCallbackByReference_7b180d26->bar(0, 0, 0)
|
||||
#5 {main}
|
||||
thrown in %sbug72101.php on line 61
|
||||
@@ -0,0 +1,15 @@
|
||||
--TEST--
|
||||
Bug #73900: Use After Free in unserialize() SplFixedArray
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$a = new stdClass;
|
||||
$b = new SplFixedArray(1);
|
||||
$b[0] = $a;
|
||||
$c = &$b[0];
|
||||
var_dump($c);
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
object(stdClass)#1 (0) {
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
--TEST--
|
||||
Bug #73916 (zend_print_flat_zval_r doesn't consider reference)
|
||||
--FILE--
|
||||
<?php
|
||||
$a = array('a');
|
||||
class b{};
|
||||
$b = new b;
|
||||
$test[] =& $a;
|
||||
$test[] =& $b;
|
||||
test($test);
|
||||
function test() {
|
||||
debug_print_backtrace();
|
||||
}
|
||||
?>
|
||||
--EXPECTF--
|
||||
#0 test(Array ([0] => Array ([0] => a),[1] => b Object ())) called at [%sbug73916.php:%d]
|
||||
@@ -0,0 +1,23 @@
|
||||
--TEST--
|
||||
Bug #73954 (NAN check fails on Alpine Linux with musl)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
var_dump(NAN);
|
||||
var_dump(is_nan(NAN));
|
||||
|
||||
function takes_int(int $int) {
|
||||
}
|
||||
|
||||
takes_int(log(tan(3.14)));
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
float(NAN)
|
||||
bool(true)
|
||||
|
||||
Fatal error: Uncaught TypeError: Argument 1 passed to takes_int() must be of the type integer, float given, called in %s on line 9 and defined in %s:6
|
||||
Stack trace:
|
||||
#0 %s(9): takes_int(NAN)
|
||||
#1 {main}
|
||||
thrown in %s on line 6
|
||||
@@ -0,0 +1,16 @@
|
||||
--TEST--
|
||||
Bug #73960: Leak with instance method calling static method with referenced return
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$value = 'one';
|
||||
$array = array($value);
|
||||
$array = $ref =& $array;
|
||||
var_dump($array);
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
array(1) {
|
||||
[0]=>
|
||||
string(3) "one"
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
--TEST--
|
||||
Bug #73989 (PHP 7.1 Segfaults within Symfony test suite)
|
||||
--FILE--
|
||||
<?php
|
||||
class Cycle
|
||||
{
|
||||
private $thing;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$obj = $this;
|
||||
$this->thing = function() use($obj) {};
|
||||
}
|
||||
|
||||
public function __destruct()
|
||||
{
|
||||
($this->thing)();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
for ($i = 0; $i < 10000; ++$i) {
|
||||
$obj = new Cycle();
|
||||
}
|
||||
echo "OK\n";
|
||||
?>
|
||||
--EXPECT--
|
||||
OK
|
||||
@@ -0,0 +1,19 @@
|
||||
--TEST--
|
||||
Bug #73998 (array_key_exists fails on arrays created by get_object_vars)
|
||||
--DESCRIPTION--
|
||||
Properties of objects with numeric names should be accessible
|
||||
--FILE--
|
||||
<?php
|
||||
$a = new stdClass;
|
||||
$a->{1234} = "Numeric";
|
||||
$a->a1234 = "String";
|
||||
|
||||
$properties = get_object_vars($a);
|
||||
var_dump(array_key_exists(1234, $properties));
|
||||
echo "Value: {$properties[1234]}\n";
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
bool(true)
|
||||
Value: Numeric
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
--TEST--
|
||||
Bug #74084 (Out of bound read - zend_mm_alloc_small)
|
||||
--INI--
|
||||
error_reporting=0
|
||||
--FILE--
|
||||
<?php
|
||||
$$A += $$B->a = &$$C;
|
||||
unset($$A);
|
||||
$$A -= $$B->a = &$$C;
|
||||
unset($$A);
|
||||
$$A *= $$B->a = &$$C;
|
||||
unset($$A);
|
||||
$$A /= $$B->a = &$$C;
|
||||
unset($$A);
|
||||
$$A **= $$B->a = &$$C;
|
||||
var_dump($$A);
|
||||
?>
|
||||
--EXPECT--
|
||||
int(1)
|
||||
@@ -0,0 +1,14 @@
|
||||
--TEST--
|
||||
Fixes bug 74188 (undeclared static variables emit a warning with ?? operator)
|
||||
--FILE--
|
||||
<?php
|
||||
abstract class Test
|
||||
{
|
||||
public static function get()
|
||||
{
|
||||
static::$a ?? true;
|
||||
}
|
||||
}
|
||||
Test::get();
|
||||
?>
|
||||
--EXPECT--
|
||||
@@ -0,0 +1,38 @@
|
||||
--TEST--
|
||||
Bug #74408 (Endless loop bypassing execution time limit)
|
||||
--INI--
|
||||
error_reporting = E_ALL | E_DEPRECATED | E_STRICT
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
//php.ini: error_reporting = E_ALL | E_DEPRECATED | E_STRICT
|
||||
|
||||
class ErrorHandling {
|
||||
|
||||
public function error_handler($errno, $errstr, $errfile, $errline) {
|
||||
$bla = new NonExistingClass2();
|
||||
}
|
||||
|
||||
public function exception_handler(Error $e) {
|
||||
echo "Caught, exception: " . $e->getMessage();
|
||||
}
|
||||
}
|
||||
|
||||
set_error_handler('ErrorHandling::error_handler');
|
||||
set_exception_handler('ErrorHandling::exception_handler');
|
||||
|
||||
$blubb = new NonExistingClass();
|
||||
?>
|
||||
--EXPECTF--
|
||||
Deprecated: Non-static method ErrorHandling::error_handler() should not be called statically in %sbug74408.php on line %d
|
||||
|
||||
Deprecated: Non-static method ErrorHandling::error_handler() should not be called statically in %sbug74408.php on line %d
|
||||
|
||||
Deprecated: Non-static method ErrorHandling::error_handler() should not be called statically in Unknown on line 0
|
||||
|
||||
Fatal error: Uncaught Error: Class 'NonExistingClass2' not found in %sbug74408.php:%d
|
||||
Stack trace:
|
||||
#0 [internal function]: ErrorHandling::error_handler(8192, 'Non-static meth...', '%s', %d, Array)
|
||||
#1 %sbug74408.php(%d): set_exception_handler('ErrorHandling::...')
|
||||
#2 {main}
|
||||
thrown in %sbug74408.php on line %d
|
||||
@@ -0,0 +1,11 @@
|
||||
--TEST--
|
||||
Bug #74546 (SIGILL in ZEND_FETCH_CLASS_CONSTANT_SPEC_CONST_CONST_HANDLER())
|
||||
--FILE--
|
||||
<?php
|
||||
"000000"[0]::d;
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Uncaught Error: Class '0' not found in %sbug74546.php:%d
|
||||
Stack trace:
|
||||
#0 {main}
|
||||
thrown in %sbug74546.php on line %d
|
||||
@@ -0,0 +1 @@
|
||||
0=0&~2000000000
|
||||
@@ -0,0 +1,15 @@
|
||||
--TEST--
|
||||
Bug #74603 (PHP INI Parsing Stack Buffer Overflow Vulnerability)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (PHP_INT_MAX !== 2147483647)
|
||||
die('skip for 32-bit only');
|
||||
--FILE--
|
||||
<?php
|
||||
var_dump(parse_ini_file(__DIR__ . "/bug74603.ini", true, INI_SCANNER_NORMAL));
|
||||
?>
|
||||
--EXPECT--
|
||||
array(1) {
|
||||
[0]=>
|
||||
string(1) "0"
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
--TEST--
|
||||
Bug #74657 (Undefined constants in array properties result in broken properties)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
interface I {
|
||||
}
|
||||
|
||||
class C {
|
||||
const FOO = I::FOO;
|
||||
|
||||
public $options = [self::FOO => "bar"];
|
||||
}
|
||||
|
||||
try {
|
||||
var_dump((new C)->options);
|
||||
} catch (Throwable $e) {}
|
||||
|
||||
var_dump((new C)->options);
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Uncaught Error: Undefined class constant 'I::FOO' in %sbug74657.php:%d
|
||||
Stack trace:
|
||||
#0 {main}
|
||||
thrown in %sbug74657.php on line %d
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
--TEST--
|
||||
Bug #74840: Opcache overwrites argument of GENERATOR_RETURN within finally
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$g = (function($a) {
|
||||
try {
|
||||
return $a + 1;
|
||||
} finally {
|
||||
$b = $a + 2;
|
||||
var_dump($b);
|
||||
}
|
||||
yield; // Generator
|
||||
})(1);
|
||||
$g->next();
|
||||
var_dump($g->getReturn());
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
int(3)
|
||||
int(2)
|
||||
@@ -0,0 +1,12 @@
|
||||
--TEST--
|
||||
Bug #74947 (Segfault in scanner on INF number)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
echo 200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000;
|
||||
|
||||
echo -200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000;
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
INF-INF
|
||||
@@ -0,0 +1,10 @@
|
||||
--TEST--
|
||||
Use of non-literals in declare ticks values crashes compiler
|
||||
--FILE--
|
||||
<?php
|
||||
declare(ticks = UNKNOWN_CONST) {
|
||||
echo 'Done';
|
||||
}
|
||||
--EXPECTF--
|
||||
|
||||
Fatal error: declare(ticks) value must be a literal in %sdeclare_006.php on line 2
|
||||
@@ -0,0 +1,45 @@
|
||||
--TEST--
|
||||
Bug #74954 (crash after update of generator yielding from finished generator)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
function from() {
|
||||
yield 1;
|
||||
throw new Exception();
|
||||
}
|
||||
|
||||
function gen($gen) {
|
||||
try {
|
||||
var_dump(yield from $gen);
|
||||
} catch (Exception $e) { print "Caught exception!\n$e\n"; }
|
||||
}
|
||||
|
||||
$gen = from();
|
||||
$gens[] = gen($gen);
|
||||
$gens[] = gen($gen);
|
||||
|
||||
foreach ($gens as $g) {
|
||||
$g->current();
|
||||
}
|
||||
|
||||
do {
|
||||
foreach ($gens as $i => $g) {
|
||||
$g->next();
|
||||
}
|
||||
} while($gens[0]->valid());
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Caught exception!
|
||||
Exception in %s:%d
|
||||
Stack trace:
|
||||
#0 %s(%d): from()
|
||||
#1 [internal function]: gen(Object(Generator))
|
||||
#2 %s(%d): Generator->next()
|
||||
#3 {main}
|
||||
Caught exception!
|
||||
ClosedGeneratorException: Generator yielded from aborted, no return value available in %s:%d
|
||||
Stack trace:
|
||||
#0 [internal function]: gen(Object(Generator))
|
||||
#1 %s(%d): Generator->next()
|
||||
#2 {main}
|
||||
@@ -0,0 +1,24 @@
|
||||
--TEST--
|
||||
yield from parses too greedily
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
function from1234($x) {
|
||||
return $x;
|
||||
}
|
||||
|
||||
function bar() {
|
||||
yield 24;
|
||||
}
|
||||
|
||||
function foo() {
|
||||
yield from1234(42);
|
||||
yield from(bar());
|
||||
}
|
||||
|
||||
foreach (foo() as $value) {
|
||||
var_dump($value);
|
||||
}
|
||||
--EXPECT--
|
||||
int(42)
|
||||
int(24)
|
||||
+7
-1
@@ -152,6 +152,7 @@ ZEND_TSRMLS_CACHE_DEFINE()
|
||||
#endif
|
||||
|
||||
ZEND_API zend_utility_values zend_uv;
|
||||
ZEND_API zend_bool zend_dtrace_enabled;
|
||||
|
||||
/* version information */
|
||||
static char *zend_version_info;
|
||||
@@ -312,6 +313,9 @@ ZEND_API void zend_print_flat_zval_r(zval *expr) /* {{{ */
|
||||
ZEND_PUTS(")");
|
||||
break;
|
||||
}
|
||||
case IS_REFERENCE:
|
||||
zend_print_flat_zval_r(Z_REFVAL_P(expr));
|
||||
break;
|
||||
default:
|
||||
zend_print_variable(expr);
|
||||
break;
|
||||
@@ -563,6 +567,7 @@ static void executor_globals_ctor(zend_executor_globals *executor_globals) /* {{
|
||||
#ifdef ZEND_WIN32
|
||||
zend_get_windows_version_info(&executor_globals->windows_version_info);
|
||||
#endif
|
||||
executor_globals->valid_symbol_table = 0;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
@@ -682,6 +687,7 @@ int zend_startup(zend_utility_functions *utility_functions, char **extensions) /
|
||||
char *tmp = getenv("USE_ZEND_DTRACE");
|
||||
|
||||
if (tmp && zend_atoi(tmp, 0)) {
|
||||
zend_dtrace_enabled = 1;
|
||||
zend_compile_file = dtrace_compile_file;
|
||||
zend_execute_ex = dtrace_execute_ex;
|
||||
zend_execute_internal = dtrace_execute_internal;
|
||||
@@ -695,7 +701,7 @@ int zend_startup(zend_utility_functions *utility_functions, char **extensions) /
|
||||
zend_compile_file = compile_file;
|
||||
zend_execute_ex = execute_ex;
|
||||
zend_execute_internal = NULL;
|
||||
#endif /* HAVE_SYS_SDT_H */
|
||||
#endif /* HAVE_DTRACE */
|
||||
zend_compile_string = compile_string;
|
||||
zend_throw_exception_hook = NULL;
|
||||
|
||||
|
||||
@@ -299,6 +299,8 @@ extern ZEND_API zend_class_entry *zend_standard_class_def;
|
||||
extern ZEND_API zend_utility_values zend_uv;
|
||||
extern ZEND_API zval zval_used_for_init;
|
||||
|
||||
/* If DTrace is available and enabled */
|
||||
extern ZEND_API zend_bool zend_dtrace_enabled;
|
||||
END_EXTERN_C()
|
||||
|
||||
#define ZEND_UV(name) (zend_uv.name)
|
||||
|
||||
+5
-3
@@ -1087,8 +1087,6 @@ ZEND_API void zend_merge_properties(zval *obj, HashTable *properties) /* {{{ */
|
||||
ZEND_API int zend_update_class_constants(zend_class_entry *class_type) /* {{{ */
|
||||
{
|
||||
if (!(class_type->ce_flags & ZEND_ACC_CONSTANTS_UPDATED)) {
|
||||
class_type->ce_flags |= ZEND_ACC_CONSTANTS_UPDATED;
|
||||
|
||||
if (class_type->parent) {
|
||||
if (UNEXPECTED(zend_update_class_constants(class_type->parent) != SUCCESS)) {
|
||||
return FAILURE;
|
||||
@@ -1162,7 +1160,9 @@ ZEND_API int zend_update_class_constants(zend_class_entry *class_type) /* {{{ */
|
||||
|
||||
*scope = old_scope;
|
||||
}
|
||||
class_type->ce_flags |= ZEND_ACC_CONSTANTS_UPDATED;
|
||||
}
|
||||
|
||||
return SUCCESS;
|
||||
}
|
||||
/* }}} */
|
||||
@@ -2028,17 +2028,19 @@ ZEND_API zend_module_entry* zend_register_module_ex(zend_module_entry *module) /
|
||||
zend_string_release(lcname);
|
||||
return NULL;
|
||||
}
|
||||
zend_string_release(lcname);
|
||||
module = module_ptr;
|
||||
EG(current_module) = module;
|
||||
|
||||
if (module->functions && zend_register_functions(NULL, module->functions, NULL, module->type)==FAILURE) {
|
||||
zend_hash_del(&module_registry, lcname);
|
||||
zend_string_release(lcname);
|
||||
EG(current_module) = NULL;
|
||||
zend_error(E_CORE_WARNING,"%s: Unable to register functions, unable to load", module->name);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
EG(current_module) = NULL;
|
||||
zend_string_release(lcname);
|
||||
return module;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
+2
-2
@@ -2862,7 +2862,7 @@ static ZEND_COLD ZEND_NORETURN void zend_out_of_memory(void)
|
||||
ZEND_API void * __zend_malloc(size_t len)
|
||||
{
|
||||
void *tmp = malloc(len);
|
||||
if (EXPECTED(tmp)) {
|
||||
if (EXPECTED(tmp || !len)) {
|
||||
return tmp;
|
||||
}
|
||||
zend_out_of_memory();
|
||||
@@ -2878,7 +2878,7 @@ ZEND_API void * __zend_calloc(size_t nmemb, size_t len)
|
||||
ZEND_API void * __zend_realloc(void *p, size_t len)
|
||||
{
|
||||
p = realloc(p, len);
|
||||
if (EXPECTED(p)) {
|
||||
if (EXPECTED(p || !len)) {
|
||||
return p;
|
||||
}
|
||||
zend_out_of_memory();
|
||||
|
||||
+15
-4
@@ -57,17 +57,21 @@ ZEND_API zend_ast *zend_ast_create_znode(znode *node) {
|
||||
return (zend_ast *) ast;
|
||||
}
|
||||
|
||||
ZEND_API zend_ast *zend_ast_create_zval_ex(zval *zv, zend_ast_attr attr) {
|
||||
ZEND_API zend_ast *zend_ast_create_zval_with_lineno(zval *zv, zend_ast_attr attr, uint32_t lineno) {
|
||||
zend_ast_zval *ast;
|
||||
|
||||
ast = zend_ast_alloc(sizeof(zend_ast_zval));
|
||||
ast->kind = ZEND_AST_ZVAL;
|
||||
ast->attr = attr;
|
||||
ZVAL_COPY_VALUE(&ast->val, zv);
|
||||
ast->val.u2.lineno = CG(zend_lineno);
|
||||
ast->val.u2.lineno = lineno;
|
||||
return (zend_ast *) ast;
|
||||
}
|
||||
|
||||
ZEND_API zend_ast *zend_ast_create_zval_ex(zval *zv, zend_ast_attr attr) {
|
||||
return zend_ast_create_zval_with_lineno(zv, attr, CG(zend_lineno));
|
||||
}
|
||||
|
||||
ZEND_API zend_ast *zend_ast_create_decl(
|
||||
zend_ast_kind kind, uint32_t flags, uint32_t start_lineno, zend_string *doc_comment,
|
||||
zend_string *name, zend_ast *child0, zend_ast *child1, zend_ast *child2, zend_ast *child3
|
||||
@@ -155,7 +159,14 @@ ZEND_API zend_ast *zend_ast_create_list(uint32_t init_children, zend_ast_kind ki
|
||||
uint32_t i;
|
||||
va_start(va, kind);
|
||||
for (i = 0; i < init_children; ++i) {
|
||||
ast = zend_ast_list_add(ast, va_arg(va, zend_ast *));
|
||||
zend_ast *child = va_arg(va, zend_ast *);
|
||||
ast = zend_ast_list_add(ast, child);
|
||||
if (child != NULL) {
|
||||
uint32_t lineno = zend_ast_get_lineno(child);
|
||||
if (lineno < ast->lineno) {
|
||||
ast->lineno = lineno;
|
||||
}
|
||||
}
|
||||
}
|
||||
va_end(va);
|
||||
}
|
||||
@@ -1344,7 +1355,7 @@ simple_list:
|
||||
case ZEND_ASSIGN_BW_OR: BINARY_OP(" |= ", 90, 91, 90);
|
||||
case ZEND_ASSIGN_BW_AND: BINARY_OP(" &= ", 90, 91, 90);
|
||||
case ZEND_ASSIGN_BW_XOR: BINARY_OP(" ^= ", 90, 91, 90);
|
||||
case ZEND_POW: BINARY_OP(" **= ", 90, 91, 90);
|
||||
case ZEND_ASSIGN_POW: BINARY_OP(" **= ", 90, 91, 90);
|
||||
EMPTY_SWITCH_DEFAULT_CASE();
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -190,6 +190,7 @@ typedef struct _zend_ast_decl {
|
||||
typedef void (*zend_ast_process_t)(zend_ast *ast);
|
||||
extern ZEND_API zend_ast_process_t zend_ast_process;
|
||||
|
||||
ZEND_API zend_ast *zend_ast_create_zval_with_lineno(zval *zv, zend_ast_attr attr, uint32_t lineno);
|
||||
ZEND_API zend_ast *zend_ast_create_zval_ex(zval *zv, zend_ast_attr attr);
|
||||
|
||||
ZEND_API zend_ast *zend_ast_create_ex(zend_ast_kind kind, zend_ast_attr attr, ...);
|
||||
|
||||
@@ -507,7 +507,7 @@ ZEND_FUNCTION(func_get_args)
|
||||
{
|
||||
zval *p, *q;
|
||||
uint32_t arg_count, first_extra_arg;
|
||||
uint32_t i, n;
|
||||
uint32_t i;
|
||||
zend_execute_data *ex = EX(prev_execute_data);
|
||||
|
||||
if (ZEND_CALL_INFO(ex) & ZEND_CALL_CODE) {
|
||||
@@ -523,7 +523,6 @@ ZEND_FUNCTION(func_get_args)
|
||||
zend_hash_real_init(Z_ARRVAL_P(return_value), 1);
|
||||
ZEND_HASH_FILL_PACKED(Z_ARRVAL_P(return_value)) {
|
||||
i = 0;
|
||||
n = 0;
|
||||
p = ZEND_CALL_ARG(ex, 1);
|
||||
if (arg_count > first_extra_arg) {
|
||||
while (i < first_extra_arg) {
|
||||
@@ -533,7 +532,8 @@ ZEND_FUNCTION(func_get_args)
|
||||
if (Z_OPT_REFCOUNTED_P(q)) {
|
||||
Z_ADDREF_P(q);
|
||||
}
|
||||
n++;
|
||||
} else {
|
||||
q = &EG(uninitialized_zval);
|
||||
}
|
||||
ZEND_HASH_FILL_ADD(q);
|
||||
p++;
|
||||
@@ -548,14 +548,15 @@ ZEND_FUNCTION(func_get_args)
|
||||
if (Z_OPT_REFCOUNTED_P(q)) {
|
||||
Z_ADDREF_P(q);
|
||||
}
|
||||
n++;
|
||||
} else {
|
||||
q = &EG(uninitialized_zval);
|
||||
}
|
||||
ZEND_HASH_FILL_ADD(q);
|
||||
p++;
|
||||
i++;
|
||||
}
|
||||
} ZEND_HASH_FILL_END();
|
||||
Z_ARRVAL_P(return_value)->nNumOfElements = n;
|
||||
Z_ARRVAL_P(return_value)->nNumOfElements = arg_count;
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
@@ -808,9 +809,6 @@ static void copy_constant_array(zval *dst, zval *src) /* {{{ */
|
||||
}
|
||||
} else if (Z_REFCOUNTED_P(val)) {
|
||||
Z_ADDREF_P(val);
|
||||
if (UNEXPECTED(Z_TYPE_INFO_P(val) == IS_RESOURCE_EX)) {
|
||||
Z_TYPE_INFO_P(new_val) &= ~(IS_TYPE_REFCOUNTED << Z_TYPE_FLAGS_SHIFT);
|
||||
}
|
||||
}
|
||||
} ZEND_HASH_FOREACH_END();
|
||||
}
|
||||
@@ -853,12 +851,7 @@ repeat:
|
||||
case IS_FALSE:
|
||||
case IS_TRUE:
|
||||
case IS_NULL:
|
||||
break;
|
||||
case IS_RESOURCE:
|
||||
ZVAL_COPY(&val_free, val);
|
||||
/* TODO: better solution than this tricky disable dtor on resource? */
|
||||
Z_TYPE_INFO(val_free) &= ~(IS_TYPE_REFCOUNTED << Z_TYPE_FLAGS_SHIFT);
|
||||
val = &val_free;
|
||||
break;
|
||||
case IS_ARRAY:
|
||||
if (!Z_IMMUTABLE_P(val)) {
|
||||
@@ -1154,6 +1147,8 @@ ZEND_FUNCTION(get_object_vars)
|
||||
HashTable *properties;
|
||||
zend_string *key;
|
||||
zend_object *zobj;
|
||||
zend_ulong index;
|
||||
zend_bool fast_copy = 0;
|
||||
|
||||
ZEND_PARSE_PARAMETERS_START(1, 1)
|
||||
Z_PARAM_OBJECT(obj)
|
||||
@@ -1172,7 +1167,17 @@ ZEND_FUNCTION(get_object_vars)
|
||||
zobj = Z_OBJ_P(obj);
|
||||
|
||||
if (!zobj->ce->default_properties_count && properties == zobj->properties && !ZEND_HASH_GET_APPLY_COUNT(properties)) {
|
||||
/* fast copy */
|
||||
fast_copy = 1;
|
||||
/* Check if the object has a numeric property, See Bug 73998 */
|
||||
ZEND_HASH_FOREACH_STR_KEY(properties, key) {
|
||||
if (key && ZEND_HANDLE_NUMERIC(key, index)) {
|
||||
fast_copy = 0;
|
||||
break;
|
||||
}
|
||||
} ZEND_HASH_FOREACH_END();
|
||||
}
|
||||
|
||||
if (fast_copy) {
|
||||
if (EXPECTED(zobj->handlers == &std_object_handlers)) {
|
||||
if (EXPECTED(!(GC_FLAGS(properties) & IS_ARRAY_IMMUTABLE))) {
|
||||
GC_REFCOUNT(properties)++;
|
||||
@@ -1198,7 +1203,7 @@ ZEND_FUNCTION(get_object_vars)
|
||||
zend_unmangle_property_name_ex(key, &class_name, &prop_name, &prop_len);
|
||||
zend_hash_str_add_new(Z_ARRVAL_P(return_value), prop_name, prop_len, value);
|
||||
} else {
|
||||
zend_hash_add_new(Z_ARRVAL_P(return_value), key, value);
|
||||
zend_symbtable_add_new(Z_ARRVAL_P(return_value), key, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2215,7 +2220,6 @@ static void debug_backtrace_get_args(zend_execute_data *call, zval *arg_array) /
|
||||
array_init_size(arg_array, num_args);
|
||||
if (num_args) {
|
||||
uint32_t i = 0;
|
||||
uint32_t n = 0;
|
||||
zval *p = ZEND_CALL_ARG(call, 1);
|
||||
|
||||
zend_hash_real_init(Z_ARRVAL_P(arg_array), 1);
|
||||
@@ -2238,12 +2242,9 @@ static void debug_backtrace_get_args(zend_execute_data *call, zval *arg_array) /
|
||||
if (Z_OPT_REFCOUNTED_P(arg)) {
|
||||
Z_ADDREF_P(arg);
|
||||
}
|
||||
n++;
|
||||
ZEND_HASH_FILL_ADD(arg);
|
||||
} else {
|
||||
zval tmp;
|
||||
ZVAL_UNDEF(&tmp);
|
||||
ZEND_HASH_FILL_ADD(&tmp);
|
||||
ZEND_HASH_FILL_ADD(&EG(uninitialized_zval));
|
||||
}
|
||||
i++;
|
||||
}
|
||||
@@ -2253,9 +2254,10 @@ static void debug_backtrace_get_args(zend_execute_data *call, zval *arg_array) /
|
||||
if (Z_OPT_REFCOUNTED_P(p)) {
|
||||
Z_ADDREF_P(p);
|
||||
}
|
||||
n++;
|
||||
ZEND_HASH_FILL_ADD(p);
|
||||
} else {
|
||||
ZEND_HASH_FILL_ADD(&EG(uninitialized_zval));
|
||||
}
|
||||
ZEND_HASH_FILL_ADD(p);
|
||||
p++;
|
||||
i++;
|
||||
}
|
||||
@@ -2268,14 +2270,15 @@ static void debug_backtrace_get_args(zend_execute_data *call, zval *arg_array) /
|
||||
if (Z_OPT_REFCOUNTED_P(p)) {
|
||||
Z_ADDREF_P(p);
|
||||
}
|
||||
n++;
|
||||
ZEND_HASH_FILL_ADD(p);
|
||||
} else {
|
||||
ZEND_HASH_FILL_ADD(&EG(uninitialized_zval));
|
||||
}
|
||||
ZEND_HASH_FILL_ADD(p);
|
||||
p++;
|
||||
i++;
|
||||
}
|
||||
} ZEND_HASH_FILL_END();
|
||||
Z_ARRVAL_P(arg_array)->nNumOfElements = n;
|
||||
Z_ARRVAL_P(arg_array)->nNumOfElements = num_args;
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
@@ -2364,13 +2367,19 @@ ZEND_FUNCTION(debug_print_backtrace)
|
||||
object = Z_OBJ(call->This);
|
||||
|
||||
if (call->func) {
|
||||
zend_string *zend_function_name;
|
||||
|
||||
func = call->func;
|
||||
function_name = (func->common.scope &&
|
||||
func->common.scope->trait_aliases) ?
|
||||
ZSTR_VAL(zend_resolve_method_name(
|
||||
(object ? object->ce : func->common.scope), func)) :
|
||||
(func->common.function_name ?
|
||||
ZSTR_VAL(func->common.function_name) : NULL);
|
||||
if (func->common.scope && func->common.scope->trait_aliases) {
|
||||
zend_function_name = zend_resolve_method_name(object ? object->ce : func->common.scope, func);
|
||||
} else {
|
||||
zend_function_name = func->common.function_name;
|
||||
}
|
||||
if (zend_function_name != NULL) {
|
||||
function_name = ZSTR_VAL(zend_function_name);
|
||||
} else {
|
||||
function_name = NULL;
|
||||
}
|
||||
} else {
|
||||
func = NULL;
|
||||
function_name = NULL;
|
||||
|
||||
+20
-6
@@ -1574,6 +1574,7 @@ int zendlex(zend_parser_stack_elem *elem) /* {{{ */
|
||||
{
|
||||
zval zv;
|
||||
int retval;
|
||||
uint32_t start_lineno;
|
||||
|
||||
if (CG(increment_lineno)) {
|
||||
CG(zend_lineno)++;
|
||||
@@ -1582,6 +1583,7 @@ int zendlex(zend_parser_stack_elem *elem) /* {{{ */
|
||||
|
||||
again:
|
||||
ZVAL_UNDEF(&zv);
|
||||
start_lineno = CG(zend_lineno);
|
||||
retval = lex_scan(&zv);
|
||||
if (EG(exception)) {
|
||||
return T_ERROR;
|
||||
@@ -1605,7 +1607,7 @@ again:
|
||||
break;
|
||||
}
|
||||
if (Z_TYPE(zv) != IS_UNDEF) {
|
||||
elem->ast = zend_ast_create_zval(&zv);
|
||||
elem->ast = zend_ast_create_zval_with_lineno(&zv, 0, start_lineno);
|
||||
}
|
||||
|
||||
return retval;
|
||||
@@ -4366,8 +4368,12 @@ void zend_compile_declare(zend_ast *ast) /* {{{ */
|
||||
zend_ast *declare_ast = declares->child[i];
|
||||
zend_ast *name_ast = declare_ast->child[0];
|
||||
zend_ast *value_ast = declare_ast->child[1];
|
||||
|
||||
zend_string *name = zend_ast_get_str(name_ast);
|
||||
|
||||
if (value_ast->kind != ZEND_AST_ZVAL) {
|
||||
zend_error_noreturn(E_COMPILE_ERROR, "declare(%s) value must be a literal", ZSTR_VAL(name));
|
||||
}
|
||||
|
||||
if (zend_string_equals_literal_ci(name, "ticks")) {
|
||||
zval value_zv;
|
||||
zend_const_expr_to_zval(&value_zv, value_ast);
|
||||
@@ -6663,8 +6669,11 @@ void zend_compile_class_const(znode *result, zend_ast *ast) /* {{{ */
|
||||
return;
|
||||
}
|
||||
|
||||
zend_eval_const_expr(&class_ast);
|
||||
zend_eval_const_expr(&const_ast);
|
||||
zend_eval_const_expr(&ast->child[0]);
|
||||
zend_eval_const_expr(&ast->child[1]);
|
||||
|
||||
class_ast = ast->child[0];
|
||||
const_ast = ast->child[1];
|
||||
|
||||
if (class_ast->kind == ZEND_AST_ZVAL) {
|
||||
resolved_name = zend_resolve_class_name_ast(class_ast);
|
||||
@@ -7308,6 +7317,8 @@ void zend_compile_expr(znode *result, zend_ast *ast) /* {{{ */
|
||||
|
||||
void zend_compile_var(znode *result, zend_ast *ast, uint32_t type) /* {{{ */
|
||||
{
|
||||
CG(zend_lineno) = zend_ast_get_lineno(ast);
|
||||
|
||||
switch (ast->kind) {
|
||||
case ZEND_AST_VAR:
|
||||
zend_compile_simple_var(result, ast, type, 0);
|
||||
@@ -7604,8 +7615,11 @@ void zend_eval_const_expr(zend_ast **ast_ptr) /* {{{ */
|
||||
break;
|
||||
}
|
||||
|
||||
zend_eval_const_expr(&class_ast);
|
||||
zend_eval_const_expr(&name_ast);
|
||||
zend_eval_const_expr(&ast->child[0]);
|
||||
zend_eval_const_expr(&ast->child[1]);
|
||||
|
||||
class_ast = ast->child[0];
|
||||
name_ast = ast->child[1];
|
||||
|
||||
if (name_ast->kind == ZEND_AST_ZVAL && zend_string_equals_literal_ci(zend_ast_get_str(name_ast), "class")) {
|
||||
zend_error_noreturn(E_COMPILE_ERROR,
|
||||
|
||||
@@ -556,8 +556,8 @@ static void _build_trace_args(zval *arg, smart_str *str) /* {{{ */
|
||||
break;
|
||||
case IS_DOUBLE: {
|
||||
double dval = Z_DVAL_P(arg);
|
||||
char *s_tmp = emalloc(MAX_LENGTH_OF_DOUBLE + EG(precision) + 1);
|
||||
int l_tmp = zend_sprintf(s_tmp, "%.*G", (int) EG(precision), dval); /* SAFE */
|
||||
char *s_tmp;
|
||||
size_t l_tmp = zend_spprintf(&s_tmp, MAX_LENGTH_OF_DOUBLE + EG(precision) + 1, "%.*G", (int) EG(precision), dval); /* SAFE */
|
||||
smart_str_appendl(str, s_tmp, l_tmp);
|
||||
smart_str_appends(str, ", ");
|
||||
efree(s_tmp);
|
||||
|
||||
+3
-10
@@ -1758,16 +1758,9 @@ convert_to_array:
|
||||
zend_error(E_NOTICE, "Indirect modification of overloaded element of %s has no effect", ZSTR_VAL(ce->name));
|
||||
} else if (EXPECTED(retval && Z_TYPE_P(retval) != IS_UNDEF)) {
|
||||
if (!Z_ISREF_P(retval)) {
|
||||
if (Z_REFCOUNTED_P(retval) &&
|
||||
Z_REFCOUNT_P(retval) > 1) {
|
||||
if (Z_TYPE_P(retval) != IS_OBJECT) {
|
||||
Z_DELREF_P(retval);
|
||||
ZVAL_DUP(result, retval);
|
||||
retval = result;
|
||||
} else {
|
||||
ZVAL_COPY_VALUE(result, retval);
|
||||
retval = result;
|
||||
}
|
||||
if (result != retval) {
|
||||
ZVAL_COPY(result, retval);
|
||||
retval = result;
|
||||
}
|
||||
if (Z_TYPE_P(retval) != IS_OBJECT) {
|
||||
zend_class_entry *ce = Z_OBJCE_P(container);
|
||||
|
||||
@@ -79,6 +79,10 @@ static zend_always_inline zval* zend_assign_to_variable(zval *variable_ptr, zval
|
||||
return variable_ptr;
|
||||
}
|
||||
if (ZEND_CONST_COND(value_type & (IS_VAR|IS_CV), 1) && variable_ptr == value) {
|
||||
if (value_type == IS_VAR && ref) {
|
||||
ZEND_ASSERT(GC_REFCOUNT(ref) > 1);
|
||||
--GC_REFCOUNT(ref);
|
||||
}
|
||||
return variable_ptr;
|
||||
}
|
||||
garbage = Z_COUNTED_P(variable_ptr);
|
||||
|
||||
+13
-4
@@ -343,6 +343,10 @@ void shutdown_executor(void) /* {{{ */
|
||||
zend_llist_destroy(&CG(open_files));
|
||||
} zend_end_try();
|
||||
|
||||
zend_try {
|
||||
clean_non_persistent_constants();
|
||||
} zend_end_try();
|
||||
|
||||
zend_try {
|
||||
zend_close_rsrc_list(&EG(regular_list));
|
||||
} zend_end_try();
|
||||
@@ -374,10 +378,6 @@ void shutdown_executor(void) /* {{{ */
|
||||
}
|
||||
} zend_end_try();
|
||||
|
||||
zend_try {
|
||||
clean_non_persistent_constants();
|
||||
} zend_end_try();
|
||||
|
||||
zend_try {
|
||||
#if 0&&ZEND_DEBUG
|
||||
signal(SIGSEGV, original_sigsegv_handler);
|
||||
@@ -755,6 +755,15 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache) /
|
||||
}
|
||||
zend_error(E_DEPRECATED, "%s", error);
|
||||
efree(error);
|
||||
if (UNEXPECTED(EG(exception))) {
|
||||
if (callable_name) {
|
||||
zend_string_release(callable_name);
|
||||
}
|
||||
if (EG(current_execute_data) == &dummy_execute_data) {
|
||||
EG(current_execute_data) = dummy_execute_data.prev_execute_data;
|
||||
}
|
||||
return FAILURE;
|
||||
}
|
||||
}
|
||||
zend_string_release(callable_name);
|
||||
}
|
||||
|
||||
+74
-52
@@ -25,26 +25,12 @@
|
||||
/* one (0) is reserved */
|
||||
#define GC_ROOT_BUFFER_MAX_ENTRIES 10001
|
||||
|
||||
#define GC_FAKE_BUFFER_FLAG 0x80
|
||||
#define GC_TYPE_MASK 0x7f
|
||||
|
||||
#define GC_HAS_DESTRUCTORS (1<<0)
|
||||
|
||||
#ifndef ZEND_GC_DEBUG
|
||||
# define ZEND_GC_DEBUG 0
|
||||
#endif
|
||||
|
||||
#define GC_NUM_ADDITIONAL_ENTRIES \
|
||||
((4096 - ZEND_MM_OVERHEAD - sizeof(void*) * 2) / sizeof(gc_root_buffer))
|
||||
|
||||
typedef struct _gc_addtional_bufer gc_additional_buffer;
|
||||
|
||||
struct _gc_addtional_bufer {
|
||||
uint32_t used;
|
||||
gc_additional_buffer *next;
|
||||
gc_root_buffer buf[GC_NUM_ADDITIONAL_ENTRIES];
|
||||
};
|
||||
|
||||
#ifdef ZTS
|
||||
ZEND_API int gc_globals_id;
|
||||
#else
|
||||
@@ -53,9 +39,6 @@ ZEND_API zend_gc_globals gc_globals;
|
||||
|
||||
ZEND_API int (*gc_collect_cycles)(void);
|
||||
|
||||
#define GC_REMOVE_FROM_ROOTS(current) \
|
||||
gc_remove_from_roots((current))
|
||||
|
||||
#if ZEND_GC_DEBUG > 1
|
||||
# define GC_TRACE(format, ...) fprintf(stderr, format "\n", ##__VA_ARGS__);
|
||||
# define GC_TRACE_REF(ref, format, ...) \
|
||||
@@ -123,6 +106,12 @@ static zend_always_inline void gc_remove_from_roots(gc_root_buffer *root)
|
||||
GC_BENCH_DEC(root_buf_length);
|
||||
}
|
||||
|
||||
static zend_always_inline void gc_remove_from_additional_roots(gc_root_buffer *root)
|
||||
{
|
||||
root->next->prev = root->prev;
|
||||
root->prev->next = root->next;
|
||||
}
|
||||
|
||||
static void root_buffer_dtor(zend_gc_globals *gc_globals)
|
||||
{
|
||||
if (gc_globals->buf) {
|
||||
@@ -149,6 +138,8 @@ static void gc_globals_ctor_ex(zend_gc_globals *gc_globals)
|
||||
gc_globals->gc_runs = 0;
|
||||
gc_globals->collected = 0;
|
||||
|
||||
gc_globals->additional_buffer = NULL;
|
||||
|
||||
#if GC_BENCH
|
||||
gc_globals->root_buf_length = 0;
|
||||
gc_globals->root_buf_peak = 0;
|
||||
@@ -204,6 +195,8 @@ ZEND_API void gc_reset(void)
|
||||
GC_G(first_unused) = NULL;
|
||||
GC_G(last_unused) = NULL;
|
||||
}
|
||||
|
||||
GC_G(additional_buffer) = NULL;
|
||||
}
|
||||
|
||||
ZEND_API void gc_init(void)
|
||||
@@ -276,21 +269,45 @@ ZEND_API void ZEND_FASTCALL gc_possible_root(zend_refcounted *ref)
|
||||
GC_BENCH_PEAK(root_buf_peak, root_buf_length);
|
||||
}
|
||||
|
||||
static zend_always_inline gc_root_buffer* gc_find_additional_buffer(zend_refcounted *ref)
|
||||
{
|
||||
gc_additional_buffer *additional_buffer = GC_G(additional_buffer);
|
||||
|
||||
/* We have to check each additional_buffer to find which one holds the ref */
|
||||
while (additional_buffer) {
|
||||
uint32_t idx = GC_ADDRESS(GC_INFO(ref)) - GC_ROOT_BUFFER_MAX_ENTRIES;
|
||||
if (idx < additional_buffer->used) {
|
||||
gc_root_buffer *root = additional_buffer->buf + idx;
|
||||
if (root->ref == ref) {
|
||||
return root;
|
||||
}
|
||||
}
|
||||
additional_buffer = additional_buffer->next;
|
||||
}
|
||||
|
||||
ZEND_ASSERT(0);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
ZEND_API void ZEND_FASTCALL gc_remove_from_buffer(zend_refcounted *ref)
|
||||
{
|
||||
gc_root_buffer *root;
|
||||
|
||||
ZEND_ASSERT(GC_ADDRESS(GC_INFO(ref)));
|
||||
ZEND_ASSERT(GC_ADDRESS(GC_INFO(ref)) < GC_ROOT_BUFFER_MAX_ENTRIES);
|
||||
|
||||
GC_BENCH_INC(zval_remove_from_buffer);
|
||||
|
||||
root = GC_G(buf) + GC_ADDRESS(GC_INFO(ref));
|
||||
if (EXPECTED(GC_ADDRESS(GC_INFO(ref)) < GC_ROOT_BUFFER_MAX_ENTRIES)) {
|
||||
root = GC_G(buf) + GC_ADDRESS(GC_INFO(ref));
|
||||
gc_remove_from_roots(root);
|
||||
} else {
|
||||
root = gc_find_additional_buffer(ref);
|
||||
gc_remove_from_additional_roots(root);
|
||||
}
|
||||
if (GC_REF_GET_COLOR(ref) != GC_BLACK) {
|
||||
GC_TRACE_SET_COLOR(ref, GC_PURPLE);
|
||||
}
|
||||
GC_INFO(ref) = 0;
|
||||
GC_REMOVE_FROM_ROOTS(root);
|
||||
|
||||
/* updete next root that is going to be freed */
|
||||
if (GC_G(next_to_free) == root) {
|
||||
@@ -641,7 +658,7 @@ static void gc_scan_roots(void)
|
||||
}
|
||||
}
|
||||
|
||||
static void gc_add_garbage(zend_refcounted *ref, gc_additional_buffer **additional_buffer)
|
||||
static void gc_add_garbage(zend_refcounted *ref)
|
||||
{
|
||||
gc_root_buffer *buf = GC_G(unused);
|
||||
|
||||
@@ -664,25 +681,23 @@ static void gc_add_garbage(zend_refcounted *ref, gc_additional_buffer **addition
|
||||
#endif
|
||||
} else {
|
||||
/* If we don't have free slots in the buffer, allocate a new one and
|
||||
* set it's address to GC_ROOT_BUFFER_MAX_ENTRIES that have special
|
||||
* set it's address above GC_ROOT_BUFFER_MAX_ENTRIES that have special
|
||||
* meaning.
|
||||
*/
|
||||
if (!*additional_buffer || (*additional_buffer)->used == GC_NUM_ADDITIONAL_ENTRIES) {
|
||||
if (!GC_G(additional_buffer) || GC_G(additional_buffer)->used == GC_NUM_ADDITIONAL_ENTRIES) {
|
||||
gc_additional_buffer *new_buffer = emalloc(sizeof(gc_additional_buffer));
|
||||
new_buffer->used = 0;
|
||||
new_buffer->next = *additional_buffer;
|
||||
*additional_buffer = new_buffer;
|
||||
new_buffer->next = GC_G(additional_buffer);
|
||||
GC_G(additional_buffer) = new_buffer;
|
||||
}
|
||||
buf = (*additional_buffer)->buf + (*additional_buffer)->used;
|
||||
(*additional_buffer)->used++;
|
||||
buf = GC_G(additional_buffer)->buf + GC_G(additional_buffer)->used;
|
||||
#if 1
|
||||
/* optimization: color is already GC_BLACK (0) */
|
||||
GC_INFO(ref) = GC_ROOT_BUFFER_MAX_ENTRIES;
|
||||
GC_INFO(ref) = GC_ROOT_BUFFER_MAX_ENTRIES + GC_G(additional_buffer)->used;
|
||||
#else
|
||||
GC_REF_SET_ADDRESS(ref, GC_ROOT_BUFFER_MAX_ENTRIES);
|
||||
GC_REF_SET_ADDRESS(ref, GC_ROOT_BUFFER_MAX_ENTRIES) + GC_G(additional_buffer)->used;
|
||||
#endif
|
||||
/* modify type to prevent indirect destruction */
|
||||
GC_TYPE(ref) |= GC_FAKE_BUFFER_FLAG;
|
||||
GC_G(additional_buffer)->used++;
|
||||
}
|
||||
if (buf) {
|
||||
GC_REFCOUNT(ref)++;
|
||||
@@ -694,7 +709,7 @@ static void gc_add_garbage(zend_refcounted *ref, gc_additional_buffer **addition
|
||||
}
|
||||
}
|
||||
|
||||
static int gc_collect_white(zend_refcounted *ref, uint32_t *flags, gc_additional_buffer **additional_buffer)
|
||||
static int gc_collect_white(zend_refcounted *ref, uint32_t *flags)
|
||||
{
|
||||
int count = 0;
|
||||
HashTable *ht;
|
||||
@@ -727,7 +742,7 @@ tail_call:
|
||||
#else
|
||||
if (!GC_ADDRESS(GC_INFO(ref))) {
|
||||
#endif
|
||||
gc_add_garbage(ref, additional_buffer);
|
||||
gc_add_garbage(ref);
|
||||
}
|
||||
if (obj->handlers->dtor_obj &&
|
||||
((obj->handlers->dtor_obj != zend_objects_destroy_object) ||
|
||||
@@ -751,7 +766,7 @@ tail_call:
|
||||
if (Z_REFCOUNTED_P(zv)) {
|
||||
ref = Z_COUNTED_P(zv);
|
||||
GC_REFCOUNT(ref)++;
|
||||
count += gc_collect_white(ref, flags, additional_buffer);
|
||||
count += gc_collect_white(ref, flags);
|
||||
/* count non-refcounted for compatibility ??? */
|
||||
} else if (Z_TYPE_P(zv) != IS_UNDEF) {
|
||||
count++;
|
||||
@@ -773,7 +788,7 @@ tail_call:
|
||||
#else
|
||||
if (!GC_ADDRESS(GC_INFO(ref))) {
|
||||
#endif
|
||||
gc_add_garbage(ref, additional_buffer);
|
||||
gc_add_garbage(ref);
|
||||
}
|
||||
ht = (zend_array*)ref;
|
||||
} else if (GC_TYPE(ref) == IS_REFERENCE) {
|
||||
@@ -813,7 +828,7 @@ tail_call:
|
||||
if (Z_REFCOUNTED_P(zv)) {
|
||||
ref = Z_COUNTED_P(zv);
|
||||
GC_REFCOUNT(ref)++;
|
||||
count += gc_collect_white(ref, flags, additional_buffer);
|
||||
count += gc_collect_white(ref, flags);
|
||||
/* count non-refcounted for compatibility ??? */
|
||||
} else if (Z_TYPE_P(zv) != IS_UNDEF) {
|
||||
count++;
|
||||
@@ -831,7 +846,7 @@ tail_call:
|
||||
return count;
|
||||
}
|
||||
|
||||
static int gc_collect_roots(uint32_t *flags, gc_additional_buffer **additional_buffer)
|
||||
static int gc_collect_roots(uint32_t *flags)
|
||||
{
|
||||
int count = 0;
|
||||
gc_root_buffer *current = GC_G(roots).next;
|
||||
@@ -840,8 +855,12 @@ static int gc_collect_roots(uint32_t *flags, gc_additional_buffer **additional_b
|
||||
while (current != &GC_G(roots)) {
|
||||
gc_root_buffer *next = current->next;
|
||||
if (GC_REF_GET_COLOR(current->ref) == GC_BLACK) {
|
||||
if (EXPECTED(GC_ADDRESS(GC_INFO(current->ref)) < GC_ROOT_BUFFER_MAX_ENTRIES)) {
|
||||
gc_remove_from_roots(current);
|
||||
} else {
|
||||
gc_remove_from_additional_roots(current);
|
||||
}
|
||||
GC_INFO(current->ref) = 0; /* reset GC_ADDRESS() and keep GC_BLACK */
|
||||
GC_REMOVE_FROM_ROOTS(current);
|
||||
}
|
||||
current = next;
|
||||
}
|
||||
@@ -850,7 +869,7 @@ static int gc_collect_roots(uint32_t *flags, gc_additional_buffer **additional_b
|
||||
while (current != &GC_G(roots)) {
|
||||
GC_REFCOUNT(current->ref)++;
|
||||
if (GC_REF_GET_COLOR(current->ref) == GC_WHITE) {
|
||||
count += gc_collect_white(current->ref, flags, additional_buffer);
|
||||
count += gc_collect_white(current->ref, flags);
|
||||
}
|
||||
current = current->next;
|
||||
}
|
||||
@@ -886,13 +905,16 @@ static void gc_remove_nested_data_from_buffer(zend_refcounted *ref, gc_root_buff
|
||||
tail_call:
|
||||
if (root ||
|
||||
(GC_ADDRESS(GC_INFO(ref)) != 0 &&
|
||||
GC_REF_GET_COLOR(ref) == GC_BLACK &&
|
||||
GC_ADDRESS(GC_INFO(ref)) != GC_ROOT_BUFFER_MAX_ENTRIES)) {
|
||||
GC_REF_GET_COLOR(ref) == GC_BLACK)) {
|
||||
GC_TRACE_REF(ref, "removing from buffer");
|
||||
GC_REFCOUNT(ref)--;
|
||||
if (root) {
|
||||
if (EXPECTED(GC_ADDRESS(GC_INFO(root->ref)) < GC_ROOT_BUFFER_MAX_ENTRIES)) {
|
||||
gc_remove_from_roots(root);
|
||||
} else {
|
||||
gc_remove_from_additional_roots(root);
|
||||
}
|
||||
GC_INFO(ref) = 0;
|
||||
GC_REMOVE_FROM_ROOTS(root);
|
||||
root = NULL;
|
||||
} else {
|
||||
GC_REMOVE_FROM_BUFFER(ref);
|
||||
@@ -986,7 +1008,7 @@ ZEND_API int zend_gc_collect_cycles(void)
|
||||
zend_refcounted *p;
|
||||
gc_root_buffer to_free;
|
||||
uint32_t gc_flags = 0;
|
||||
gc_additional_buffer *additional_buffer;
|
||||
gc_additional_buffer *additional_buffer_snapshot;
|
||||
#if ZEND_GC_DEBUG
|
||||
zend_bool orig_gc_full;
|
||||
#endif
|
||||
@@ -1010,8 +1032,8 @@ ZEND_API int zend_gc_collect_cycles(void)
|
||||
#endif
|
||||
|
||||
GC_TRACE("Collecting roots");
|
||||
additional_buffer = NULL;
|
||||
count = gc_collect_roots(&gc_flags, &additional_buffer);
|
||||
additional_buffer_snapshot = GC_G(additional_buffer);
|
||||
count = gc_collect_roots(&gc_flags);
|
||||
#if ZEND_GC_DEBUG
|
||||
GC_G(gc_full) = orig_gc_full;
|
||||
#endif
|
||||
@@ -1055,7 +1077,7 @@ ZEND_API int zend_gc_collect_cycles(void)
|
||||
while (current != &to_free) {
|
||||
p = current->ref;
|
||||
GC_G(next_to_free) = current->next;
|
||||
if ((GC_TYPE(p) & GC_TYPE_MASK) == IS_OBJECT) {
|
||||
if (GC_TYPE(p) == IS_OBJECT) {
|
||||
zend_object *obj = (zend_object*)p;
|
||||
|
||||
if (IS_OBJ_VALID(EG(objects_store).object_buckets[obj->handle]) &&
|
||||
@@ -1092,7 +1114,7 @@ ZEND_API int zend_gc_collect_cycles(void)
|
||||
p = current->ref;
|
||||
GC_G(next_to_free) = current->next;
|
||||
GC_TRACE_REF(p, "destroying");
|
||||
if ((GC_TYPE(p) & GC_TYPE_MASK) == IS_OBJECT) {
|
||||
if (GC_TYPE(p) == IS_OBJECT) {
|
||||
zend_object *obj = (zend_object*)p;
|
||||
|
||||
if (EG(objects_store).object_buckets &&
|
||||
@@ -1111,7 +1133,7 @@ ZEND_API int zend_gc_collect_cycles(void)
|
||||
EG(objects_store).free_list_head = obj->handle;
|
||||
p = current->ref = (zend_refcounted*)(((char*)obj) - obj->handlers->offset);
|
||||
}
|
||||
} else if ((GC_TYPE(p) & GC_TYPE_MASK) == IS_ARRAY) {
|
||||
} else if (GC_TYPE(p) == IS_ARRAY) {
|
||||
zend_array *arr = (zend_array*)p;
|
||||
|
||||
GC_TYPE(arr) = IS_NULL;
|
||||
@@ -1133,10 +1155,10 @@ ZEND_API int zend_gc_collect_cycles(void)
|
||||
current = next;
|
||||
}
|
||||
|
||||
while (additional_buffer != NULL) {
|
||||
gc_additional_buffer *next = additional_buffer->next;
|
||||
efree(additional_buffer);
|
||||
additional_buffer = next;
|
||||
while (GC_G(additional_buffer) != additional_buffer_snapshot) {
|
||||
gc_additional_buffer *next = GC_G(additional_buffer)->next;
|
||||
efree(GC_G(additional_buffer));
|
||||
GC_G(additional_buffer) = next;
|
||||
}
|
||||
|
||||
GC_TRACE("Collection finished");
|
||||
|
||||
@@ -67,6 +67,17 @@ typedef struct _gc_root_buffer {
|
||||
uint32_t refcount;
|
||||
} gc_root_buffer;
|
||||
|
||||
#define GC_NUM_ADDITIONAL_ENTRIES \
|
||||
((4096 - ZEND_MM_OVERHEAD - sizeof(void*) * 2) / sizeof(gc_root_buffer))
|
||||
|
||||
typedef struct _gc_additional_bufer gc_additional_buffer;
|
||||
|
||||
struct _gc_additional_bufer {
|
||||
uint32_t used;
|
||||
gc_additional_buffer *next;
|
||||
gc_root_buffer buf[GC_NUM_ADDITIONAL_ENTRIES];
|
||||
};
|
||||
|
||||
typedef struct _zend_gc_globals {
|
||||
zend_bool gc_enabled;
|
||||
zend_bool gc_active;
|
||||
@@ -93,6 +104,8 @@ typedef struct _zend_gc_globals {
|
||||
uint32_t zval_marked_grey;
|
||||
#endif
|
||||
|
||||
gc_additional_buffer *additional_buffer;
|
||||
|
||||
} zend_gc_globals;
|
||||
|
||||
#ifdef ZTS
|
||||
|
||||
@@ -644,15 +644,13 @@ failure:
|
||||
|
||||
ZEND_API void zend_generator_resume(zend_generator *orig_generator) /* {{{ */
|
||||
{
|
||||
zend_generator *generator;
|
||||
zend_generator *generator = zend_generator_get_current(orig_generator);
|
||||
|
||||
/* The generator is already closed, thus can't resume */
|
||||
if (UNEXPECTED(!orig_generator->execute_data)) {
|
||||
if (UNEXPECTED(!generator->execute_data)) {
|
||||
return;
|
||||
}
|
||||
|
||||
generator = zend_generator_get_current(orig_generator);
|
||||
|
||||
try_again:
|
||||
if (generator->flags & ZEND_GENERATOR_CURRENTLY_RUNNING) {
|
||||
zend_throw_error(NULL, "Cannot resume an already running generator");
|
||||
|
||||
@@ -291,7 +291,6 @@ static uint32_t zend_array_recalc_elements(HashTable *ht)
|
||||
uint32_t num = ht->nNumOfElements;
|
||||
|
||||
ZEND_HASH_FOREACH_VAL(ht, val) {
|
||||
if (Z_TYPE_P(val) == IS_UNDEF) continue;
|
||||
if (Z_TYPE_P(val) == IS_INDIRECT) {
|
||||
if (UNEXPECTED(Z_TYPE_P(Z_INDIRECT_P(val)) == IS_UNDEF)) {
|
||||
num--;
|
||||
|
||||
@@ -310,6 +310,16 @@ static zend_always_inline int zend_hash_str_exists_ind(const HashTable *ht, cons
|
||||
Z_TYPE_P(Z_INDIRECT_P(zv)) != IS_UNDEF);
|
||||
}
|
||||
|
||||
static zend_always_inline zval *zend_symbtable_add_new(HashTable *ht, zend_string *key, zval *pData)
|
||||
{
|
||||
zend_ulong idx;
|
||||
|
||||
if (ZEND_HANDLE_NUMERIC(key, idx)) {
|
||||
return zend_hash_index_add_new(ht, idx, pData);
|
||||
} else {
|
||||
return zend_hash_add_new(ht, key, pData);
|
||||
}
|
||||
}
|
||||
|
||||
static zend_always_inline zval *zend_symtable_update(HashTable *ht, zend_string *key, zval *pData)
|
||||
{
|
||||
|
||||
@@ -55,7 +55,7 @@ static void zend_ini_do_op(char type, zval *result, zval *op1, zval *op2)
|
||||
int i_result;
|
||||
int i_op1, i_op2;
|
||||
int str_len;
|
||||
char str_result[MAX_LENGTH_OF_LONG];
|
||||
char str_result[MAX_LENGTH_OF_LONG+1];
|
||||
|
||||
i_op1 = atoi(Z_STRVAL_P(op1));
|
||||
zend_string_free(Z_STR_P(op1));
|
||||
|
||||
+592
-571
File diff suppressed because it is too large.
Load diff
@@ -1155,7 +1155,8 @@ NEWLINE ("\r"|"\n"|"\r\n")
|
||||
RETURN_TOKEN(T_RETURN);
|
||||
}
|
||||
|
||||
<ST_IN_SCRIPTING>"yield"{WHITESPACE}"from" {
|
||||
<ST_IN_SCRIPTING>"yield"{WHITESPACE}"from"[^a-zA-Z0-9_\x80-\xff] {
|
||||
yyless(yyleng - 1);
|
||||
HANDLE_NEWLINES(yytext, yyleng);
|
||||
RETURN_TOKEN(T_YIELD_FROM);
|
||||
}
|
||||
@@ -1675,7 +1676,6 @@ NEWLINE ("\r"|"\n"|"\r\n")
|
||||
if (errno == ERANGE) { /* Overflow */
|
||||
errno = 0;
|
||||
if (yytext[0] == '0') { /* octal overflow */
|
||||
errno = 0;
|
||||
ZVAL_DOUBLE(zendlval, zend_oct_strtod(yytext, (const char **)&end));
|
||||
} else {
|
||||
ZVAL_DOUBLE(zendlval, zend_strtod(yytext, (const char **)&end));
|
||||
@@ -1687,7 +1687,6 @@ NEWLINE ("\r"|"\n"|"\r\n")
|
||||
ZVAL_UNDEF(zendlval);
|
||||
RETURN_TOKEN(T_DNUMBER);
|
||||
}
|
||||
ZEND_ASSERT(!errno);
|
||||
RETURN_TOKEN(T_DNUMBER);
|
||||
}
|
||||
/* Also not an assert for the same reason */
|
||||
|
||||
@@ -122,11 +122,13 @@ struct _zend_module_dep {
|
||||
unsigned char type; /* dependency type */
|
||||
};
|
||||
|
||||
BEGIN_EXTERN_C()
|
||||
extern ZEND_API HashTable module_registry;
|
||||
|
||||
void module_destructor(zend_module_entry *module);
|
||||
int module_registry_request_startup(zend_module_entry *module);
|
||||
int module_registry_unload_temp(const zend_module_entry *module);
|
||||
END_EXTERN_C()
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -155,12 +155,12 @@ struct _zend_object_handlers {
|
||||
zend_object_compare_zvals_t compare;
|
||||
};
|
||||
|
||||
BEGIN_EXTERN_C()
|
||||
extern ZEND_API zend_object_handlers std_object_handlers;
|
||||
|
||||
#define zend_get_function_root_class(fbc) \
|
||||
((fbc)->common.prototype ? (fbc)->common.prototype->common.scope : (fbc)->common.scope)
|
||||
|
||||
BEGIN_EXTERN_C()
|
||||
ZEND_API union _zend_function *zend_std_get_static_method(zend_class_entry *ce, zend_string *function_name_strval, const zval *key);
|
||||
ZEND_API zval *zend_std_get_static_property(zend_class_entry *ce, zend_string *property_name, zend_bool silent);
|
||||
ZEND_API ZEND_COLD zend_bool zend_std_unset_static_property(zend_class_entry *ce, zend_string *property_name);
|
||||
|
||||
+48
-19
@@ -926,8 +926,13 @@ ZEND_API int ZEND_FASTCALL add_function(zval *result, zval *op1, zval *op2) /* {
|
||||
} else if (!converted) {
|
||||
ZEND_TRY_BINARY_OBJECT_OPERATION(ZEND_ADD, add_function);
|
||||
|
||||
zendi_convert_scalar_to_number(op1, op1_copy, result);
|
||||
zendi_convert_scalar_to_number(op2, op2_copy, result);
|
||||
if (EXPECTED(op1 != op2)) {
|
||||
zendi_convert_scalar_to_number(op1, op1_copy, result);
|
||||
zendi_convert_scalar_to_number(op2, op2_copy, result);
|
||||
} else {
|
||||
zendi_convert_scalar_to_number(op1, op1_copy, result);
|
||||
op2 = op1;
|
||||
}
|
||||
converted = 1;
|
||||
} else {
|
||||
zend_throw_error(NULL, "Unsupported operand types");
|
||||
@@ -979,8 +984,13 @@ ZEND_API int ZEND_FASTCALL sub_function(zval *result, zval *op1, zval *op2) /* {
|
||||
} else if (!converted) {
|
||||
ZEND_TRY_BINARY_OBJECT_OPERATION(ZEND_SUB, sub_function);
|
||||
|
||||
zendi_convert_scalar_to_number(op1, op1_copy, result);
|
||||
zendi_convert_scalar_to_number(op2, op2_copy, result);
|
||||
if (EXPECTED(op1 != op2)) {
|
||||
zendi_convert_scalar_to_number(op1, op1_copy, result);
|
||||
zendi_convert_scalar_to_number(op2, op2_copy, result);
|
||||
} else {
|
||||
zendi_convert_scalar_to_number(op1, op1_copy, result);
|
||||
op2 = op1;
|
||||
}
|
||||
converted = 1;
|
||||
} else {
|
||||
zend_throw_error(NULL, "Unsupported operand types");
|
||||
@@ -1026,8 +1036,13 @@ ZEND_API int ZEND_FASTCALL mul_function(zval *result, zval *op1, zval *op2) /* {
|
||||
} else if (!converted) {
|
||||
ZEND_TRY_BINARY_OBJECT_OPERATION(ZEND_MUL, mul_function);
|
||||
|
||||
zendi_convert_scalar_to_number(op1, op1_copy, result);
|
||||
zendi_convert_scalar_to_number(op2, op2_copy, result);
|
||||
if (EXPECTED(op1 != op2)) {
|
||||
zendi_convert_scalar_to_number(op1, op1_copy, result);
|
||||
zendi_convert_scalar_to_number(op2, op2_copy, result);
|
||||
} else {
|
||||
zendi_convert_scalar_to_number(op1, op1_copy, result);
|
||||
op2 = op1;
|
||||
}
|
||||
converted = 1;
|
||||
} else {
|
||||
zend_throw_error(NULL, "Unsupported operand types");
|
||||
@@ -1104,17 +1119,27 @@ ZEND_API int ZEND_FASTCALL pow_function(zval *result, zval *op1, zval *op2) /* {
|
||||
} else if (!converted) {
|
||||
ZEND_TRY_BINARY_OBJECT_OPERATION(ZEND_POW, pow_function);
|
||||
|
||||
if (Z_TYPE_P(op1) == IS_ARRAY) {
|
||||
ZVAL_LONG(result, 0);
|
||||
return SUCCESS;
|
||||
if (EXPECTED(op1 != op2)) {
|
||||
if (Z_TYPE_P(op1) == IS_ARRAY) {
|
||||
ZVAL_LONG(result, 0);
|
||||
return SUCCESS;
|
||||
} else {
|
||||
zendi_convert_scalar_to_number(op1, op1_copy, result);
|
||||
}
|
||||
if (Z_TYPE_P(op2) == IS_ARRAY) {
|
||||
ZVAL_LONG(result, 1L);
|
||||
return SUCCESS;
|
||||
} else {
|
||||
zendi_convert_scalar_to_number(op2, op2_copy, result);
|
||||
}
|
||||
} else {
|
||||
zendi_convert_scalar_to_number(op1, op1_copy, result);
|
||||
}
|
||||
if (Z_TYPE_P(op2) == IS_ARRAY) {
|
||||
ZVAL_LONG(result, 1L);
|
||||
return SUCCESS;
|
||||
} else {
|
||||
zendi_convert_scalar_to_number(op2, op2_copy, result);
|
||||
if (Z_TYPE_P(op1) == IS_ARRAY) {
|
||||
ZVAL_LONG(result, 0);
|
||||
return SUCCESS;
|
||||
} else {
|
||||
zendi_convert_scalar_to_number(op1, op1_copy, result);
|
||||
}
|
||||
op2 = op1;
|
||||
}
|
||||
converted = 1;
|
||||
} else {
|
||||
@@ -1178,9 +1203,13 @@ ZEND_API int ZEND_FASTCALL div_function(zval *result, zval *op1, zval *op2) /* {
|
||||
op2 = Z_REFVAL_P(op2);
|
||||
} else if (!converted) {
|
||||
ZEND_TRY_BINARY_OBJECT_OPERATION(ZEND_DIV, div_function);
|
||||
|
||||
zendi_convert_scalar_to_number(op1, op1_copy, result);
|
||||
zendi_convert_scalar_to_number(op2, op2_copy, result);
|
||||
if (EXPECTED(op1 != op2)) {
|
||||
zendi_convert_scalar_to_number(op1, op1_copy, result);
|
||||
zendi_convert_scalar_to_number(op2, op2_copy, result);
|
||||
} else {
|
||||
zendi_convert_scalar_to_number(op1, op1_copy, result);
|
||||
op2 = op1;
|
||||
}
|
||||
converted = 1;
|
||||
} else {
|
||||
zend_throw_error(NULL, "Unsupported operand types");
|
||||
|
||||
+14
-6
@@ -131,6 +131,12 @@
|
||||
|
||||
#if defined(HAVE_LIBDL) && !defined(ZEND_WIN32)
|
||||
|
||||
# if defined(__has_feature)
|
||||
# if __has_feature(address_sanitizer)
|
||||
# define __SANITIZE_ADDRESS__
|
||||
# endif
|
||||
# endif
|
||||
|
||||
# ifndef RTLD_LAZY
|
||||
# define RTLD_LAZY 1 /* Solaris 1, FreeBSD's (2.1.7.1 and older) */
|
||||
# endif
|
||||
@@ -141,7 +147,7 @@
|
||||
|
||||
# if defined(RTLD_GROUP) && defined(RTLD_WORLD) && defined(RTLD_PARENT)
|
||||
# define DL_LOAD(libname) dlopen(libname, RTLD_LAZY | RTLD_GLOBAL | RTLD_GROUP | RTLD_WORLD | RTLD_PARENT)
|
||||
# elif defined(RTLD_DEEPBIND)
|
||||
# elif defined(RTLD_DEEPBIND) && !defined(__SANITIZE_ADDRESS__)
|
||||
# define DL_LOAD(libname) dlopen(libname, RTLD_LAZY | RTLD_GLOBAL | RTLD_DEEPBIND)
|
||||
# else
|
||||
# define DL_LOAD(libname) dlopen(libname, RTLD_LAZY | RTLD_GLOBAL)
|
||||
@@ -239,11 +245,13 @@ char *alloca();
|
||||
# define ZEND_FASTCALL
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__) && ZEND_GCC_VERSION >= 3004
|
||||
#else
|
||||
# define __restrict__
|
||||
#ifndef restrict
|
||||
# if defined(__GNUC__) && ZEND_GCC_VERSION >= 3004
|
||||
# else
|
||||
# define __restrict__
|
||||
# endif
|
||||
# define restrict __restrict__
|
||||
#endif
|
||||
#define restrict __restrict__
|
||||
|
||||
#if (defined(__GNUC__) && __GNUC__ >= 3 && !defined(__INTEL_COMPILER) && !defined(DARWIN) && !defined(__hpux) && !defined(_AIX) && !defined(__osf__)) || __has_attribute(noreturn)
|
||||
# define HAVE_NORETURN
|
||||
@@ -425,7 +433,7 @@ char *alloca();
|
||||
#define ZEND_STRL(str) (str), (sizeof(str)-1)
|
||||
#define ZEND_STRS(str) (str), (sizeof(str))
|
||||
#define ZEND_NORMALIZE_BOOL(n) \
|
||||
((n) ? (((n)>0) ? 1 : -1) : 0)
|
||||
((n) ? (((n)<0) ? -1 : 1) : 0)
|
||||
#define ZEND_TRUTH(x) ((x) ? 1 : 0)
|
||||
#define ZEND_LOG_XOR(a, b) (ZEND_TRUTH(a) ^ ZEND_TRUTH(b))
|
||||
|
||||
|
||||
+14
-2
@@ -74,12 +74,17 @@ void zend_signal_handler_defer(int signo, siginfo_t *siginfo, void *context)
|
||||
{
|
||||
int errno_save = errno;
|
||||
zend_signal_queue_t *queue, *qtmp;
|
||||
zend_bool is_handling_safe = 1;
|
||||
|
||||
#ifdef ZTS
|
||||
ZEND_TSRMLS_CACHE_UPDATE();
|
||||
/* A signal could hit after TSRM shutdown, in this case globals are already freed. */
|
||||
if (NULL == TSRMLS_CACHE || NULL == TSRMG_BULK_STATIC(zend_signal_globals_id, zend_signal_globals_t *)) {
|
||||
is_handling_safe = 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (EXPECTED(SIGG(active))) {
|
||||
if (EXPECTED(is_handling_safe && SIGG(active))) {
|
||||
if (UNEXPECTED(SIGG(depth) == 0)) { /* try to handle signal */
|
||||
if (UNEXPECTED(SIGG(blocked))) {
|
||||
SIGG(blocked) = 0;
|
||||
@@ -162,7 +167,14 @@ static void zend_signal_handler(int signo, siginfo_t *siginfo, void *context)
|
||||
int errno_save = errno;
|
||||
struct sigaction sa = {{0}};
|
||||
sigset_t sigset;
|
||||
zend_signal_entry_t p_sig = SIGG(handlers)[signo-1];
|
||||
zend_signal_entry_t p_sig;
|
||||
#ifdef ZTS
|
||||
if (NULL == TSRMLS_CACHE || NULL == TSRMG_BULK_STATIC(zend_signal_globals_id, zend_signal_globals_t *)) {
|
||||
p_sig.flags = 0;
|
||||
p_sig.handler = SIG_DFL;
|
||||
} else
|
||||
#endif
|
||||
p_sig = SIGG(handlers)[signo-1];
|
||||
|
||||
if (p_sig.handler == SIG_DFL) { /* raise default handler */
|
||||
if (sigaction(signo, NULL, &sa) == 0) {
|
||||
|
||||
@@ -72,6 +72,10 @@ typedef unsigned long int uint32_t;
|
||||
#define NO_INFNAN_CHECK
|
||||
#endif
|
||||
|
||||
#ifndef NO_ERRNO
|
||||
#define NO_ERRNO
|
||||
#endif
|
||||
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
#define IEEE_BIG_ENDIAN 1
|
||||
#else
|
||||
|
||||
+4
-3
@@ -912,9 +912,10 @@ static zend_always_inline uint32_t zval_delref_p(zval* pz) {
|
||||
|
||||
#define SEPARATE_STRING(zv) do { \
|
||||
zval *_zv = (zv); \
|
||||
if (Z_REFCOUNTED_P(_zv) && \
|
||||
Z_REFCOUNT_P(_zv) > 1) { \
|
||||
Z_DELREF_P(_zv); \
|
||||
if (Z_REFCOUNT_P(_zv) > 1) { \
|
||||
if (Z_REFCOUNTED_P(_zv)) { \
|
||||
Z_DELREF_P(_zv); \
|
||||
} \
|
||||
zval_copy_ctor_func(_zv); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
@@ -380,7 +380,7 @@ CWD_API int php_sys_stat_ex(const char *path, zend_stat_t *buf, int lstat) /* {{
|
||||
if ((data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) == 0) {
|
||||
size_t len = strlen(path);
|
||||
|
||||
if (path[len-4] == '.') {
|
||||
if (len >= 4 && path[len-4] == '.') {
|
||||
if (_memicmp(path+len-3, "exe", 3) == 0 ||
|
||||
_memicmp(path+len-3, "com", 3) == 0 ||
|
||||
_memicmp(path+len-3, "bat", 3) == 0 ||
|
||||
|
||||
+21
-9
@@ -1515,9 +1515,13 @@ ZEND_VM_HELPER_EX(zend_fetch_var_address_helper, CONST|TMPVAR|CV, UNUSED|CONST|V
|
||||
|
||||
/* check if static properties were destoyed */
|
||||
if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
FREE_OP1();
|
||||
HANDLE_EXCEPTION();
|
||||
if (type == BP_VAR_IS) {
|
||||
retval = &EG(uninitialized_zval);
|
||||
} else {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
FREE_OP1();
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
}
|
||||
|
||||
ZEND_VM_C_GOTO(fetch_var_return);
|
||||
@@ -1539,15 +1543,19 @@ ZEND_VM_HELPER_EX(zend_fetch_var_address_helper, CONST|TMPVAR|CV, UNUSED|CONST|V
|
||||
|
||||
/* check if static properties were destoyed */
|
||||
if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
FREE_OP1();
|
||||
HANDLE_EXCEPTION();
|
||||
if (type == BP_VAR_IS) {
|
||||
retval = &EG(uninitialized_zval);
|
||||
} else {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
FREE_OP1();
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
}
|
||||
|
||||
ZEND_VM_C_GOTO(fetch_var_return);
|
||||
}
|
||||
}
|
||||
retval = zend_std_get_static_property(ce, name, 0);
|
||||
retval = zend_std_get_static_property(ce, name, type == BP_VAR_IS);
|
||||
if (UNEXPECTED(EG(exception))) {
|
||||
if (OP1_TYPE != IS_CONST) {
|
||||
zend_string_release(name);
|
||||
@@ -1555,8 +1563,12 @@ ZEND_VM_HELPER_EX(zend_fetch_var_address_helper, CONST|TMPVAR|CV, UNUSED|CONST|V
|
||||
FREE_OP1();
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
if (OP1_TYPE == IS_CONST && retval) {
|
||||
CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce, retval);
|
||||
if (EXPECTED(retval)) {
|
||||
if (OP1_TYPE == IS_CONST) {
|
||||
CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce, retval);
|
||||
}
|
||||
} else {
|
||||
retval = &EG(uninitialized_zval);
|
||||
}
|
||||
|
||||
FREE_OP1();
|
||||
|
||||
+177
-69
@@ -5007,9 +5007,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_
|
||||
|
||||
/* check if static properties were destoyed */
|
||||
if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
if (type == BP_VAR_IS) {
|
||||
retval = &EG(uninitialized_zval);
|
||||
} else {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
|
||||
HANDLE_EXCEPTION();
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
}
|
||||
|
||||
goto fetch_var_return;
|
||||
@@ -5031,15 +5035,19 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_
|
||||
|
||||
/* check if static properties were destoyed */
|
||||
if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
if (type == BP_VAR_IS) {
|
||||
retval = &EG(uninitialized_zval);
|
||||
} else {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
|
||||
HANDLE_EXCEPTION();
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
}
|
||||
|
||||
goto fetch_var_return;
|
||||
}
|
||||
}
|
||||
retval = zend_std_get_static_property(ce, name, 0);
|
||||
retval = zend_std_get_static_property(ce, name, type == BP_VAR_IS);
|
||||
if (UNEXPECTED(EG(exception))) {
|
||||
if (IS_CONST != IS_CONST) {
|
||||
zend_string_release(name);
|
||||
@@ -5047,8 +5055,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_
|
||||
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
if (IS_CONST == IS_CONST && retval) {
|
||||
CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce, retval);
|
||||
if (EXPECTED(retval)) {
|
||||
if (IS_CONST == IS_CONST) {
|
||||
CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce, retval);
|
||||
}
|
||||
} else {
|
||||
retval = &EG(uninitialized_zval);
|
||||
}
|
||||
|
||||
} else {
|
||||
@@ -6963,9 +6975,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_
|
||||
|
||||
/* check if static properties were destoyed */
|
||||
if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
if (type == BP_VAR_IS) {
|
||||
retval = &EG(uninitialized_zval);
|
||||
} else {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
|
||||
HANDLE_EXCEPTION();
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
}
|
||||
|
||||
goto fetch_var_return;
|
||||
@@ -6987,15 +7003,19 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_
|
||||
|
||||
/* check if static properties were destoyed */
|
||||
if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
if (type == BP_VAR_IS) {
|
||||
retval = &EG(uninitialized_zval);
|
||||
} else {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
|
||||
HANDLE_EXCEPTION();
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
}
|
||||
|
||||
goto fetch_var_return;
|
||||
}
|
||||
}
|
||||
retval = zend_std_get_static_property(ce, name, 0);
|
||||
retval = zend_std_get_static_property(ce, name, type == BP_VAR_IS);
|
||||
if (UNEXPECTED(EG(exception))) {
|
||||
if (IS_CONST != IS_CONST) {
|
||||
zend_string_release(name);
|
||||
@@ -7003,8 +7023,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_
|
||||
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
if (IS_CONST == IS_CONST && retval) {
|
||||
CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce, retval);
|
||||
if (EXPECTED(retval)) {
|
||||
if (IS_CONST == IS_CONST) {
|
||||
CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce, retval);
|
||||
}
|
||||
} else {
|
||||
retval = &EG(uninitialized_zval);
|
||||
}
|
||||
|
||||
} else {
|
||||
@@ -7469,9 +7493,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_
|
||||
|
||||
/* check if static properties were destoyed */
|
||||
if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
if (type == BP_VAR_IS) {
|
||||
retval = &EG(uninitialized_zval);
|
||||
} else {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
|
||||
HANDLE_EXCEPTION();
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
}
|
||||
|
||||
goto fetch_var_return;
|
||||
@@ -7493,15 +7521,19 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_
|
||||
|
||||
/* check if static properties were destoyed */
|
||||
if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
if (type == BP_VAR_IS) {
|
||||
retval = &EG(uninitialized_zval);
|
||||
} else {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
|
||||
HANDLE_EXCEPTION();
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
}
|
||||
|
||||
goto fetch_var_return;
|
||||
}
|
||||
}
|
||||
retval = zend_std_get_static_property(ce, name, 0);
|
||||
retval = zend_std_get_static_property(ce, name, type == BP_VAR_IS);
|
||||
if (UNEXPECTED(EG(exception))) {
|
||||
if (IS_CONST != IS_CONST) {
|
||||
zend_string_release(name);
|
||||
@@ -7509,8 +7541,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_
|
||||
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
if (IS_CONST == IS_CONST && retval) {
|
||||
CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce, retval);
|
||||
if (EXPECTED(retval)) {
|
||||
if (IS_CONST == IS_CONST) {
|
||||
CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce, retval);
|
||||
}
|
||||
} else {
|
||||
retval = &EG(uninitialized_zval);
|
||||
}
|
||||
|
||||
} else {
|
||||
@@ -31389,9 +31425,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_
|
||||
|
||||
/* check if static properties were destoyed */
|
||||
if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
if (type == BP_VAR_IS) {
|
||||
retval = &EG(uninitialized_zval);
|
||||
} else {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
|
||||
HANDLE_EXCEPTION();
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
}
|
||||
|
||||
goto fetch_var_return;
|
||||
@@ -31413,15 +31453,19 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_
|
||||
|
||||
/* check if static properties were destoyed */
|
||||
if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
if (type == BP_VAR_IS) {
|
||||
retval = &EG(uninitialized_zval);
|
||||
} else {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
|
||||
HANDLE_EXCEPTION();
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
}
|
||||
|
||||
goto fetch_var_return;
|
||||
}
|
||||
}
|
||||
retval = zend_std_get_static_property(ce, name, 0);
|
||||
retval = zend_std_get_static_property(ce, name, type == BP_VAR_IS);
|
||||
if (UNEXPECTED(EG(exception))) {
|
||||
if (IS_CV != IS_CONST) {
|
||||
zend_string_release(name);
|
||||
@@ -31429,8 +31473,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_
|
||||
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
if (IS_CV == IS_CONST && retval) {
|
||||
CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce, retval);
|
||||
if (EXPECTED(retval)) {
|
||||
if (IS_CV == IS_CONST) {
|
||||
CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce, retval);
|
||||
}
|
||||
} else {
|
||||
retval = &EG(uninitialized_zval);
|
||||
}
|
||||
|
||||
} else {
|
||||
@@ -33617,9 +33665,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_
|
||||
|
||||
/* check if static properties were destoyed */
|
||||
if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
if (type == BP_VAR_IS) {
|
||||
retval = &EG(uninitialized_zval);
|
||||
} else {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
|
||||
HANDLE_EXCEPTION();
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
}
|
||||
|
||||
goto fetch_var_return;
|
||||
@@ -33641,15 +33693,19 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_
|
||||
|
||||
/* check if static properties were destoyed */
|
||||
if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
if (type == BP_VAR_IS) {
|
||||
retval = &EG(uninitialized_zval);
|
||||
} else {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
|
||||
HANDLE_EXCEPTION();
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
}
|
||||
|
||||
goto fetch_var_return;
|
||||
}
|
||||
}
|
||||
retval = zend_std_get_static_property(ce, name, 0);
|
||||
retval = zend_std_get_static_property(ce, name, type == BP_VAR_IS);
|
||||
if (UNEXPECTED(EG(exception))) {
|
||||
if (IS_CV != IS_CONST) {
|
||||
zend_string_release(name);
|
||||
@@ -33657,8 +33713,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_
|
||||
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
if (IS_CV == IS_CONST && retval) {
|
||||
CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce, retval);
|
||||
if (EXPECTED(retval)) {
|
||||
if (IS_CV == IS_CONST) {
|
||||
CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce, retval);
|
||||
}
|
||||
} else {
|
||||
retval = &EG(uninitialized_zval);
|
||||
}
|
||||
|
||||
} else {
|
||||
@@ -34565,9 +34625,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_
|
||||
|
||||
/* check if static properties were destoyed */
|
||||
if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
if (type == BP_VAR_IS) {
|
||||
retval = &EG(uninitialized_zval);
|
||||
} else {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
|
||||
HANDLE_EXCEPTION();
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
}
|
||||
|
||||
goto fetch_var_return;
|
||||
@@ -34589,15 +34653,19 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_
|
||||
|
||||
/* check if static properties were destoyed */
|
||||
if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
if (type == BP_VAR_IS) {
|
||||
retval = &EG(uninitialized_zval);
|
||||
} else {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
|
||||
HANDLE_EXCEPTION();
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
}
|
||||
|
||||
goto fetch_var_return;
|
||||
}
|
||||
}
|
||||
retval = zend_std_get_static_property(ce, name, 0);
|
||||
retval = zend_std_get_static_property(ce, name, type == BP_VAR_IS);
|
||||
if (UNEXPECTED(EG(exception))) {
|
||||
if (IS_CV != IS_CONST) {
|
||||
zend_string_release(name);
|
||||
@@ -34605,8 +34673,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_
|
||||
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
if (IS_CV == IS_CONST && retval) {
|
||||
CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce, retval);
|
||||
if (EXPECTED(retval)) {
|
||||
if (IS_CV == IS_CONST) {
|
||||
CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce, retval);
|
||||
}
|
||||
} else {
|
||||
retval = &EG(uninitialized_zval);
|
||||
}
|
||||
|
||||
} else {
|
||||
@@ -41826,9 +41898,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_
|
||||
|
||||
/* check if static properties were destoyed */
|
||||
if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
zval_ptr_dtor_nogc(free_op1);
|
||||
HANDLE_EXCEPTION();
|
||||
if (type == BP_VAR_IS) {
|
||||
retval = &EG(uninitialized_zval);
|
||||
} else {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
zval_ptr_dtor_nogc(free_op1);
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
}
|
||||
|
||||
goto fetch_var_return;
|
||||
@@ -41850,15 +41926,19 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_
|
||||
|
||||
/* check if static properties were destoyed */
|
||||
if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
zval_ptr_dtor_nogc(free_op1);
|
||||
HANDLE_EXCEPTION();
|
||||
if (type == BP_VAR_IS) {
|
||||
retval = &EG(uninitialized_zval);
|
||||
} else {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
zval_ptr_dtor_nogc(free_op1);
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
}
|
||||
|
||||
goto fetch_var_return;
|
||||
}
|
||||
}
|
||||
retval = zend_std_get_static_property(ce, name, 0);
|
||||
retval = zend_std_get_static_property(ce, name, type == BP_VAR_IS);
|
||||
if (UNEXPECTED(EG(exception))) {
|
||||
if ((IS_TMP_VAR|IS_VAR) != IS_CONST) {
|
||||
zend_string_release(name);
|
||||
@@ -41866,8 +41946,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_
|
||||
zval_ptr_dtor_nogc(free_op1);
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
if ((IS_TMP_VAR|IS_VAR) == IS_CONST && retval) {
|
||||
CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce, retval);
|
||||
if (EXPECTED(retval)) {
|
||||
if ((IS_TMP_VAR|IS_VAR) == IS_CONST) {
|
||||
CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce, retval);
|
||||
}
|
||||
} else {
|
||||
retval = &EG(uninitialized_zval);
|
||||
}
|
||||
|
||||
zval_ptr_dtor_nogc(free_op1);
|
||||
@@ -42829,9 +42913,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_
|
||||
|
||||
/* check if static properties were destoyed */
|
||||
if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
zval_ptr_dtor_nogc(free_op1);
|
||||
HANDLE_EXCEPTION();
|
||||
if (type == BP_VAR_IS) {
|
||||
retval = &EG(uninitialized_zval);
|
||||
} else {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
zval_ptr_dtor_nogc(free_op1);
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
}
|
||||
|
||||
goto fetch_var_return;
|
||||
@@ -42853,15 +42941,19 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_
|
||||
|
||||
/* check if static properties were destoyed */
|
||||
if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
zval_ptr_dtor_nogc(free_op1);
|
||||
HANDLE_EXCEPTION();
|
||||
if (type == BP_VAR_IS) {
|
||||
retval = &EG(uninitialized_zval);
|
||||
} else {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
zval_ptr_dtor_nogc(free_op1);
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
}
|
||||
|
||||
goto fetch_var_return;
|
||||
}
|
||||
}
|
||||
retval = zend_std_get_static_property(ce, name, 0);
|
||||
retval = zend_std_get_static_property(ce, name, type == BP_VAR_IS);
|
||||
if (UNEXPECTED(EG(exception))) {
|
||||
if ((IS_TMP_VAR|IS_VAR) != IS_CONST) {
|
||||
zend_string_release(name);
|
||||
@@ -42869,8 +42961,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_
|
||||
zval_ptr_dtor_nogc(free_op1);
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
if ((IS_TMP_VAR|IS_VAR) == IS_CONST && retval) {
|
||||
CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce, retval);
|
||||
if (EXPECTED(retval)) {
|
||||
if ((IS_TMP_VAR|IS_VAR) == IS_CONST) {
|
||||
CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce, retval);
|
||||
}
|
||||
} else {
|
||||
retval = &EG(uninitialized_zval);
|
||||
}
|
||||
|
||||
zval_ptr_dtor_nogc(free_op1);
|
||||
@@ -43240,9 +43336,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_
|
||||
|
||||
/* check if static properties were destoyed */
|
||||
if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
zval_ptr_dtor_nogc(free_op1);
|
||||
HANDLE_EXCEPTION();
|
||||
if (type == BP_VAR_IS) {
|
||||
retval = &EG(uninitialized_zval);
|
||||
} else {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
zval_ptr_dtor_nogc(free_op1);
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
}
|
||||
|
||||
goto fetch_var_return;
|
||||
@@ -43264,15 +43364,19 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_
|
||||
|
||||
/* check if static properties were destoyed */
|
||||
if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
zval_ptr_dtor_nogc(free_op1);
|
||||
HANDLE_EXCEPTION();
|
||||
if (type == BP_VAR_IS) {
|
||||
retval = &EG(uninitialized_zval);
|
||||
} else {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
zval_ptr_dtor_nogc(free_op1);
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
}
|
||||
|
||||
goto fetch_var_return;
|
||||
}
|
||||
}
|
||||
retval = zend_std_get_static_property(ce, name, 0);
|
||||
retval = zend_std_get_static_property(ce, name, type == BP_VAR_IS);
|
||||
if (UNEXPECTED(EG(exception))) {
|
||||
if ((IS_TMP_VAR|IS_VAR) != IS_CONST) {
|
||||
zend_string_release(name);
|
||||
@@ -43280,8 +43384,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_
|
||||
zval_ptr_dtor_nogc(free_op1);
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
if ((IS_TMP_VAR|IS_VAR) == IS_CONST && retval) {
|
||||
CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce, retval);
|
||||
if (EXPECTED(retval)) {
|
||||
if ((IS_TMP_VAR|IS_VAR) == IS_CONST) {
|
||||
CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce, retval);
|
||||
}
|
||||
} else {
|
||||
retval = &EG(uninitialized_zval);
|
||||
}
|
||||
|
||||
zval_ptr_dtor_nogc(free_op1);
|
||||
|
||||
+8
-2
@@ -1376,8 +1376,11 @@ main() {
|
||||
dir = opendir("/");
|
||||
if (!dir)
|
||||
exit(1);
|
||||
if (readdir_r(dir, (struct dirent *) entry, &pentry) == 0)
|
||||
if (readdir_r(dir, (struct dirent *) entry, &pentry) == 0) {
|
||||
close(dir);
|
||||
exit(0);
|
||||
}
|
||||
close(dir);
|
||||
exit(1);
|
||||
}
|
||||
],[
|
||||
@@ -2684,7 +2687,7 @@ EOF
|
||||
done
|
||||
|
||||
echo "'[$]0' \\" >> $1
|
||||
if test `expr -- [$]0 : "'.*"` = 0; then
|
||||
if test `expr " [$]0" : " '.*"` = 0; then
|
||||
CONFIGURE_COMMAND="$CONFIGURE_COMMAND '[$]0'"
|
||||
else
|
||||
CONFIGURE_COMMAND="$CONFIGURE_COMMAND [$]0"
|
||||
@@ -3109,3 +3112,6 @@ AC_DEFUN([PHP_CHECK_BUILTIN_CTZLL], [
|
||||
AC_DEFINE_UNQUOTED([PHP_HAVE_BUILTIN_CTZLL], [$have_builtin_ctzll], [Whether the compiler supports __builtin_ctzll])
|
||||
|
||||
])
|
||||
|
||||
dnl Load the AX_CHECK_COMPILE_FLAG macro from the autoconf archive.
|
||||
m4_include([build/ax_check_compile_flag.m4])
|
||||
+4
-1
@@ -29,5 +29,8 @@ if not exist "%SDK_RUNNER%" (
|
||||
exit /b 3
|
||||
)
|
||||
|
||||
call %SDK_RUNNER% -t %APPVEYOR_BUILD_FOLDER%\appveyor\build_task.bat
|
||||
cmd /c %SDK_RUNNER% -t %APPVEYOR_BUILD_FOLDER%\appveyor\build_task.bat
|
||||
if %errorlevel% neq 0 exit /b 3
|
||||
|
||||
exit /b 0
|
||||
|
||||
+16
-8
@@ -2,6 +2,8 @@
|
||||
|
||||
if "%APPVEYOR%" equ "True" rmdir /s /q C:\cygwin >NUL 2>NUL
|
||||
if %errorlevel% neq 0 exit /b 3
|
||||
if "%APPVEYOR%" equ "True" rmdir /s /q C:\cygwin64 >NUL 2>NUL
|
||||
if %errorlevel% neq 0 exit /b 3
|
||||
if "%APPVEYOR%" equ "True" rmdir /s /q C:\mingw >NUL 2>NUL
|
||||
if %errorlevel% neq 0 exit /b 3
|
||||
if "%APPVEYOR%" equ "True" rmdir /s /q C:\mingw-w64 >NUL 2>NUL
|
||||
@@ -12,26 +14,32 @@ if %errorlevel% neq 0 exit /b 3
|
||||
|
||||
if /i "%APPVEYOR_REPO_BRANCH:~0,4%" equ "php-" (
|
||||
set BRANCH=%APPVEYOR_REPO_BRANCH:~4,3%
|
||||
set STABILITY=stable
|
||||
) else (
|
||||
set BRANCH=master
|
||||
set STABILITY=staging
|
||||
)
|
||||
set DEPS_DIR=%PHP_BUILD_CACHE_BASE_DIR%\deps-%PHP_SDK_VC%-%PHP_SDK_ARCH%-%APPVEYOR_REPO_BRANCH%
|
||||
set STABILITY=staging
|
||||
set DEPS_DIR=%PHP_BUILD_CACHE_BASE_DIR%\deps-%BRANCH%-%PHP_SDK_VC%-%PHP_SDK_ARCH%
|
||||
rem SDK is cached, deps info is cached as well
|
||||
echo Updating dependencies
|
||||
call phpsdk_deps --update --branch %BRANCH% --stability %STABILITY% --deps %DEPS_DIR%
|
||||
echo Updating dependencies in %DEPS_DIR%
|
||||
cmd /c phpsdk_deps --update --no-backup --branch %BRANCH% --stability %STABILITY% --deps %DEPS_DIR%
|
||||
if %errorlevel% neq 0 exit /b 3
|
||||
|
||||
call buildconf.bat --force
|
||||
rem Something went wrong, most likely when concurrent builds were to fetch deps
|
||||
rem updates. It might be, that some locking mechanism is needed.
|
||||
if not exist "%DEPS_DIR%" (
|
||||
cmd /c phpsdk_deps --update --force --no-backup --branch %BRANCH% --stability %STABILITY% --deps %DEPS_DIR%
|
||||
)
|
||||
if %errorlevel% neq 0 exit /b 3
|
||||
|
||||
cmd /c buildconf.bat --force
|
||||
if %errorlevel% neq 0 exit /b 3
|
||||
|
||||
if "%THREAD_SAFE%" equ "0" set ADD_CONF=--disable-zts
|
||||
|
||||
set EXT_EXCLUDE_FROM_TEST=snmp,oci8_12c,pdo_oci,pdo_odbc,odbc,pdo_firebird,interbase,ldap,imap,dba
|
||||
set EXT_EXCLUDE_FROM_TEST=snmp,oci8_12c,pdo_oci,pdo_odbc,odbc,pdo_firebird,interbase,ldap,imap,dba,ftp
|
||||
if "%OPCACHE%" equ "0" set EXT_EXCLUDE_FROM_TEST=%EXT_EXCLUDE_FROM_TEST%,opcache
|
||||
|
||||
call configure.bat ^
|
||||
cmd /c configure.bat ^
|
||||
--enable-snapshot-build ^
|
||||
--disable-debug-pack ^
|
||||
--with-mcrypt=shared ^
|
||||
|
||||
+4
-1
@@ -6,5 +6,8 @@ if not exist "%SDK_RUNNER%" (
|
||||
exit /b 3
|
||||
)
|
||||
|
||||
call %SDK_RUNNER% -t %APPVEYOR_BUILD_FOLDER%\appveyor\test_task.bat
|
||||
cmd /c %SDK_RUNNER% -t %APPVEYOR_BUILD_FOLDER%\appveyor\test_task.bat
|
||||
if %errorlevel% neq 0 exit /b 3
|
||||
|
||||
exit /b 0
|
||||
|
||||
+22
-1
@@ -4,7 +4,18 @@ set NO_INTERACTION=1
|
||||
set REPORT_EXIT_STATUS=1
|
||||
set SKIP_IO_CAPTURE_TESTS=1
|
||||
|
||||
set DEPS_DIR=%PHP_BUILD_CACHE_BASE_DIR%\deps-%PHP_SDK_VC%-%PHP_SDK_ARCH%-%APPVEYOR_REPO_BRANCH%
|
||||
if /i "%APPVEYOR_REPO_BRANCH:~0,4%" equ "php-" (
|
||||
set BRANCH=%APPVEYOR_REPO_BRANCH:~4,3%
|
||||
set STABILITY=stable
|
||||
) else (
|
||||
set BRANCH=master
|
||||
set STABILITY=staging
|
||||
)
|
||||
set DEPS_DIR=%PHP_BUILD_CACHE_BASE_DIR%\deps-%BRANCH%-%PHP_SDK_VC%-%PHP_SDK_ARCH%
|
||||
if not exist "%DEPS_DIR%" (
|
||||
echo "%DEPS_DIR%" doesn't exist
|
||||
exit /b 3
|
||||
)
|
||||
|
||||
rem setup MySQL related exts
|
||||
set MYSQL_PWD=Password12!
|
||||
@@ -18,6 +29,7 @@ set PDO_MYSQL_TEST_HOST=%MYSQL_TEST_HOST%
|
||||
set PDO_MYSQL_TEST_PORT=%MYSQL_TEST_PORT%
|
||||
set PDO_MYSQL_TEST_DSN=mysql:host=%PDO_MYSQL_TEST_HOST% port=%PDO_MYSQL_TEST_PORT% dbname=test user=%PDO_MYSQL_TEST_USER% password=%MYSQL_PW%
|
||||
"C:\Program Files\MySql\MySQL Server 5.7\bin\mysql.exe" --user=%MYSQL_TEST_USER% -e "CREATE DATABASE IF NOT EXISTS test"
|
||||
if %errorlevel% neq 0 exit /b 3
|
||||
|
||||
rem setup PostgreSQL related exts
|
||||
set PGUSER=postgres
|
||||
@@ -26,12 +38,15 @@ rem set PGSQL_TEST_CONNSTR=host=127.0.0.1 dbname=test port=5432 user=postgres pa
|
||||
echo ^<?php $conn_str = "host=127.0.0.1 dbname=test port=5432 user=%PGUSER% password=%PGPASSWORD%"; ?^> >> "./ext/pgsql/tests/config.inc"
|
||||
set PDO_PGSQL_TEST_DSN=pgsql:host=127.0.0.1 port=5432 dbname=test user=%PGUSER% password=%PGPASSWORD%
|
||||
"C:\Program Files\PostgreSQL\9.5\bin\createdb.exe" test
|
||||
if %errorlevel% neq 0 exit /b 3
|
||||
|
||||
rem prepare for ext/openssl
|
||||
if "%APPVEYOR%" equ "True" rmdir /s /q C:\OpenSSL-Win32 >NUL 2>NUL
|
||||
if "%APPVEYOR%" equ "True" rmdir /s /q C:\OpenSSL-Win64 >NUL 2>NUL
|
||||
mkdir c:\usr\local\ssl
|
||||
if %errorlevel% neq 0 exit /b 3
|
||||
copy %DEPS_DIR%\template\ssl\openssl.cnf c:\usr\local\ssl
|
||||
if %errorlevel% neq 0 exit /b 3
|
||||
set OPENSSL_CONF=c:\usr\local\ssl\openssl.cnf
|
||||
rem set OPENSSL_CONF=
|
||||
rem set SSLEAY_CONF=
|
||||
@@ -41,9 +56,13 @@ if "%OPCACHE%" equ "1" set OPCACHE_OPTS=-d opcache.enabled=1 -d opcache.enable_c
|
||||
|
||||
rem prepare for enchant
|
||||
mkdir c:\enchant_plugins
|
||||
if %errorlevel% neq 0 exit /b 3
|
||||
copy %DEPS_DIR%\bin\libenchant_ispell.dll c:\enchant_plugins
|
||||
if %errorlevel% neq 0 exit /b 3
|
||||
copy %DEPS_DIR%\bin\libenchant_myspell.dll c:\enchant_plugins
|
||||
if %errorlevel% neq 0 exit /b 3
|
||||
reg add HKEY_CURRENT_USER\SOFTWARE\Enchant\Config /v Module_Dir /t REG_SZ /d c:\enchant_plugins
|
||||
if %errorlevel% neq 0 exit /b 3
|
||||
set PHP_BUILD_CACHE_ENCHANT_DICT_DIR=%PHP_BUILD_CACHE_BASE_DIR%\enchant_dict
|
||||
if not exist "%PHP_BUILD_CACHE_ENCHANT_DICT_DIR%" (
|
||||
echo Creating %PHP_BUILD_CACHE_ENCHANT_DICT_DIR%
|
||||
@@ -66,3 +85,5 @@ mkdir c:\tests_tmp
|
||||
cd "%APPVEYOR_BUILD_FOLDER%"
|
||||
nmake test TESTS="%OPCACHE_OPTS% -q --offline --show-diff --set-timeout 120 -g FAIL,XFAIL,BORK,WARN,LEAK,SKIP --temp-source c:\tests_tmp --temp-target c:\tests_tmp"
|
||||
|
||||
exit /b %errorlevel%
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
# ===========================================================================
|
||||
# http://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT])
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# Check whether the given FLAG works with the current language's compiler
|
||||
# or gives an error. (Warnings, however, are ignored)
|
||||
#
|
||||
# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
|
||||
# success/failure.
|
||||
#
|
||||
# If EXTRA-FLAGS is defined, it is added to the current language's default
|
||||
# flags (e.g. CFLAGS) when the check is done. The check is thus made with
|
||||
# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to
|
||||
# force the compiler to issue an error when a bad flag is given.
|
||||
#
|
||||
# INPUT gives an alternative input source to AC_COMPILE_IFELSE.
|
||||
#
|
||||
# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this
|
||||
# macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG.
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
|
||||
# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by the
|
||||
# Free Software Foundation, either version 3 of the License, or (at your
|
||||
# option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
# Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along
|
||||
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# As a special exception, the respective Autoconf Macro's copyright owner
|
||||
# gives unlimited permission to copy, distribute and modify the configure
|
||||
# scripts that are the output of Autoconf when processing the Macro. You
|
||||
# need not follow the terms of the GNU General Public License when using
|
||||
# or distributing such scripts, even though portions of the text of the
|
||||
# Macro appear in them. The GNU General Public License (GPL) does govern
|
||||
# all other use of the material that constitutes the Autoconf Macro.
|
||||
#
|
||||
# This special exception to the GPL applies to versions of the Autoconf
|
||||
# Macro released by the Autoconf Archive. When you make and distribute a
|
||||
# modified version of the Autoconf Macro, you may extend this special
|
||||
# exception to the GPL to apply to your modified version as well.
|
||||
|
||||
#serial 4
|
||||
|
||||
AC_DEFUN([AX_CHECK_COMPILE_FLAG],
|
||||
[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF
|
||||
AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl
|
||||
AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [
|
||||
ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS
|
||||
_AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1"
|
||||
AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])],
|
||||
[AS_VAR_SET(CACHEVAR,[yes])],
|
||||
[AS_VAR_SET(CACHEVAR,[no])])
|
||||
_AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags])
|
||||
AS_VAR_IF(CACHEVAR,yes,
|
||||
[m4_default([$2], :)],
|
||||
[m4_default([$3], :)])
|
||||
AS_VAR_POPDEF([CACHEVAR])dnl
|
||||
])dnl AX_CHECK_COMPILE_FLAGS
|
||||
+11
-10
@@ -69,33 +69,33 @@ int zend_sprintf(char *buffer, const char *format, ...);
|
||||
|
||||
/* To enable the is_nan, is_infinite and is_finite PHP functions */
|
||||
#ifdef NETWARE
|
||||
#define HAVE_ISNAN 1
|
||||
#define HAVE_ISINF 1
|
||||
#define HAVE_ISFINITE 1
|
||||
#define HAVE_DECL_ISNAN 1
|
||||
#define HAVE_DECL_ISINF 1
|
||||
#define HAVE_DECL_ISFINITE 1
|
||||
#endif
|
||||
|
||||
#ifndef zend_isnan
|
||||
#ifdef HAVE_ISNAN
|
||||
#if HAVE_DECL_ISNAN
|
||||
#define zend_isnan(a) isnan(a)
|
||||
#elif defined(HAVE_FPCLASS)
|
||||
#define zend_isnan(a) ((fpclass(a) == FP_SNAN) || (fpclass(a) == FP_QNAN))
|
||||
#else
|
||||
#define zend_isnan(a) 0
|
||||
#define zend_isnan(a) ((a) != (a))
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_ISINF
|
||||
#if HAVE_DECL_ISINF
|
||||
#define zend_isinf(a) isinf(a)
|
||||
#elif defined(INFINITY)
|
||||
/* Might not work, but is required by ISO C99 */
|
||||
#define zend_isinf(a) (((a)==INFINITY)?1:0)
|
||||
#define zend_isinf(a) (((a)==INFINITY || (a)==-INFINITY)?1:0)
|
||||
#elif defined(HAVE_FPCLASS)
|
||||
#define zend_isinf(a) ((fpclass(a) == FP_PINF) || (fpclass(a) == FP_NINF))
|
||||
#else
|
||||
#define zend_isinf(a) 0
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_ISFINITE) || defined(isfinite)
|
||||
#if HAVE_DECL_ISFINITE
|
||||
#define zend_finite(a) isfinite(a)
|
||||
#elif defined(HAVE_FINITE)
|
||||
#define zend_finite(a) finite(a)
|
||||
@@ -119,8 +119,8 @@ int zend_sprintf(char *buffer, const char *format, ...);
|
||||
|
||||
PHP_MAJOR_VERSION=7
|
||||
PHP_MINOR_VERSION=0
|
||||
PHP_RELEASE_VERSION=16
|
||||
PHP_EXTRA_VERSION="-dev"
|
||||
PHP_RELEASE_VERSION=23
|
||||
PHP_EXTRA_VERSION=""
|
||||
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`
|
||||
|
||||
@@ -494,6 +494,7 @@ limits.h \
|
||||
locale.h \
|
||||
monetary.h \
|
||||
netdb.h \
|
||||
poll.h \
|
||||
pwd.h \
|
||||
resolv.h \
|
||||
signal.h \
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#if PHP_WIN32
|
||||
#ifdef PHP_WIN32
|
||||
#include "../../../../main/config.w32.h"
|
||||
#else
|
||||
#include <php_config.h>
|
||||
|
||||
+19
-3
@@ -17,11 +17,23 @@ if test "$PHP_CURL" != "no"; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$CURL_DIR"; then
|
||||
AC_MSG_RESULT(not found)
|
||||
if which dpkg-architecture>/dev/null; then
|
||||
AC_MSG_CHECKING(for cURL in multiarch path)
|
||||
CURL_MULTIARCH_INCLUDE=/usr/include/$(dpkg-architecture -qDEB_HOST_MULTIARCH)
|
||||
if test -r $CURL_MULTIARCH_INCLUDE/curl/easy.h; then
|
||||
CURL_DIR=/usr
|
||||
AC_MSG_RESULT(found in $CURL_MULTIARCH_INCLUDE)
|
||||
else
|
||||
AC_MSG_RESULT(not found)
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -z "$CURL_DIR"; then
|
||||
AC_MSG_RESULT(not found)
|
||||
AC_MSG_ERROR(Please reinstall the libcurl distribution -
|
||||
AC_MSG_ERROR(Could not find cURL, please reinstall the libcurl distribution -
|
||||
easy.h should be in <curl-dir>/include/curl/)
|
||||
fi
|
||||
|
||||
@@ -45,7 +57,11 @@ if test "$PHP_CURL" != "no"; then
|
||||
AC_MSG_ERROR(cURL version 7.10.5 or later is required to compile php with cURL support)
|
||||
fi
|
||||
|
||||
PHP_ADD_INCLUDE($CURL_DIR/include)
|
||||
if test -z "$CURL_MULTIARCH_INCLUDE"; then
|
||||
PHP_ADD_INCLUDE($CURL_DIR/include)
|
||||
else
|
||||
PHP_ADD_INCLUDE($CURL_MULTIARCH_INCLUDE)
|
||||
fi
|
||||
PHP_EVAL_LIBLINE($CURL_LIBS, CURL_SHARED_LIBADD)
|
||||
PHP_ADD_LIBRARY_WITH_PATH(curl, $CURL_DIR/$PHP_LIBDIR, CURL_SHARED_LIBADD)
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ static void curlfile_ctor(INTERNAL_FUNCTION_PARAMETERS)
|
||||
size_t fname_len, mime_len, postname_len;
|
||||
zval *cf = return_value;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|ss", &fname, &fname_len, &mime, &mime_len, &postname, &postname_len) == FAILURE) {
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "p|ss", &fname, &fname_len, &mime, &mime_len, &postname, &postname_len) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -17,8 +17,8 @@ var_dump(curl_setopt_array($c, [
|
||||
CURLOPT_UPLOAD => true,
|
||||
CURLOPT_INFILE => $f,
|
||||
CURLOPT_INFILESIZE => filesize(__FILE__),
|
||||
CURLOPT_CONNECTTIMEOUT => 1,
|
||||
CURLOPT_TIMEOUT => 1,
|
||||
CURLOPT_CONNECTTIMEOUT => 3,
|
||||
CURLOPT_TIMEOUT => 3,
|
||||
]));
|
||||
fclose($f);
|
||||
var_dump(curl_setopt_array($c, [
|
||||
|
||||
@@ -40,7 +40,7 @@ SPNEGO => Yes
|
||||
SSL => Yes
|
||||
SSPI => Yes
|
||||
TLS-SRP => No
|
||||
HTTP2 => No
|
||||
HTTP2 => Yes
|
||||
GSSAPI => No
|
||||
KERBEROS5 => Yes
|
||||
UNIX_SOCKETS => No
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
--TEST--
|
||||
array curl_multi_info_read ( resource $mh [, int &$msgs_in_queue = NULL ] );
|
||||
--CREDITS--
|
||||
marcosptf - <marcosptf@yahoo.com.br> - @phpsp - sao paulo - br
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (getenv("SKIP_ONLINE_TESTS")) { die('skip: online test'); }
|
||||
if (!extension_loaded('curl')) { print("skip"); }
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
$urls = array(
|
||||
"bugs.php.net",
|
||||
"pear.php.net"
|
||||
);
|
||||
|
||||
$mh = curl_multi_init();
|
||||
foreach ($urls as $i => $url) {
|
||||
$conn[$i] = curl_init($url);
|
||||
curl_setopt($conn[$i], CURLOPT_RETURNTRANSFER, 1);
|
||||
curl_multi_add_handle($mh, $conn[$i]);
|
||||
}
|
||||
|
||||
do {
|
||||
$status = curl_multi_exec($mh, $active);
|
||||
$info = curl_multi_info_read($mh);
|
||||
if (false !== $info) {
|
||||
var_dump(is_array($info));
|
||||
}
|
||||
} while ($status === CURLM_CALL_MULTI_PERFORM || $active);
|
||||
|
||||
foreach ($urls as $i => $url) {
|
||||
curl_close($conn[$i]);
|
||||
}
|
||||
?>
|
||||
--EXPECT--
|
||||
bool(true)
|
||||
bool(true)
|
||||
@@ -33,9 +33,9 @@ function curl_cli_server_start() {
|
||||
|
||||
// note: even when server prints 'Listening on localhost:8964...Press Ctrl-C to quit.'
|
||||
// it might not be listening yet...need to wait until fsockopen() call returns
|
||||
$error = "Unable to connect to servers\n";
|
||||
$error = "Unable to connect to server\n";
|
||||
for ($i=0; $i < 60; $i++) {
|
||||
usleep(25000); // 25ms per try
|
||||
usleep(50000); // 50ms per try
|
||||
$status = proc_get_status($handle);
|
||||
$fp = @fsockopen(PHP_CURL_SERVER_HOSTNAME, PHP_CURL_SERVER_PORT);
|
||||
// Failure, the server is no longer running
|
||||
@@ -63,6 +63,14 @@ function curl_cli_server_start() {
|
||||
register_shutdown_function(
|
||||
function($handle) use($router) {
|
||||
proc_terminate($handle);
|
||||
/* Wait for server to shutdown */
|
||||
for ($i = 0; $i < 60; $i++) {
|
||||
$status = proc_get_status($handle);
|
||||
if (!($status && $status['running'])) {
|
||||
break;
|
||||
}
|
||||
usleep(50000);
|
||||
}
|
||||
},
|
||||
$handle
|
||||
);
|
||||
|
||||
+5949
-6853
File diff suppressed because it is too large.
Load diff
@@ -899,7 +899,7 @@ datefull = day ([ \t.-])* monthtext ([ \t.-])* year;
|
||||
datenoday = monthtext ([ .\t-])* year4;
|
||||
datenodayrev = year4 ([ .\t-])* monthtext;
|
||||
datetextual = monthtext ([ .\t-])* day [,.stndrh\t ]+ year;
|
||||
datenoyear = monthtext ([ .\t-])* day [,.stndrh\t ]*;
|
||||
datenoyear = monthtext ([ .\t-])* day ([,.stndrh\t ]+|[\000]);
|
||||
datenoyearrev = day ([ .\t-])* monthtext;
|
||||
datenocolon = year4 monthlz daylz;
|
||||
|
||||
|
||||
+3673
-3600
File diff suppressed because it is too large.
Load diff
@@ -154,7 +154,7 @@ static void do_adjust_for_weekday(timelib_time* time)
|
||||
{
|
||||
/* To make "this week" work, where the current DOW is a "sunday" */
|
||||
if (current_dow == 0 && time->relative.weekday != 0) {
|
||||
time->relative.weekday = -6;
|
||||
time->relative.weekday -= 7;
|
||||
}
|
||||
|
||||
/* To make "sunday this week" work, where the current DOW is not a
|
||||
@@ -354,7 +354,7 @@ static timelib_sll do_years(timelib_sll year)
|
||||
return res;
|
||||
}
|
||||
|
||||
static timelib_sll do_months(timelib_ull month, timelib_ull year)
|
||||
static timelib_sll do_months(timelib_ull month, timelib_sll year)
|
||||
{
|
||||
if (timelib_is_leap(year)) {
|
||||
return ((month_tab_leap[month - 1] + 1) * SECS_PER_DAY);
|
||||
@@ -463,7 +463,7 @@ void timelib_update_ts(timelib_time* time, timelib_tzinfo* tzi)
|
||||
time->sse = res;
|
||||
|
||||
time->sse_uptodate = 1;
|
||||
time->have_relative = time->relative.have_weekday_relative = time->relative.have_special_relative = 0;
|
||||
time->have_relative = time->relative.have_weekday_relative = time->relative.have_special_relative = time->relative.first_last_day_of = 0;
|
||||
}
|
||||
|
||||
#if 0
|
||||
|
||||
@@ -189,6 +189,7 @@ void timelib_unixtime2local(timelib_time *tm, timelib_sll ts)
|
||||
|
||||
timelib_unixtime2gmt(tm, ts - (tm->z * 60) + (tm->dst * 3600));
|
||||
|
||||
tm->sse = ts;
|
||||
tm->z = z;
|
||||
tm->dst = dst;
|
||||
break;
|
||||
|
||||
+27
-14
@@ -339,7 +339,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_timezone_transitions_get, 0, 0, 1)
|
||||
ZEND_ARG_INFO(0, timestamp_end)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO(arginfo_timezone_method_transitions_get, 0)
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_timezone_method_transitions_get, 0, 0, 0)
|
||||
ZEND_ARG_INFO(0, timestamp_begin)
|
||||
ZEND_ARG_INFO(0, timestamp_end)
|
||||
ZEND_END_ARG_INFO()
|
||||
@@ -764,6 +764,11 @@ PHP_RSHUTDOWN_FUNCTION(date)
|
||||
*/
|
||||
#define DATE_FORMAT_RFC1123 "D, d M Y H:i:s O"
|
||||
|
||||
/*
|
||||
* RFC7231, Section 7.1.1: http://tools.ietf.org/html/rfc7231
|
||||
*/
|
||||
#define DATE_FORMAT_RFC7231 "D, d M Y H:i:s \\G\\M\\T"
|
||||
|
||||
/*
|
||||
* RFC2822, Section 3.3: http://www.ietf.org/rfc/rfc2822.txt
|
||||
* FWS = ([*WSP CRLF] 1*WSP) / ; Folding white space
|
||||
@@ -857,6 +862,7 @@ PHP_MINIT_FUNCTION(date)
|
||||
REGISTER_STRING_CONSTANT("DATE_RFC850", DATE_FORMAT_RFC850, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_STRING_CONSTANT("DATE_RFC1036", DATE_FORMAT_RFC1036, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_STRING_CONSTANT("DATE_RFC1123", DATE_FORMAT_RFC1123, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_STRING_CONSTANT("DATE_RFC7231", DATE_FORMAT_RFC7231, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_STRING_CONSTANT("DATE_RFC2822", DATE_FORMAT_RFC2822, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_STRING_CONSTANT("DATE_RFC3339", DATE_FORMAT_RFC3339, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_STRING_CONSTANT("DATE_RFC3339_EXTENDED", DATE_FORMAT_RFC3339_EXTENDED, CONST_CS | CONST_PERSISTENT);
|
||||
@@ -1141,11 +1147,12 @@ static zend_string *date_format(char *format, size_t format_len, timelib_time *t
|
||||
case 'a': length = slprintf(buffer, 32, "%s", t->h >= 12 ? "pm" : "am"); break;
|
||||
case 'A': length = slprintf(buffer, 32, "%s", t->h >= 12 ? "PM" : "AM"); break;
|
||||
case 'B': {
|
||||
int retval = (((((long)t->sse)-(((long)t->sse) - ((((long)t->sse) % 86400) + 3600))) * 10) / 864);
|
||||
while (retval < 0) {
|
||||
retval += 1000;
|
||||
int retval = ((((long)t->sse)-(((long)t->sse) - ((((long)t->sse) % 86400) + 3600))) * 10);
|
||||
if (retval < 0) {
|
||||
retval += 864000;
|
||||
}
|
||||
retval = retval % 1000;
|
||||
/* Make sure to do this on a positive int to avoid rounding errors */
|
||||
retval = (retval / 864) % 1000;
|
||||
length = slprintf(buffer, 32, "%03d", retval);
|
||||
break;
|
||||
}
|
||||
@@ -1336,11 +1343,12 @@ PHPAPI int php_idate(char format, time_t ts, int localtime)
|
||||
|
||||
/* Swatch Beat a.k.a. Internet Time */
|
||||
case 'B':
|
||||
retval = (((((long)t->sse)-(((long)t->sse) - ((((long)t->sse) % 86400) + 3600))) * 10) / 864);
|
||||
while (retval < 0) {
|
||||
retval += 1000;
|
||||
retval = ((((long)t->sse)-(((long)t->sse) - ((((long)t->sse) % 86400) + 3600))) * 10);
|
||||
if (retval < 0) {
|
||||
retval += 864000;
|
||||
}
|
||||
retval = retval % 1000;
|
||||
/* Make sure to do this on a positive int to avoid rounding errors */
|
||||
retval = (retval / 864) % 1000;
|
||||
break;
|
||||
|
||||
/* time */
|
||||
@@ -1924,6 +1932,10 @@ static void date_period_it_rewind(zend_object_iterator *iter)
|
||||
if (iterator->object->current) {
|
||||
timelib_time_dtor(iterator->object->current);
|
||||
}
|
||||
if (!iterator->object->start) {
|
||||
zend_throw_error(NULL, "DatePeriod has not been initialized correctly");
|
||||
return;
|
||||
}
|
||||
iterator->object->current = timelib_time_clone(iterator->object->start);
|
||||
date_period_it_invalidate_current(iter);
|
||||
}
|
||||
@@ -1978,7 +1990,7 @@ static int date_interval_has_property(zval *object, zval *member, int type, void
|
||||
zval *prop;
|
||||
int retval = 0;
|
||||
|
||||
if (Z_TYPE_P(member) != IS_STRING) {
|
||||
if (UNEXPECTED(Z_TYPE_P(member) != IS_STRING)) {
|
||||
ZVAL_COPY(&tmp_member, member);
|
||||
convert_to_string(&tmp_member);
|
||||
member = &tmp_member;
|
||||
@@ -1994,10 +2006,10 @@ static int date_interval_has_property(zval *object, zval *member, int type, void
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
|
||||
prop = date_interval_read_property(object, member, type, cache_slot, &rv);
|
||||
|
||||
if (prop != NULL) {
|
||||
|
||||
prop = date_interval_read_property(object, member, BP_VAR_IS, cache_slot, &rv);
|
||||
|
||||
if (prop != &EG(uninitialized_zval)) {
|
||||
if (type == 2) {
|
||||
retval = 1;
|
||||
} else if (type == 1) {
|
||||
@@ -2048,6 +2060,7 @@ static void date_register_classes(void) /* {{{ */
|
||||
REGISTER_DATE_CLASS_CONST_STRING("RFC850", DATE_FORMAT_RFC850);
|
||||
REGISTER_DATE_CLASS_CONST_STRING("RFC1036", DATE_FORMAT_RFC1036);
|
||||
REGISTER_DATE_CLASS_CONST_STRING("RFC1123", DATE_FORMAT_RFC1123);
|
||||
REGISTER_DATE_CLASS_CONST_STRING("RFC7231", DATE_FORMAT_RFC7231);
|
||||
REGISTER_DATE_CLASS_CONST_STRING("RFC2822", DATE_FORMAT_RFC2822);
|
||||
REGISTER_DATE_CLASS_CONST_STRING("RFC3339", DATE_FORMAT_RFC3339);
|
||||
REGISTER_DATE_CLASS_CONST_STRING("RFC3339_EXTENDED", DATE_FORMAT_RFC3339_EXTENDED);
|
||||
|
||||
@@ -156,7 +156,7 @@ array(18) {
|
||||
}
|
||||
}
|
||||
..and get names of all its class constants
|
||||
array(12) {
|
||||
array(13) {
|
||||
["ATOM"]=>
|
||||
string(13) "Y-m-d\TH:i:sP"
|
||||
["COOKIE"]=>
|
||||
@@ -171,6 +171,8 @@ array(12) {
|
||||
string(16) "D, d M y H:i:s O"
|
||||
["RFC1123"]=>
|
||||
string(16) "D, d M Y H:i:s O"
|
||||
["RFC7231"]=>
|
||||
string(21) "D, d M Y H:i:s \G\M\T"
|
||||
["RFC2822"]=>
|
||||
string(16) "D, d M Y H:i:s O"
|
||||
["RFC3339"]=>
|
||||
|
||||
@@ -43,20 +43,20 @@ foreach ($tests as $test) {
|
||||
print "wanted = Monday 00:00:00\n\n";
|
||||
}
|
||||
?>
|
||||
--EXPECT--
|
||||
--EXPECTF--
|
||||
Europe/Andorra
|
||||
ts = Monday 2037-10-19 17:17:17 CEST
|
||||
result = Monday 2037-10-26 00:00:00 CET
|
||||
wanted = Monday 00:00:00
|
||||
|
||||
Asia/Dubai
|
||||
ts = Thursday 1970-01-01 17:17:17 GST
|
||||
result = Monday 1970-01-05 00:00:00 GST
|
||||
ts = Thursday 1970-01-01 17:17:17 %s
|
||||
result = Monday 1970-01-05 00:00:00 %s
|
||||
wanted = Monday 00:00:00
|
||||
|
||||
Asia/Kabul
|
||||
ts = Thursday 1970-01-01 17:17:17 AFT
|
||||
result = Monday 1970-01-05 00:00:00 AFT
|
||||
ts = Thursday 1970-01-01 17:17:17 %s
|
||||
result = Monday 1970-01-05 00:00:00 %s
|
||||
wanted = Monday 00:00:00
|
||||
|
||||
America/Antigua
|
||||
@@ -130,8 +130,8 @@ result = Monday 1971-01-04 00:00:00 AST
|
||||
wanted = Monday 00:00:00
|
||||
|
||||
Asia/Dacca
|
||||
ts = Friday 1971-01-01 17:17:17 DACT
|
||||
result = Monday 1971-01-04 00:00:00 DACT
|
||||
ts = Friday 1971-01-01 17:17:17 %s
|
||||
result = Monday 1971-01-04 00:00:00 %s
|
||||
wanted = Monday 00:00:00
|
||||
|
||||
Europe/Brussels
|
||||
@@ -150,13 +150,13 @@ result = Monday 1983-04-18 01:00:00 CEST
|
||||
wanted = Monday 00:00:00
|
||||
|
||||
America/Buenos_Aires
|
||||
ts = Monday 1974-09-30 17:17:17 ART
|
||||
result = Monday 1974-10-07 00:00:00 ART
|
||||
ts = Monday 1974-09-30 17:17:17 %s
|
||||
result = Monday 1974-10-07 00:00:00 %s
|
||||
wanted = Monday 00:00:00
|
||||
|
||||
America/Rosario
|
||||
ts = Monday 1974-09-30 17:17:17 ART
|
||||
result = Monday 1974-10-07 00:00:00 ART
|
||||
ts = Monday 1974-09-30 17:17:17 %s
|
||||
result = Monday 1974-10-07 00:00:00 %s
|
||||
wanted = Monday 00:00:00
|
||||
|
||||
Europe/Vienna
|
||||
|
||||
@@ -41,7 +41,7 @@ foreach ($timezones as $timezone) {
|
||||
echo "\n";
|
||||
}
|
||||
?>
|
||||
--EXPECT--
|
||||
--EXPECTF--
|
||||
America/Chicago
|
||||
1076824799 [2004-02-14 23:59:59 CST] [2004-04-07 00:00:00 -2 months +7 days +23 hours +59 minutes +59 seconds]
|
||||
1076824800 [2004-02-15 00:00:00 CST] [2004-04-07 00:00:00 -2 months +7 days +23 hours +59 minutes +60 seconds]
|
||||
@@ -88,31 +88,31 @@ Asia/Jerusalem
|
||||
1083099600 [2004-04-28 00:00:00 IDT] [2004-04-07 00:00:00 +21 days]
|
||||
|
||||
Asia/Singapore
|
||||
1076774399 [2004-02-14 23:59:59 SGT] [2004-04-07 00:00:00 -2 months +7 days +23 hours +59 minutes +59 seconds]
|
||||
1076774400 [2004-02-15 00:00:00 SGT] [2004-04-07 00:00:00 -2 months +7 days +23 hours +59 minutes +60 seconds]
|
||||
1076774401 [2004-02-15 00:00:01 SGT] [2004-04-07 00:00:00 -2 months +7 days +23 hours +59 minutes +61 seconds]
|
||||
1079452800 [2004-03-17 00:00:00 SGT] [2004-04-07 00:00:00 -21 days]
|
||||
1080316800 [2004-03-27 00:00:00 SGT] [2004-04-07 00:00:00 11 days ago]
|
||||
1080410400 [2004-03-28 02:00:00 SGT] [2004-04-07 00:00:00 -10 day +2 hours]
|
||||
1081180800 [2004-04-06 00:00:00 SGT] [2004-04-07 00:00:00 -1 day]
|
||||
1081267200 [2004-04-07 00:00:00 SGT] [2004-04-07 00:00:00]
|
||||
1081270800 [2004-04-07 01:00:00 SGT] [2004-04-07 00:00:00 +1 hour]
|
||||
1081274400 [2004-04-07 02:00:00 SGT] [2004-04-07 00:00:00 +2 hour]
|
||||
1081353600 [2004-04-08 00:00:00 SGT] [2004-04-07 00:00:00 +1 day]
|
||||
1081353600 [2004-04-08 00:00:00 SGT] [2004-04-07 00:00:00 1 day]
|
||||
1083081600 [2004-04-28 00:00:00 SGT] [2004-04-07 00:00:00 +21 days]
|
||||
1076774399 [2004-02-14 23:59:59 %s] [2004-04-07 00:00:00 -2 months +7 days +23 hours +59 minutes +59 seconds]
|
||||
1076774400 [2004-02-15 00:00:00 %s] [2004-04-07 00:00:00 -2 months +7 days +23 hours +59 minutes +60 seconds]
|
||||
1076774401 [2004-02-15 00:00:01 %s] [2004-04-07 00:00:00 -2 months +7 days +23 hours +59 minutes +61 seconds]
|
||||
1079452800 [2004-03-17 00:00:00 %s] [2004-04-07 00:00:00 -21 days]
|
||||
1080316800 [2004-03-27 00:00:00 %s] [2004-04-07 00:00:00 11 days ago]
|
||||
1080410400 [2004-03-28 02:00:00 %s] [2004-04-07 00:00:00 -10 day +2 hours]
|
||||
1081180800 [2004-04-06 00:00:00 %s] [2004-04-07 00:00:00 -1 day]
|
||||
1081267200 [2004-04-07 00:00:00 %s] [2004-04-07 00:00:00]
|
||||
1081270800 [2004-04-07 01:00:00 %s] [2004-04-07 00:00:00 +1 hour]
|
||||
1081274400 [2004-04-07 02:00:00 %s] [2004-04-07 00:00:00 +2 hour]
|
||||
1081353600 [2004-04-08 00:00:00 %s] [2004-04-07 00:00:00 +1 day]
|
||||
1081353600 [2004-04-08 00:00:00 %s] [2004-04-07 00:00:00 1 day]
|
||||
1083081600 [2004-04-28 00:00:00 %s] [2004-04-07 00:00:00 +21 days]
|
||||
|
||||
America/Sao_Paulo
|
||||
1076810399 [2004-02-14 23:59:59 BRST] [2004-04-07 00:00:00 -2 months +7 days +23 hours +59 minutes +59 seconds]
|
||||
1076814000 [2004-02-15 00:00:00 BRT] [2004-04-07 00:00:00 -2 months +7 days +23 hours +59 minutes +60 seconds]
|
||||
1076814001 [2004-02-15 00:00:01 BRT] [2004-04-07 00:00:00 -2 months +7 days +23 hours +59 minutes +61 seconds]
|
||||
1079492400 [2004-03-17 00:00:00 BRT] [2004-04-07 00:00:00 -21 days]
|
||||
1080356400 [2004-03-27 00:00:00 BRT] [2004-04-07 00:00:00 11 days ago]
|
||||
1080450000 [2004-03-28 02:00:00 BRT] [2004-04-07 00:00:00 -10 day +2 hours]
|
||||
1081220400 [2004-04-06 00:00:00 BRT] [2004-04-07 00:00:00 -1 day]
|
||||
1081306800 [2004-04-07 00:00:00 BRT] [2004-04-07 00:00:00]
|
||||
1081310400 [2004-04-07 01:00:00 BRT] [2004-04-07 00:00:00 +1 hour]
|
||||
1081314000 [2004-04-07 02:00:00 BRT] [2004-04-07 00:00:00 +2 hour]
|
||||
1081393200 [2004-04-08 00:00:00 BRT] [2004-04-07 00:00:00 +1 day]
|
||||
1081393200 [2004-04-08 00:00:00 BRT] [2004-04-07 00:00:00 1 day]
|
||||
1083121200 [2004-04-28 00:00:00 BRT] [2004-04-07 00:00:00 +21 days]
|
||||
1076810399 [2004-02-14 23:59:59 %s] [2004-04-07 00:00:00 -2 months +7 days +23 hours +59 minutes +59 seconds]
|
||||
1076814000 [2004-02-15 00:00:00 %s] [2004-04-07 00:00:00 -2 months +7 days +23 hours +59 minutes +60 seconds]
|
||||
1076814001 [2004-02-15 00:00:01 %s] [2004-04-07 00:00:00 -2 months +7 days +23 hours +59 minutes +61 seconds]
|
||||
1079492400 [2004-03-17 00:00:00 %s] [2004-04-07 00:00:00 -21 days]
|
||||
1080356400 [2004-03-27 00:00:00 %s] [2004-04-07 00:00:00 11 days ago]
|
||||
1080450000 [2004-03-28 02:00:00 %s] [2004-04-07 00:00:00 -10 day +2 hours]
|
||||
1081220400 [2004-04-06 00:00:00 %s] [2004-04-07 00:00:00 -1 day]
|
||||
1081306800 [2004-04-07 00:00:00 %s] [2004-04-07 00:00:00]
|
||||
1081310400 [2004-04-07 01:00:00 %s] [2004-04-07 00:00:00 +1 hour]
|
||||
1081314000 [2004-04-07 02:00:00 %s] [2004-04-07 00:00:00 +2 hour]
|
||||
1081393200 [2004-04-08 00:00:00 %s] [2004-04-07 00:00:00 +1 day]
|
||||
1081393200 [2004-04-08 00:00:00 %s] [2004-04-07 00:00:00 1 day]
|
||||
1083121200 [2004-04-28 00:00:00 %s] [2004-04-07 00:00:00 +21 days]
|
||||
@@ -34,18 +34,18 @@ echo date("Y-m-d H:i:s T\n", $l);
|
||||
1099364400
|
||||
1099364400
|
||||
1099447200
|
||||
2004-11-01 00:00:00 BRT
|
||||
2004-11-02 01:00:00 BRST
|
||||
2004-11-02 01:00:00 BRST
|
||||
2004-11-02 01:00:00 BRST
|
||||
2004-11-03 00:00:00 BRST
|
||||
2004-11-01 00:00:00 -03
|
||||
2004-11-02 01:00:00 -02
|
||||
2004-11-02 01:00:00 -02
|
||||
2004-11-02 01:00:00 -02
|
||||
2004-11-03 00:00:00 -02
|
||||
1108778400
|
||||
1108868400
|
||||
1108868400
|
||||
1108868400
|
||||
1108954800
|
||||
2005-02-19 00:00:00 BRST
|
||||
2005-02-20 00:00:00 BRT
|
||||
2005-02-20 00:00:00 BRT
|
||||
2005-02-20 00:00:00 BRT
|
||||
2005-02-21 00:00:00 BRT
|
||||
2005-02-19 00:00:00 -02
|
||||
2005-02-20 00:00:00 -03
|
||||
2005-02-20 00:00:00 -03
|
||||
2005-02-20 00:00:00 -03
|
||||
2005-02-21 00:00:00 -03
|
||||
@@ -200,23 +200,23 @@ print "wanted=Thursday 00:00:00\n\n";
|
||||
?>
|
||||
--EXPECT--
|
||||
TZ=America/Mendoza - wrong day.
|
||||
tStamp=Sunday 1992-10-18 17:17:17 ARST 1
|
||||
result=Sunday 1992-10-25 00:00:00 ARST 1
|
||||
tStamp=Sunday 1992-10-18 17:17:17 -02 1
|
||||
result=Sunday 1992-10-25 00:00:00 -02 1
|
||||
wanted=Sunday 00:00:00
|
||||
|
||||
TZ=America/Catamarca - wrong day.
|
||||
tStamp=Sunday 1990-10-21 17:17:17 ARST 1
|
||||
result=Sunday 1990-10-28 00:00:00 ARST 1
|
||||
tStamp=Sunday 1990-10-21 17:17:17 -02 1
|
||||
result=Sunday 1990-10-28 00:00:00 -02 1
|
||||
wanted=Sunday 00:00:00
|
||||
|
||||
TZ=America/Cordoba - wrong day.
|
||||
tStamp=Sunday 1990-10-21 17:17:17 ARST 1
|
||||
result=Sunday 1990-10-28 00:00:00 ARST 1
|
||||
tStamp=Sunday 1990-10-21 17:17:17 -02 1
|
||||
result=Sunday 1990-10-28 00:00:00 -02 1
|
||||
wanted=Sunday 00:00:00
|
||||
|
||||
TZ=America/Rosario - wrong day.
|
||||
tStamp=Tuesday 1991-10-15 17:17:17 WART 0
|
||||
result=Tuesday 1991-10-22 00:00:00 ARST 1
|
||||
tStamp=Tuesday 1991-10-15 17:17:17 -04 0
|
||||
result=Tuesday 1991-10-22 00:00:00 -02 1
|
||||
wanted=Tuesday 00:00:00
|
||||
|
||||
TZ=Europe/Vienna - wrong day - giving unexpected results, at
|
||||
@@ -231,8 +231,8 @@ result=Monday 1992-09-28 00:00:00 +04 0
|
||||
wanted=Monday 00:00:00
|
||||
|
||||
TZ=America/Noronha - wrong day.
|
||||
tStamp=Friday 1999-10-01 17:17:17 FNT 0
|
||||
result=Friday 1999-10-08 00:00:00 FNST 1
|
||||
tStamp=Friday 1999-10-01 17:17:17 -02 0
|
||||
result=Friday 1999-10-08 00:00:00 -01 1
|
||||
wanted=Friday 00:00:00
|
||||
|
||||
TZ=America/Havana - wrong day.
|
||||
@@ -256,13 +256,13 @@ result=Friday 2003-04-04 00:00:00 EEST 1
|
||||
wanted=Friday 00:00:00
|
||||
|
||||
TZ=Pacific/Kwajalein - wrong day.
|
||||
tStamp=Friday 1993-08-13 17:17:17 KWAT 0
|
||||
result=Saturday 1993-08-21 00:00:00 MHT 0
|
||||
tStamp=Friday 1993-08-13 17:17:17 -12 0
|
||||
result=Saturday 1993-08-21 00:00:00 +12 0
|
||||
wanted=Friday 00:00:00
|
||||
|
||||
TZ=Asia/Ulan_Bator - wrong day.
|
||||
tStamp=Saturday 2001-09-22 17:17:17 ULAST 1
|
||||
result=Saturday 2001-09-29 00:00:00 ULAST 1
|
||||
tStamp=Saturday 2001-09-22 17:17:17 +09 1
|
||||
result=Saturday 2001-09-29 00:00:00 +09 1
|
||||
wanted=Saturday 00:00:00
|
||||
|
||||
TZ=America/Cancun - wrong day.
|
||||
@@ -286,18 +286,18 @@ result=Thursday 2002-04-11 00:00:00 MDT 1
|
||||
wanted=Thursday 00:00:00
|
||||
|
||||
TZ=Asia/Kuala_Lumpur - wrong day.
|
||||
tStamp=Monday 1981-12-28 17:17:17 MALT 0
|
||||
result=Monday 1982-01-04 00:00:00 MYT 0
|
||||
tStamp=Monday 1981-12-28 17:17:17 +0730 0
|
||||
result=Monday 1982-01-04 00:00:00 +08 0
|
||||
wanted=Monday 00:00:00
|
||||
|
||||
TZ=Pacific/Chatham - wrong day.
|
||||
tStamp=Monday 1974-10-28 17:17:17 CHAST 0
|
||||
result=Monday 1974-11-04 00:00:00 CHADT 1
|
||||
tStamp=Monday 1974-10-28 17:17:17 +1245 0
|
||||
result=Monday 1974-11-04 00:00:00 +1345 1
|
||||
wanted=Monday 00:00:00
|
||||
|
||||
TZ=America/Lima - wrong day.
|
||||
tStamp=Thursday 1985-12-26 17:17:17 PET 0
|
||||
result=Thursday 1986-01-02 00:00:00 PEST 1
|
||||
tStamp=Thursday 1985-12-26 17:17:17 -05 0
|
||||
result=Thursday 1986-01-02 00:00:00 -04 1
|
||||
wanted=Thursday 00:00:00
|
||||
|
||||
TZ=Asia/Karachi - wrong day.
|
||||
@@ -306,16 +306,16 @@ result=Friday 2002-04-12 00:00:00 PKST 1
|
||||
wanted=Friday 00:00:00
|
||||
|
||||
TZ=America/Asuncion - wrong day.
|
||||
tStamp=Wednesday 2002-02-27 17:17:17 PYST 1
|
||||
result=Wednesday 2002-03-06 00:00:00 PYST 1
|
||||
tStamp=Wednesday 2002-02-27 17:17:17 -03 1
|
||||
result=Wednesday 2002-03-06 00:00:00 -03 1
|
||||
wanted=Wednesday 00:00:00
|
||||
|
||||
TZ=Asia/Singapore - wrong day.
|
||||
tStamp=Thursday 1981-12-31 17:17:17 SGT 0
|
||||
result=Thursday 1982-01-07 00:00:00 SGT 0
|
||||
tStamp=Thursday 1981-12-31 17:17:17 +0730 0
|
||||
result=Thursday 1982-01-07 00:00:00 +08 0
|
||||
wanted=Thursday 00:00:00
|
||||
|
||||
TZ=America/Montevideo - wrong day.
|
||||
tStamp=Thursday 2004-09-16 17:17:17 UYT 0
|
||||
result=Thursday 2004-09-23 00:00:00 UYST 1
|
||||
tStamp=Thursday 2004-09-16 17:17:17 -03 0
|
||||
result=Thursday 2004-09-23 00:00:00 -02 1
|
||||
wanted=Thursday 00:00:00
|
||||
@@ -76,13 +76,13 @@ print "wanted=Friday 00:00:00\n\n";
|
||||
?>
|
||||
--EXPECT--
|
||||
TZ=Pacific/Rarotonga - wrong day.
|
||||
tStamp=Thursday 1970-01-01 17:17:17 CKT 0
|
||||
result=Tuesday 1970-01-06 00:00:00 CKT 0
|
||||
tStamp=Thursday 1970-01-01 17:17:17 -1030 0
|
||||
result=Tuesday 1970-01-06 00:00:00 -1030 0
|
||||
wanted=Tuesday 00:00:00
|
||||
|
||||
TZ=Atlantic/South_Georgia - wrong day.
|
||||
tStamp=Thursday 1970-01-01 17:17:17 GST 0
|
||||
result=Tuesday 1970-01-06 00:00:00 GST 0
|
||||
tStamp=Thursday 1970-01-01 17:17:17 -02 0
|
||||
result=Tuesday 1970-01-06 00:00:00 -02 0
|
||||
wanted=Tuesday 00:00:00
|
||||
|
||||
TZ=America/Port-au-Prince - wrong day.
|
||||
@@ -91,13 +91,13 @@ result=Monday 2005-04-04 00:00:00 EDT 1
|
||||
wanted=Monday 00:00:00
|
||||
|
||||
TZ=Pacific/Enderbury - wrong day, off by 2 days.
|
||||
tStamp=Thursday 1970-01-01 17:17:17 PHOT 0
|
||||
result=Monday 1970-01-05 00:00:00 PHOT 0
|
||||
tStamp=Thursday 1970-01-01 17:17:17 -12 0
|
||||
result=Monday 1970-01-05 00:00:00 -12 0
|
||||
wanted=Monday 00:00:00
|
||||
|
||||
TZ=Pacific/Kiritimati - wrong day, off by 2 days.
|
||||
tStamp=Thursday 1970-01-01 17:17:17 LINT 0
|
||||
result=Monday 1970-01-05 00:00:00 LINT 0
|
||||
tStamp=Thursday 1970-01-01 17:17:17 -1040 0
|
||||
result=Monday 1970-01-05 00:00:00 -1040 0
|
||||
wanted=Monday 00:00:00
|
||||
|
||||
TZ=America/Managua - wrong day.
|
||||
@@ -106,13 +106,13 @@ result=Tuesday 2005-04-12 00:00:00 CDT 1
|
||||
wanted=Tuesday 00:00:00
|
||||
|
||||
TZ=Pacific/Pitcairn - wrong day.
|
||||
tStamp=Thursday 1970-01-01 17:17:17 PNT 0
|
||||
result=Wednesday 1970-01-07 00:00:00 PNT 0
|
||||
tStamp=Thursday 1970-01-01 17:17:17 -0830 0
|
||||
result=Wednesday 1970-01-07 00:00:00 -0830 0
|
||||
wanted=Wednesday 00:00:00
|
||||
|
||||
TZ=Pacific/Fakaofo - wrong day.
|
||||
tStamp=Thursday 1970-01-01 17:17:17 TKT 0
|
||||
result=Saturday 1970-01-03 00:00:00 TKT 0
|
||||
tStamp=Thursday 1970-01-01 17:17:17 -11 0
|
||||
result=Saturday 1970-01-03 00:00:00 -11 0
|
||||
wanted=Saturday 00:00:00
|
||||
|
||||
TZ=Pacific/Johnston - wrong day.
|
||||
|
||||
@@ -23,8 +23,8 @@ print "wanted=Sunday 00:00:00\n\n";
|
||||
--EXPECT--
|
||||
TZ=America/Jujuy - Is it OK for this to be 2 AM, rather than 1
|
||||
AM as per most DST transitions?
|
||||
tStamp=Monday 1990-10-15 17:17:17 WART 0
|
||||
result=Monday 1990-10-22 00:00:00 WART 0
|
||||
tStamp=Monday 1990-10-15 17:17:17 -04 0
|
||||
result=Monday 1990-10-22 00:00:00 -04 0
|
||||
wanted=Monday 00:00:00
|
||||
|
||||
TZ=Asia/Tbilisi - Is it OK for this to be 2 AM?
|
||||
|
||||
@@ -116,11 +116,11 @@ print "wanted=Monday 00:00:00\n\n";
|
||||
|
||||
print "TZ=Africa/Monrovia - Is it OK for this to be 00:44:30 AM? yes\n";
|
||||
date_default_timezone_set('Africa/Monrovia');
|
||||
$tStamp = mktime (17, 17, 17, 1, 845, 1970);
|
||||
$tStamp = mktime (17, 17, 17, 1, 730, 1970);
|
||||
print "tStamp=". date("l Y-m-d H:i:s T I", $tStamp). "\n";
|
||||
$strtotime_tstamp = strtotime("next Monday", $tStamp);
|
||||
$strtotime_tstamp = strtotime("next Friday", $tStamp);
|
||||
print "result=".date("l Y-m-d H:i:s T I", $strtotime_tstamp)."\n";
|
||||
print "wanted=Monday 00:44:30\n\n";
|
||||
print "wanted=Friday 00:44:30\n\n";
|
||||
|
||||
print "TZ=Asia/Katmandu - Is it OK for this to 0:15 AM?. yes\n";
|
||||
date_default_timezone_set('Asia/Katmandu');
|
||||
@@ -208,7 +208,7 @@ print "result=".date("l Y-m-d H:i:s T I", $strtotime_tstamp)."\n";
|
||||
print "wanted=Monday 00:30:00\n\n";
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
--EXPECTF--
|
||||
TZ=Africa/Bujumbura - *Note*: Unexpected, as does not appear to
|
||||
have a DST or timezone transition.
|
||||
tStamp=Thursday 1970-01-01 17:17:17 CAT 0
|
||||
@@ -216,14 +216,14 @@ result=Wednesday 1970-01-07 00:00:00 CAT 0
|
||||
wanted=Wednesday 00:00:00
|
||||
|
||||
TZ=Asia/Thimbu - Is it OK for this to be 0:30 AM? yes
|
||||
tStamp=Thursday 1987-09-24 17:17:17 IST 0
|
||||
result=Thursday 1987-10-01 00:30:00 BTT 0
|
||||
tStamp=Thursday 1987-09-24 17:17:17 +0530 0
|
||||
result=Thursday 1987-10-01 00:30:00 +06 0
|
||||
wanted=Thursday 00:30:00
|
||||
|
||||
TZ=Indian/Cocos - Is it OK for this to be 6:30 AM? Note: does not
|
||||
appear to have a DST or timezone transition.
|
||||
tStamp=Thursday 1970-01-01 17:17:17 CCT 0
|
||||
result=Thursday 1970-01-08 00:00:00 CCT 0
|
||||
tStamp=Thursday 1970-01-01 17:17:17 +0630 0
|
||||
result=Thursday 1970-01-08 00:00:00 +0630 0
|
||||
wanted=Thursday 00:00:00
|
||||
|
||||
TZ=Africa/Lubumbashi - Is it OK for this to be 2 AM? Note: does
|
||||
@@ -233,110 +233,110 @@ result=Saturday 1970-01-03 00:00:00 CAT 0
|
||||
wanted=Saturday 00:00:00
|
||||
|
||||
TZ=Asia/Kashgar - Is it OK for this to be 3 AM? yes
|
||||
tStamp=Thursday 1980-04-24 17:17:17 XJT 0
|
||||
result=Thursday 1980-05-01 00:00:00 XJT 0
|
||||
tStamp=Thursday 1980-04-24 17:17:17 +06 0
|
||||
result=Thursday 1980-05-01 00:00:00 +06 0
|
||||
wanted=Thursday 03:00:00
|
||||
|
||||
TZ=Indian/Christmas - Is it OK for this to be 7 AM? Note: does
|
||||
not appear to have a DST or timezone transition.
|
||||
tStamp=Thursday 1970-01-01 17:17:17 CXT 0
|
||||
result=Sunday 1970-01-04 00:00:00 CXT 0
|
||||
tStamp=Thursday 1970-01-01 17:17:17 +07 0
|
||||
result=Sunday 1970-01-04 00:00:00 +07 0
|
||||
wanted=Sunday 00:00:00
|
||||
|
||||
TZ=America/Santo_Domingo - Is it OK for this to be 0:30 AM? yes
|
||||
tStamp=Sunday 1970-10-18 17:17:17 EST 0
|
||||
result=Sunday 1970-10-25 00:30:00 EHDT 1
|
||||
result=Sunday 1970-10-25 00:30:00 -0430 1
|
||||
wanted=Sunday 00:30:00
|
||||
|
||||
TZ=Pacific/Truk - Is it OK for this to be 10 AM? Note: does not
|
||||
appear to have a DST or timezone transition.
|
||||
tStamp=Thursday 1970-01-01 17:17:17 CHUT 0
|
||||
result=Tuesday 1970-01-06 00:00:00 CHUT 0
|
||||
tStamp=Thursday 1970-01-01 17:17:17 +10 0
|
||||
result=Tuesday 1970-01-06 00:00:00 +10 0
|
||||
wanted=Tuesday 00:00:00
|
||||
|
||||
TZ=Pacific/Ponape - Is it OK for this to be 11 AM? Note: does
|
||||
not appear to have a DST or timezone transition.
|
||||
tStamp=Thursday 1970-01-01 17:17:17 PONT 0
|
||||
result=Monday 1970-01-05 00:00:00 PONT 0
|
||||
tStamp=Thursday 1970-01-01 17:17:17 +11 0
|
||||
result=Monday 1970-01-05 00:00:00 +11 0
|
||||
wanted=Monday 00:00:00
|
||||
|
||||
TZ=America/Scoresbysund - Is it OK for this to be 2 AM? yes
|
||||
tStamp=Sunday 1981-03-22 17:17:17 CGT 0
|
||||
result=Sunday 1981-03-29 02:00:00 EGST 1
|
||||
tStamp=Sunday 1981-03-22 17:17:17 -02 0
|
||||
result=Sunday 1981-03-29 02:00:00 +00 1
|
||||
wanted=Sunday 02:00:00
|
||||
|
||||
TZ=America/Guyana - Is it OK for this to be 0:45 AM? yes
|
||||
tStamp=Thursday 1975-07-24 17:17:17 GYT 0
|
||||
result=Thursday 1975-07-31 00:45:00 GYT 0
|
||||
tStamp=Thursday 1975-07-24 17:17:17 -0345 0
|
||||
result=Thursday 1975-07-31 00:45:00 -03 0
|
||||
wanted=Thursday 00:45:00
|
||||
|
||||
TZ=Asia/Tehran - Is it OK for this to be 0:30 AM? yes
|
||||
tStamp=Tuesday 1977-10-25 17:17:17 IRST 0
|
||||
result=Tuesday 1977-11-01 00:30:00 IRST 0
|
||||
tStamp=Tuesday 1977-10-25 17:17:17 +0330 0
|
||||
result=Tuesday 1977-11-01 00:30:00 +04 0
|
||||
wanted=Tuesday 00:30:00
|
||||
|
||||
TZ=Pacific/Tarawa - Is it OK for this to be Midday? Note: does
|
||||
not appear to have a DST or timezone transition.
|
||||
tStamp=Thursday 1970-01-01 17:17:17 GILT 0
|
||||
result=Monday 1970-01-05 00:00:00 GILT 0
|
||||
tStamp=Thursday 1970-01-01 17:17:17 +12 0
|
||||
result=Monday 1970-01-05 00:00:00 +12 0
|
||||
wanted=Monday 00:00:00
|
||||
|
||||
TZ=Africa/Monrovia - Is it OK for this to be 00:44:30 AM? yes
|
||||
tStamp=Monday 1972-04-24 17:17:17 LRT 0
|
||||
result=Monday 1972-05-01 00:44:30 GMT 0
|
||||
wanted=Monday 00:44:30
|
||||
tStamp=Friday 1971-12-31 17:17:17 MMT 0
|
||||
result=Friday 1972-01-07 00:44:30 GMT 0
|
||||
wanted=Friday 00:44:30
|
||||
|
||||
TZ=Asia/Katmandu - Is it OK for this to 0:15 AM?. yes
|
||||
tStamp=Wednesday 1985-12-25 17:17:17 IST 0
|
||||
result=Wednesday 1986-01-01 00:15:00 NPT 0
|
||||
tStamp=Wednesday 1985-12-25 17:17:17 +0530 0
|
||||
result=Wednesday 1986-01-01 00:15:00 +0545 0
|
||||
wanted=Wednesday 00:15:00
|
||||
|
||||
TZ=Pacific/Nauru - Is it OK for this to be 0:30? yes
|
||||
tStamp=Tuesday 1979-04-24 17:17:17 NRT 0
|
||||
result=Tuesday 1979-05-01 00:30:00 NRT 0
|
||||
tStamp=Tuesday 1979-04-24 17:17:17 +1130 0
|
||||
result=Tuesday 1979-05-01 00:30:00 +12 0
|
||||
wanted=Tuesday 00:30:00
|
||||
|
||||
TZ=Pacific/Niue - Is it OK for this to be 0:30 AM? yes
|
||||
tStamp=Sunday 1978-09-24 17:17:17 NUT 0
|
||||
result=Sunday 1978-10-01 00:30:00 NUT 0
|
||||
tStamp=Sunday 1978-09-24 17:17:17 -1130 0
|
||||
result=Sunday 1978-10-01 00:30:00 -11 0
|
||||
wanted=Sunday 00:30:00
|
||||
|
||||
TZ=Pacific/Port_Moresby - Is it OK for this to be 10 AM? No DST
|
||||
or timezone transition.
|
||||
tStamp=Thursday 1970-01-01 17:17:17 PGT 0
|
||||
result=Thursday 1970-01-08 00:00:00 PGT 0
|
||||
tStamp=Thursday 1970-01-01 17:17:17 +10 0
|
||||
result=Thursday 1970-01-08 00:00:00 +10 0
|
||||
wanted=Thursday 00:00:00
|
||||
|
||||
TZ=America/Miquelon - Is it OK for this to be 1 AM ? yes
|
||||
tStamp=Thursday 1980-04-24 17:17:17 AST 0
|
||||
result=Thursday 1980-05-01 01:00:00 PMST 0
|
||||
result=Thursday 1980-05-01 01:00:00 -03 0
|
||||
wanted=Thursday 01:00:00
|
||||
|
||||
TZ=Pacific/Palau - Is it OK for this to be 9 AM? No DST or
|
||||
timezone transition.
|
||||
tStamp=Thursday 1970-01-01 17:17:17 PWT 0
|
||||
result=Saturday 1970-01-03 00:00:00 PWT 0
|
||||
tStamp=Thursday 1970-01-01 17:17:17 +09 0
|
||||
result=Saturday 1970-01-03 00:00:00 +09 0
|
||||
wanted=Saturday 00:00:00
|
||||
|
||||
TZ=Pacific/Funafuti - Is it OK for this to be midday? Note: does
|
||||
not appear to have a DST or timezone transition.
|
||||
tStamp=Thursday 1970-01-01 17:17:17 TVT 0
|
||||
result=Wednesday 1970-01-07 00:00:00 TVT 0
|
||||
tStamp=Thursday 1970-01-01 17:17:17 +12 0
|
||||
result=Wednesday 1970-01-07 00:00:00 +12 0
|
||||
wanted=Wednesday 00:00:00
|
||||
|
||||
TZ=Pacific/Wake - Is it OK for this to be midday? Note: does not
|
||||
appear to have a DST or timezone transition.
|
||||
tStamp=Thursday 1970-01-01 17:17:17 WAKT 0
|
||||
result=Tuesday 1970-01-06 00:00:00 WAKT 0
|
||||
tStamp=Thursday 1970-01-01 17:17:17 +12 0
|
||||
result=Tuesday 1970-01-06 00:00:00 +12 0
|
||||
wanted=Tuesday 00:00:00
|
||||
|
||||
TZ=Pacific/Wallis - Is it OK for this to be midday? Note: does
|
||||
not appear to have a DST or timezone transition.
|
||||
tStamp=Thursday 1970-01-01 17:17:17 WFT 0
|
||||
result=Tuesday 1970-01-06 00:00:00 WFT 0
|
||||
tStamp=Thursday 1970-01-01 17:17:17 +12 0
|
||||
result=Tuesday 1970-01-06 00:00:00 +12 0
|
||||
wanted=Tuesday 00:00:00
|
||||
|
||||
TZ=America/Paramaribo - Is it OK for this to be 0:30 AM? yes
|
||||
tStamp=Monday 1984-09-24 17:17:17 SRT 0
|
||||
result=Monday 1984-10-01 00:30:00 SRT 0
|
||||
tStamp=Monday 1984-09-24 17:17:17 -0330 0
|
||||
result=Monday 1984-10-01 00:30:00 -03 0
|
||||
wanted=Monday 00:30:00
|
||||
@@ -0,0 +1,34 @@
|
||||
--TEST--
|
||||
Bug #72096: Swatch time value incorrect for dates before 1970
|
||||
--INI--
|
||||
date.timezone=UTC
|
||||
--FILE--
|
||||
<?php
|
||||
for ($unix = 1461283200; $unix <= 1461369600; $unix += 8000) {
|
||||
echo "Time:", gmdate('Y-m-d H:i:s = B', $unix), PHP_EOL;
|
||||
echo "Time:", gmdate('Y-m-d H:i:s = B', $unix - 82 * 365 * 24 * 3600), PHP_EOL;
|
||||
}
|
||||
?>
|
||||
--EXPECT--
|
||||
Time:2016-04-22 00:00:00 = 041
|
||||
Time:1934-05-13 00:00:00 = 041
|
||||
Time:2016-04-22 02:13:20 = 134
|
||||
Time:1934-05-13 02:13:20 = 134
|
||||
Time:2016-04-22 04:26:40 = 226
|
||||
Time:1934-05-13 04:26:40 = 226
|
||||
Time:2016-04-22 06:40:00 = 319
|
||||
Time:1934-05-13 06:40:00 = 319
|
||||
Time:2016-04-22 08:53:20 = 412
|
||||
Time:1934-05-13 08:53:20 = 412
|
||||
Time:2016-04-22 11:06:40 = 504
|
||||
Time:1934-05-13 11:06:40 = 504
|
||||
Time:2016-04-22 13:20:00 = 597
|
||||
Time:1934-05-13 13:20:00 = 597
|
||||
Time:2016-04-22 15:33:20 = 689
|
||||
Time:1934-05-13 15:33:20 = 689
|
||||
Time:2016-04-22 17:46:40 = 782
|
||||
Time:1934-05-13 17:46:40 = 782
|
||||
Time:2016-04-22 20:00:00 = 875
|
||||
Time:1934-05-13 20:00:00 = 875
|
||||
Time:2016-04-22 22:13:20 = 967
|
||||
Time:1934-05-13 22:13:20 = 967
|
||||
@@ -0,0 +1,20 @@
|
||||
--TEST--
|
||||
Bug #72719: Relative datetime format ignores weekday on sundays only
|
||||
--FILE--
|
||||
<?php
|
||||
echo (new DateTimeImmutable('Monday next week 13:00'))->format('l'), "\n";
|
||||
echo (new DateTimeImmutable('Tuesday next week 14:00'))->format('l'), "\n";
|
||||
echo (new DateTimeImmutable('Wednesday next week 14:00'))->format('l'), "\n";
|
||||
echo (new DateTimeImmutable('Thursday next week 15:00'))->format('l'), "\n";
|
||||
echo (new DateTimeImmutable('Friday next week 16:00'))->format('l'), "\n";
|
||||
echo (new DateTimeImmutable('Saturday next week 17:00'))->format('l'), "\n";
|
||||
echo (new DateTimeImmutable('Sunday next week 18:00'))->format('l'), "\n";
|
||||
?>
|
||||
--EXPECT--
|
||||
Monday
|
||||
Tuesday
|
||||
Wednesday
|
||||
Thursday
|
||||
Friday
|
||||
Saturday
|
||||
Sunday
|
||||
@@ -0,0 +1,22 @@
|
||||
--TEST--
|
||||
Bug #73294: DateTime wrong when date string is negative
|
||||
--FILE--
|
||||
<?php
|
||||
for ( $i = -1050; $i <= -1000; $i++ )
|
||||
{
|
||||
$M = "06";
|
||||
$D = "22";
|
||||
|
||||
$dt = new DateTime("{$i}-{$M}-{$D} 00:00:00");
|
||||
$expected = "{$i}-{$M}-{$D} 00:00:00";
|
||||
$result = $dt->format('Y-m-d H:i:s');
|
||||
|
||||
if ( $expected != $result )
|
||||
{
|
||||
echo "Wrong: Should have been {$expected}, was {$result}\n";
|
||||
}
|
||||
}
|
||||
?>
|
||||
==DONE==
|
||||
--EXPECT--
|
||||
==DONE==
|
||||
@@ -0,0 +1,24 @@
|
||||
--TEST--
|
||||
Bug #73489: wrong timestamp when call setTimeZone multi times with UTC offset
|
||||
--FILE--
|
||||
<?php
|
||||
// example 1 - Timestamp is changing
|
||||
$datetime = new DateTime('2016-11-09 20:00:00', new DateTimeZone('UTC'));
|
||||
var_dump($datetime->getTimestamp());
|
||||
$datetime->setTimeZone(new DateTimeZone('-03:00'));
|
||||
$datetime->setTimeZone(new DateTimeZone('-03:00'));
|
||||
var_dump($datetime->getTimestamp());
|
||||
|
||||
// example 2 - Timestamp keeps if you use getTimestamp() before second setTimeZone() calls
|
||||
$datetime = new DateTime('2016-11-09 20:00:00', new DateTimeZone('UTC'));
|
||||
var_dump($datetime->getTimestamp());
|
||||
$datetime->setTimeZone(new DateTimeZone('-03:00'));
|
||||
$datetime->getTimestamp();
|
||||
$datetime->setTimeZone(new DateTimeZone('-03:00'));
|
||||
var_dump($datetime->getTimestamp());
|
||||
?>
|
||||
--EXPECT--
|
||||
int(1478721600)
|
||||
int(1478721600)
|
||||
int(1478721600)
|
||||
int(1478721600)
|
||||
@@ -0,0 +1,63 @@
|
||||
--TEST--
|
||||
Bug #73858: diff() of two relative/described DateTimes is wrong
|
||||
--FILE--
|
||||
<?php
|
||||
/*
|
||||
In the "verbose setup method" I'm trying setup the DateTime object myself
|
||||
to see if it's the format string which is parsed in correctly or if it's the DateTime
|
||||
object which is breaking stuff. From the testing it appears DateTime is broken somehow.
|
||||
*/
|
||||
$ss = 'february first day of last month midnight';
|
||||
$es = 'february first day of this month midnight - 1 second';
|
||||
|
||||
$s = new DateTime($ss);
|
||||
$e = new DateTime($es);
|
||||
$d= $e->diff($s);
|
||||
var_dump($d->days); // 0 ... but should be 30
|
||||
|
||||
$s = (new DateTime(null))->setTimestamp(strtotime($ss)); // verbose setup method
|
||||
$e = (new DateTime(null))->setTimestamp(strtotime($es)); // verbose setup method
|
||||
$d = $e->diff($s);
|
||||
var_dump($d->days); // 30 ... and should be 30
|
||||
|
||||
/*
|
||||
Next we will try mix/match the code to see what happens, surprisingly it seems that the end date ($e)
|
||||
is the important one, if it uses the verbose method it returns the correct values.
|
||||
*/
|
||||
$s = (new DateTime(null))->setTimestamp(strtotime($ss)); // verbose setup method
|
||||
$e = new DateTime($es);
|
||||
$d= $e->diff($s);
|
||||
var_dump($d->days); // 0 ... but should be 30
|
||||
|
||||
$s = new DateTime($ss);
|
||||
$e = (new DateTime(null))->setTimestamp(strtotime($es)); // verbose setup method
|
||||
$d= $e->diff($s);
|
||||
var_dump($d->days); // 30 ... and should be 30
|
||||
|
||||
/*
|
||||
This test just proves that the $e date is important BUT NOT because it's the one we call the diff() method
|
||||
on, that's just coincidental that seems to imply that the "- 1 second" in the date string is the problem.
|
||||
*/
|
||||
$s = new DateTime($ss);
|
||||
$e = (new DateTime(null))->setTimestamp(strtotime($es)); // verbose setup method
|
||||
$d= $s->diff($e);
|
||||
var_dump($d->days); // 30 ... and should be 30
|
||||
|
||||
/*
|
||||
[Workaround]
|
||||
This final test seems to prove that the input string is important and that the "- 1 secord" has a negative knock-on
|
||||
effect on the results of the diff. By modifying the datetime with ->modify everything works as expected ...
|
||||
it just means you have to be careful of how we work with DateTimes .
|
||||
*/
|
||||
$s = new DateTime($ss);
|
||||
$e = new DateTime('february first day of this month midnight');
|
||||
$e->modify('- 1 second');
|
||||
var_dump($e->diff($s)->days); // 30 ... and should be 30
|
||||
?>
|
||||
--EXPECT--
|
||||
int(30)
|
||||
int(30)
|
||||
int(30)
|
||||
int(30)
|
||||
int(30)
|
||||
int(30)
|
||||
@@ -0,0 +1,12 @@
|
||||
--TEST--
|
||||
Bug #73942: $date->modify('Friday this week') doesn't return a Friday if $date is a Sunday
|
||||
--FILE--
|
||||
<?php
|
||||
$date1 = "2017-01-08"; // this is a Sunday
|
||||
$date = new \DateTime($date1);
|
||||
$date->modify('Friday this week');
|
||||
$dateFormat = $date->format('Y-m-d');
|
||||
echo $dateFormat, "\n";
|
||||
?>
|
||||
--EXPECT--
|
||||
2017-01-06
|
||||
@@ -0,0 +1,24 @@
|
||||
--TEST--
|
||||
Bug #74057: wrong day when using "this week" in strtotime
|
||||
--FILE--
|
||||
<?php
|
||||
echo date("D Y-m-d", strtotime("saturday this week", strtotime("Sun 2017-01-01")))."\n";
|
||||
echo date("D Y-m-d", strtotime("saturday this week", strtotime("Mon 2017-01-02")))."\n";
|
||||
echo date("D Y-m-d", strtotime("saturday this week", strtotime("Tue 2017-01-03")))."\n";
|
||||
echo date("D Y-m-d", strtotime("saturday this week", strtotime("Wed 2017-01-04")))."\n";
|
||||
echo date("D Y-m-d", strtotime("saturday this week", strtotime("Thu 2017-01-05")))."\n";
|
||||
echo date("D Y-m-d", strtotime("saturday this week", strtotime("Fri 2017-01-06")))."\n";
|
||||
echo date("D Y-m-d", strtotime("saturday this week", strtotime("Sat 2017-01-07")))."\n";
|
||||
echo date("D Y-m-d", strtotime("saturday this week", strtotime("Sun 2017-01-08")))."\n";
|
||||
echo date("D Y-m-d", strtotime("saturday this week", strtotime("Mon 2017-01-09")))."\n";
|
||||
?>
|
||||
--EXPECT--
|
||||
Sat 2016-12-31
|
||||
Sat 2017-01-07
|
||||
Sat 2017-01-07
|
||||
Sat 2017-01-07
|
||||
Sat 2017-01-07
|
||||
Sat 2017-01-07
|
||||
Sat 2017-01-07
|
||||
Sat 2017-01-07
|
||||
Sat 2017-01-14
|
||||
@@ -0,0 +1,11 @@
|
||||
--TEST--
|
||||
Bug #74080 Provide an RFC7231 date time format
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$date = mktime(17, 52, 13, 4, 30, 2016);
|
||||
var_dump(date(\DateTime::RFC7231, $date));
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
string(29) "Sat, 30 Apr 2016 17:52:13 GMT"
|
||||
@@ -0,0 +1,17 @@
|
||||
--TEST--
|
||||
Bug #74852 property_exists returns true on unknown DateInterval property
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$interval = new DateInterval('P2D');
|
||||
var_dump(property_exists($interval,'abcde'));
|
||||
var_dump(isset($interval->abcde));
|
||||
var_dump($interval->abcde);
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
bool(false)
|
||||
bool(false)
|
||||
|
||||
Notice: Undefined property: DateInterval::$abcde in %s on line %d
|
||||
NULL
|
||||
@@ -0,0 +1,22 @@
|
||||
--TEST--
|
||||
Bug #75002 Null Pointer Dereference in timelib_time_clone
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class aaa extends DatePeriod {
|
||||
public function __construct() { }
|
||||
}
|
||||
|
||||
$start=new DateTime( '2012-08-01' );
|
||||
|
||||
foreach (new aaa($start) as $y) {
|
||||
$a=$key;
|
||||
}
|
||||
|
||||
?>
|
||||
==DONE==
|
||||
--EXPECTF--
|
||||
Fatal error: Uncaught Error: DatePeriod has not been initialized correctly in %sbug75002.php:%d
|
||||
Stack trace:
|
||||
#0 {main}
|
||||
thrown in %sbug75002.php on line %d
|
||||
@@ -34,14 +34,14 @@ foreach ( $tests as $start => $data )
|
||||
echo "\n";
|
||||
?>
|
||||
--EXPECT--
|
||||
Sat, 23 Oct 2010 00:00:00 +0000
|
||||
Fri, 15 Oct 2010 23:00:00 +0000
|
||||
Wed, 15 Dec 2010 16:15:00 +0000
|
||||
Mon, 20 Dec 2010 00:00:00 +0000
|
||||
Mon, 20 Dec 2010 10:00:00 +0000
|
||||
Tue, 21 Dec 2010 12:00:00 +0000
|
||||
Mon, 03 Jan 2011 00:00:00 +0000
|
||||
Mon, 03 Jan 2011 09:00:00 +0000
|
||||
Sat, 23 Oct 2010 00:00:00 +0100
|
||||
Fri, 15 Oct 2010 23:00:00 +0100
|
||||
Sun, 28 Mar 2010 00:15:00 +0000
|
||||
Sun, 28 Mar 2010 02:15:00 +0100
|
||||
Sun, 28 Mar 2010 02:15:00 +0100
|
||||
Loaded 100 of 540 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user