mirror of
https://github.com/bdnugget/php-src.git
synced 2026-11-15 05:00:49 +00:00
Compare commits
657
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8232d6f6bd | ||
|
|
e75d58b4e4 | ||
|
|
e85cae8ef4 | ||
|
|
d317e16e89 | ||
|
|
747cb46244 | ||
|
|
4f984a2fdb | ||
|
|
85874af404 | ||
|
|
e175a0a1c8 | ||
|
|
e29922f054 | ||
|
|
d3237b5504 | ||
|
|
5f6eaf355c | ||
|
|
33dd25d21c | ||
|
|
f9895b4bf5 | ||
|
|
8c2b3b0568 | ||
|
|
2bdb13a1f7 | ||
|
|
736cd93ef5 | ||
|
|
89c327f884 | ||
|
|
b61b60d15b | ||
|
|
16c4910876 | ||
|
|
469820048d | ||
|
|
74699533e5 | ||
|
|
5249993814 | ||
|
|
813305b67f | ||
|
|
8daf96cef3 | ||
|
|
832b5c7b9d | ||
|
|
fa89c41f37 | ||
|
|
52f049879a | ||
|
|
326cd05dae | ||
|
|
36943dfff1 | ||
|
|
c00fd843d7 | ||
|
|
2213bd36fd | ||
|
|
57b4dcbe77 | ||
|
|
4b5cdda0c7 | ||
|
|
1c9b62fbd4 | ||
|
|
bea2ff88c9 | ||
|
|
ab061f95ca | ||
|
|
4f50d58cab | ||
|
|
ce035dc4a0 | ||
|
|
45a7723267 | ||
|
|
c7c7ab53ac | ||
|
|
d2cde0bfd3 | ||
|
|
3725a446ba | ||
|
|
22ac57b064 | ||
|
|
e2a6bf482f | ||
|
|
7439d48bea | ||
|
|
900bdcbd03 | ||
|
|
74ac3dd6e2 | ||
|
|
46561dab6a | ||
|
|
4ba8d78100 | ||
|
|
96c84b7bc1 | ||
|
|
a0163417ef | ||
|
|
daf1fc6e31 | ||
|
|
bbd481c11d | ||
|
|
3164186d53 | ||
|
|
6fd6ad8f53 | ||
|
|
cbf589b17c | ||
|
|
d6ca174d5b | ||
|
|
736af5f660 | ||
|
|
a8f60ac9dd | ||
|
|
9fd555f99e | ||
|
|
46894580b0 | ||
|
|
2fdd142f99 | ||
|
|
d6fdc17f7f | ||
|
|
195c2008e8 | ||
|
|
26f45cb4bb | ||
|
|
4b15f7ca09 | ||
|
|
05d6878b3b | ||
|
|
11654fdfa6 | ||
|
|
fd3118ffb0 | ||
|
|
8a03fd6a5e | ||
|
|
19e6abebc7 | ||
|
|
2624c9a505 | ||
|
|
7d19668f60 | ||
|
|
ab61d5caf9 | ||
|
|
3322c78a88 | ||
|
|
114c03b9a6 | ||
|
|
239e2dda64 | ||
|
|
1d6e9da743 | ||
|
|
1ce8c805e2 | ||
|
|
545412a6cd | ||
|
|
cf183a5e2c | ||
|
|
abaf9a76dc | ||
|
|
f45eb353d1 | ||
|
|
a6d219630c | ||
|
|
f4d078b1c7 | ||
|
|
9a2b42a5c1 | ||
|
|
5b1bb23edf | ||
|
|
05560b67bc | ||
|
|
0505fbf2e5 | ||
|
|
d295e1dce2 | ||
|
|
f2fb37a772 | ||
|
|
752a34fb2c | ||
|
|
8ce04df7e0 | ||
|
|
3c42471ef8 | ||
|
|
a5d3620d93 | ||
|
|
f7596d1b5b | ||
|
|
3124129ca8 | ||
|
|
848bc776ea | ||
|
|
2fcb5eadbb | ||
|
|
2fc5d00afa | ||
|
|
209e37db7d | ||
|
|
0805e132b0 | ||
|
|
6fcde56b03 | ||
|
|
2046b3ce4f | ||
|
|
e546d721e8 | ||
|
|
45db6fa567 | ||
|
|
466f91bb3b | ||
|
|
f6bfbe9553 | ||
|
|
7df50ef147 | ||
|
|
66c48e8694 | ||
|
|
37d27e666a | ||
|
|
878704ff6f | ||
|
|
115f6effec | ||
|
|
91c4abcfcc | ||
|
|
ab938d7bbc | ||
|
|
99c67804d5 | ||
|
|
8a9df88597 | ||
|
|
915fe2fdc6 | ||
|
|
d2331cc3f2 | ||
|
|
7530938670 | ||
|
|
8f949eba80 | ||
|
|
8c9c58436b | ||
|
|
ed099ab186 | ||
|
|
954d073833 | ||
|
|
3ddb63dce1 | ||
|
|
d0f4966b05 | ||
|
|
bc4c4c658c | ||
|
|
087051c9a5 | ||
|
|
1a184f030a | ||
|
|
f53af9ac23 | ||
|
|
8509970e6a | ||
|
|
e65adc9c19 | ||
|
|
9c89f43d55 | ||
|
|
697945aa89 | ||
|
|
9cd365e571 | ||
|
|
f989a4cd44 | ||
|
|
623d897998 | ||
|
|
0701835c01 | ||
|
|
33e556fab4 | ||
|
|
0d6c2448a7 | ||
|
|
698088ca7c | ||
|
|
398b308316 | ||
|
|
e76dea4283 | ||
|
|
0fa13028cb | ||
|
|
85e7668129 | ||
|
|
003c13d7bc | ||
|
|
6bf5c8508a | ||
|
|
3e139a4653 | ||
|
|
f53b8268d6 | ||
|
|
e3255a4f49 | ||
|
|
85b001974a | ||
|
|
e11ed02870 | ||
|
|
03efeda538 | ||
|
|
409e9ea51d | ||
|
|
175f4f24ae | ||
|
|
c5d4c45e7d | ||
|
|
e691a98c1f | ||
|
|
3a2fa489dd | ||
|
|
252ebce0d7 | ||
|
|
f98684b06c | ||
|
|
29bced9521 | ||
|
|
8a11f1284e | ||
|
|
2f6efd835d | ||
|
|
74876f09c4 | ||
|
|
8873df8e86 | ||
|
|
da8aa4a798 | ||
|
|
81cefab7b0 | ||
|
|
00ad365125 | ||
|
|
fdcca93056 | ||
|
|
df982da587 | ||
|
|
31f617d9bc | ||
|
|
f6f981c13c | ||
|
|
716518373f | ||
|
|
6f0e5a45ff | ||
|
|
2823e938d4 | ||
|
|
e2bdd7b4ab | ||
|
|
a270eb1911 | ||
|
|
664b1a3f57 | ||
|
|
c43fc204b1 | ||
|
|
cf31210f29 | ||
|
|
318b92dc12 | ||
|
|
bca66002f1 | ||
|
|
3f2d5c612e | ||
|
|
1ac6b0251b | ||
|
|
73ede6911d | ||
|
|
af2033b1cd | ||
|
|
8ead77936e | ||
|
|
60cfa5781a | ||
|
|
b90cd91eba | ||
|
|
41a4379cb4 | ||
|
|
d66e0f165d | ||
|
|
9c3b7ccda5 | ||
|
|
f712925500 | ||
|
|
86ddc469f9 | ||
|
|
cd63908ab8 | ||
|
|
7659182632 | ||
|
|
5a0980f1d9 | ||
|
|
e9cfd94b8e | ||
|
|
8f564e5308 | ||
|
|
34edd4aa2a | ||
|
|
ed749edd47 | ||
|
|
195b8ae779 | ||
|
|
b557265816 | ||
|
|
fadd7f0f1e | ||
|
|
481520d381 | ||
|
|
5748cec3ee | ||
|
|
e2b60796f0 | ||
|
|
88ab374627 | ||
|
|
ffcf57fa18 | ||
|
|
461db52400 | ||
|
|
589542f50c | ||
|
|
e4ecadcb62 | ||
|
|
1e82a2d659 | ||
|
|
f5bccc0eb5 | ||
|
|
a26f63213d | ||
|
|
16d35eb643 | ||
|
|
d1646e328a | ||
|
|
5d25ebb0dd | ||
|
|
4b4a656d9e | ||
|
|
7bf1f9d561 | ||
|
|
d3f2cfe20a | ||
|
|
5704eca6f7 | ||
|
|
087cb7bab2 | ||
|
|
1258303e66 | ||
|
|
03c7749dc8 | ||
|
|
c9d31941e4 | ||
|
|
ff7029b65b | ||
|
|
310708845f | ||
|
|
08aafbe93e | ||
|
|
963b40c9a8 | ||
|
|
3771d66142 | ||
|
|
cdf16c010a | ||
|
|
5e19f1d458 | ||
|
|
81f52158b4 | ||
|
|
be7e819068 | ||
|
|
a192499d2a | ||
|
|
725f439778 | ||
|
|
9b9814fa77 | ||
|
|
4966647443 | ||
|
|
8fb297cd82 | ||
|
|
1166359acb | ||
|
|
fcabe7e5e4 | ||
|
|
e5da73d1f2 | ||
|
|
4b64d47c99 | ||
|
|
5536105b67 | ||
|
|
fe7997912d | ||
|
|
a33361a37c | ||
|
|
4eeb41d1ea | ||
|
|
7ba54b9822 | ||
|
|
18f2918a0f | ||
|
|
4cd563d07e | ||
|
|
f3fdf570b3 | ||
|
|
7aa1dd3ba1 | ||
|
|
722a44d515 | ||
|
|
9b43e29d9b | ||
|
|
22d23e08c9 | ||
|
|
6b1cc1252e | ||
|
|
21a0a28fd0 | ||
|
|
2e2cd65d73 | ||
|
|
5ef1a30aaf | ||
|
|
796efd849e | ||
|
|
38f10ff5cf | ||
|
|
bff2743caf | ||
|
|
358379be22 | ||
|
|
9ea39d15ab | ||
|
|
954543cec6 | ||
|
|
a87ef5e3dd | ||
|
|
81efd489db | ||
|
|
f9f4a68368 | ||
|
|
d89157cd67 | ||
|
|
e1934f8515 | ||
|
|
85e8ccd55e | ||
|
|
b419b24ead | ||
|
|
8af14024c2 | ||
|
|
1c01a1579e | ||
|
|
ef439abd46 | ||
|
|
6ea13baaf1 | ||
|
|
b29ecec4ef | ||
|
|
8947fd9e9f | ||
|
|
d69894734d | ||
|
|
284fb08fdc | ||
|
|
cd1101e8c8 | ||
|
|
42e8b85d94 | ||
|
|
44fe025c28 | ||
|
|
dc7aa22b18 | ||
|
|
bbed5564eb | ||
|
|
38f1288b64 | ||
|
|
76683ea999 | ||
|
|
8e63bb5e46 | ||
|
|
552ce9c763 | ||
|
|
68fd435ba8 | ||
|
|
727929765b | ||
|
|
d142dfc93d | ||
|
|
aeb6d13185 | ||
|
|
dea2989ab8 | ||
|
|
585131f901 | ||
|
|
30eb4b3563 | ||
|
|
c624a7fe43 | ||
|
|
5649267b25 | ||
|
|
b42a13b08a | ||
|
|
9e2ac14702 | ||
|
|
8f384bea93 | ||
|
|
b59a9381b9 | ||
|
|
5e4dbce586 | ||
|
|
bdf24f8d6d | ||
|
|
82f35ab089 | ||
|
|
eb7e45f662 | ||
|
|
4a9f78f9d7 | ||
|
|
c8c183eb62 | ||
|
|
79efd55fc3 | ||
|
|
b864abfe23 | ||
|
|
e7e66d5275 | ||
|
|
956ecc2ce5 | ||
|
|
344d01bee3 | ||
|
|
bd0514913b | ||
|
|
eea9d61763 | ||
|
|
8a19fe29de | ||
|
|
bf1ace7dd3 | ||
|
|
c9037421ac | ||
|
|
c570980175 | ||
|
|
9ccf3fb996 | ||
|
|
2d737a1e4b | ||
|
|
88ffe05797 | ||
|
|
ad48464ec2 | ||
|
|
590d8f8263 | ||
|
|
a7ff3a6483 | ||
|
|
eab0079c90 | ||
|
|
193f28c7d5 | ||
|
|
3eb057c4a7 | ||
|
|
768ad70f70 | ||
|
|
3f73916f10 | ||
|
|
a7de2af46c | ||
|
|
9d141f9889 | ||
|
|
4a91f66b8f | ||
|
|
fa65f5ecf5 | ||
|
|
e7a83ec8df | ||
|
|
3fa9f9cfae | ||
|
|
825f47564a | ||
|
|
22ed362810 | ||
|
|
7404d756e9 | ||
|
|
40f7533cc1 | ||
|
|
e944ae6b2a | ||
|
|
4fcf8e9385 | ||
|
|
ed4aa4b624 | ||
|
|
f81be1aff6 | ||
|
|
e3c701ea38 | ||
|
|
5846e85283 | ||
|
|
920283ff2b | ||
|
|
c353f17d42 | ||
|
|
3ec8776940 | ||
|
|
32af676bd9 | ||
|
|
807c755670 | ||
|
|
cb1237a3ed | ||
|
|
af3c854074 | ||
|
|
0e48e35e04 | ||
|
|
4892bbc167 | ||
|
|
5e5b7cb4d4 | ||
|
|
44c8b7414c | ||
|
|
9ad09ce905 | ||
|
|
32c68428a9 | ||
|
|
41949bb71e | ||
|
|
7174c44557 | ||
|
|
a4acff3e21 | ||
|
|
3e25ddb07b | ||
|
|
57688ad7bf | ||
|
|
99e6c701e6 | ||
|
|
75bc3446f8 | ||
|
|
d714be0f57 | ||
|
|
be559e6c37 | ||
|
|
b039a4115f | ||
|
|
624488b5e8 | ||
|
|
cc3fe3bd30 | ||
|
|
aae5907cb7 | ||
|
|
07cdf0109f | ||
|
|
a149f9f3c0 | ||
|
|
b926690947 | ||
|
|
6cdeedb8de | ||
|
|
0a31836bed | ||
|
|
855bbc88c9 | ||
|
|
19d0a51533 | ||
|
|
f7327b6244 | ||
|
|
646debaf38 | ||
|
|
05c00a832c | ||
|
|
801ab18ea7 | ||
|
|
7d28a24c66 | ||
|
|
18bba63f39 | ||
|
|
4366f22dfc | ||
|
|
8326f95fe3 | ||
|
|
102c64e827 | ||
|
|
66e4b78519 | ||
|
|
99f3e0f0ed | ||
|
|
c939a67866 | ||
|
|
dfe6f0c1c6 | ||
|
|
a0da2fb2b7 | ||
|
|
e0bafc6da4 | ||
|
|
90cb3743be | ||
|
|
414db07bdb | ||
|
|
fea9f93166 | ||
|
|
a85254b898 | ||
|
|
fcd6f2de60 | ||
|
|
a0f370e78a | ||
|
|
676b564f43 | ||
|
|
d8202bf917 | ||
|
|
d7597f73cc | ||
|
|
b3cfeda3c7 | ||
|
|
27b5b46cb9 | ||
|
|
c2ee2e4c74 | ||
|
|
a197dc72c3 | ||
|
|
63f2d88088 | ||
|
|
35acda856a | ||
|
|
cd6a6e4cf2 | ||
|
|
7ba1e6b34d | ||
|
|
82021ad9df | ||
|
|
a5db319463 | ||
|
|
31a1c1e67c | ||
|
|
264536877d | ||
|
|
599b94ff14 | ||
|
|
025899e3b5 | ||
|
|
65067dff01 | ||
|
|
96663fd6ae | ||
|
|
d54220bc79 | ||
|
|
740d9ecdee | ||
|
|
efa1388cd3 | ||
|
|
e59b986fa7 | ||
|
|
11b354dd54 | ||
|
|
03db04c3ab | ||
|
|
9f0515c40c | ||
|
|
96a6f7f7f5 | ||
|
|
28808ca96d | ||
|
|
a5b39abd86 | ||
|
|
40f463b560 | ||
|
|
98457b6d60 | ||
|
|
5d2fe48785 | ||
|
|
c219d8d5c2 | ||
|
|
bada2049ca | ||
|
|
f1a8138055 | ||
|
|
ee137a7033 | ||
|
|
f8a68fd935 | ||
|
|
5d3e3a62a2 | ||
|
|
07c63c6fdf | ||
|
|
7350e808c5 | ||
|
|
bcf20963c1 | ||
|
|
feb92adc5c | ||
|
|
3080fc3971 | ||
|
|
05c60abfdb | ||
|
|
b215d1339f | ||
|
|
f3ff72e54b | ||
|
|
a0749fe483 | ||
|
|
199eb2b110 | ||
|
|
53b0f4ba4e | ||
|
|
65ada39360 | ||
|
|
15e01132cf | ||
|
|
10b208f28d | ||
|
|
9569a0b8ca | ||
|
|
d7c7522be9 | ||
|
|
972223c342 | ||
|
|
83cdb89f8a | ||
|
|
a5f98139c9 | ||
|
|
7d1aa7534d | ||
|
|
5f2f6180b9 | ||
|
|
2df32942d3 | ||
|
|
22a3fa0b2e | ||
|
|
249c20023d | ||
|
|
f4474e5724 | ||
|
|
d154301866 | ||
|
|
a3e6b50442 | ||
|
|
a4633b13d4 | ||
|
|
2d3bc71e89 | ||
|
|
9a495911c8 | ||
|
|
37bba7a678 | ||
|
|
ac60007bec | ||
|
|
8f69ca8dcd | ||
|
|
2e02579474 | ||
|
|
793fd6bce9 | ||
|
|
547665c720 | ||
|
|
59b0b38d3c | ||
|
|
2205546edf | ||
|
|
ee153deb1f | ||
|
|
b01d9fdab1 | ||
|
|
06eef1f70f | ||
|
|
d293f6dcff | ||
|
|
370997fb5d | ||
|
|
8b53c7232e | ||
|
|
dc586bff36 | ||
|
|
61a38bb274 | ||
|
|
de7d0256a3 | ||
|
|
5d67271db0 | ||
|
|
f3cd6931ca | ||
|
|
582469eef2 | ||
|
|
3051147019 | ||
|
|
6c73b2088a | ||
|
|
7821cc3b9f | ||
|
|
72c330f1e6 | ||
|
|
817b50826e | ||
|
|
59dfaa3f99 | ||
|
|
dee977b7a7 | ||
|
|
d661a75d54 | ||
|
|
5533f2490a | ||
|
|
9d473f1eac | ||
|
|
fbb6a27212 | ||
|
|
c34895e837 | ||
|
|
13dffa9d32 | ||
|
|
dc1d99e772 | ||
|
|
73ff4193be | ||
|
|
e63b2ba310 | ||
|
|
9bca9ef6cf | ||
|
|
c7eb0feed8 | ||
|
|
e77c8e45ba | ||
|
|
16e037bd46 | ||
|
|
7cf7148a8f | ||
|
|
ed6dee9a19 | ||
|
|
0cb43ec51c | ||
|
|
a0c9d0849a | ||
|
|
31ce1cbbb9 | ||
|
|
209b12e064 | ||
|
|
8baf3ffde6 | ||
|
|
6f9dfd9473 | ||
|
|
b394654c1e | ||
|
|
9a74b23297 | ||
|
|
d4867e099e | ||
|
|
fa6a4483e6 | ||
|
|
aa9c76d027 | ||
|
|
f308aa4e1e | ||
|
|
96404eb8e2 | ||
|
|
69c634a56d | ||
|
|
62fe6ba20c | ||
|
|
3a719696bc | ||
|
|
3a0de243c3 | ||
|
|
2d29263a9f | ||
|
|
7b42cdf95e | ||
|
|
97ba6b0d8b | ||
|
|
30f1b17262 | ||
|
|
fc4836b193 | ||
|
|
cd188d0398 | ||
|
|
bdce5849b7 | ||
|
|
367788cbc3 | ||
|
|
d23bc33dc1 | ||
|
|
e6a191de1b | ||
|
|
4ebd9a5366 | ||
|
|
5f8c22d415 | ||
|
|
11740abd6b | ||
|
|
202e6936d6 | ||
|
|
354a76bb80 | ||
|
|
a8a019d68a | ||
|
|
db8ef71353 | ||
|
|
64ec9f4dbe | ||
|
|
fd607635a4 | ||
|
|
e246dea9fe | ||
|
|
9d76fbd0c4 | ||
|
|
5846119e50 | ||
|
|
35353dc49a | ||
|
|
714d2d8ae1 | ||
|
|
8511c204c3 | ||
|
|
4fa32d67bf | ||
|
|
bb7ecb8704 | ||
|
|
a43678aa12 | ||
|
|
5c4d125d4c | ||
|
|
2d93cce03a | ||
|
|
1a98878bfe | ||
|
|
704a0ab0c9 | ||
|
|
aa74c30466 | ||
|
|
ad63bd169b | ||
|
|
69bab6e5a5 | ||
|
|
bec68d59a2 | ||
|
|
b6b15fc65c | ||
|
|
43e6fd1e2b | ||
|
|
f95b27c6f6 | ||
|
|
0cad701374 | ||
|
|
cc5c51e7f0 | ||
|
|
bec22af8d7 | ||
|
|
b15bfb9129 | ||
|
|
49b5ffe48c | ||
|
|
3759c6316d | ||
|
|
d2037b1bd4 | ||
|
|
af4143753f | ||
|
|
fd1ffa4692 | ||
|
|
27f168cf63 | ||
|
|
90318fbcbe | ||
|
|
35c80583f0 | ||
|
|
e46b3c3e70 | ||
|
|
e359812ce3 | ||
|
|
236522529c | ||
|
|
3d0a0f801b | ||
|
|
e2ef4e9e2f | ||
|
|
d19b6aa5ba | ||
|
|
d153fbc5a9 | ||
|
|
36a7d9fca4 | ||
|
|
9977de0028 | ||
|
|
78d24429f2 | ||
|
|
6b73e692c9 | ||
|
|
d91b643c87 | ||
|
|
1210c3b960 | ||
|
|
66b32f25d5 | ||
|
|
cb5af4e8a0 | ||
|
|
f80ad18afa | ||
|
|
506a764089 | ||
|
|
2c3933821f | ||
|
|
6c631ccfef | ||
|
|
a30b919872 | ||
|
|
18a9ae412f | ||
|
|
44494c09bc | ||
|
|
3891e0d13a | ||
|
|
3fc1bdc81c | ||
|
|
cd94cf60a2 | ||
|
|
ff2b5bda59 | ||
|
|
5da0579259 | ||
|
|
7faaf5a89a | ||
|
|
9bf11045db | ||
|
|
06b130579e | ||
|
|
fc9cdb723b | ||
|
|
f83c207d60 | ||
|
|
1bdd97a601 | ||
|
|
6d8892aacd | ||
|
|
91c6fb881e | ||
|
|
3309f2fbb9 | ||
|
|
57d5dc5688 | ||
|
|
e561d4100b | ||
|
|
16609880f8 | ||
|
|
70239ea1d3 | ||
|
|
7ddfe73e69 | ||
|
|
3e31ae5d70 | ||
|
|
bfbfb9dabd | ||
|
|
dcba479848 | ||
|
|
37ca6a7a2a | ||
|
|
ad0acc0aa9 | ||
|
|
fe202d99c8 | ||
|
|
191e15309f | ||
|
|
5d21a15cc3 | ||
|
|
68892410f7 | ||
|
|
4831e150c5 | ||
|
|
cedee4408b | ||
|
|
fb4c811835 | ||
|
|
ce73841cdc | ||
|
|
ccf051c317 | ||
|
|
0b8414832e | ||
|
|
2549f7d220 | ||
|
|
295c66911f | ||
|
|
4450288344 | ||
|
|
d1bce98597 | ||
|
|
06fa35568e | ||
|
|
fd4c42efab | ||
|
|
a7ada30ac6 | ||
|
|
3a04adce82 | ||
|
|
b2f49c69b1 | ||
|
|
e9aa0337ab | ||
|
|
bfadd9fdaf | ||
|
|
ac12cc85aa | ||
|
|
f0ccd9ffc6 | ||
|
|
d20053a556 | ||
|
|
6088713216 | ||
|
|
7b1a4e2400 | ||
|
|
ec8457d982 | ||
|
|
6fe75f9e45 | ||
|
|
e90bce7f08 | ||
|
|
6c44a71e4a | ||
|
|
f9a755d0d2 | ||
|
|
5ae49c43dc |
No files matched your search
+1
-1
@@ -16,7 +16,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.2.0beta4
|
||||
PHP_BUILD_SDK_BRANCH: php-sdk-2.2.0
|
||||
PHP_BUILD_CRT: vc15
|
||||
# ext and env setup for tests
|
||||
#MYSQL_TEST_PASSWD: Password12!
|
||||
|
||||
+10
-23
@@ -3,45 +3,32 @@
|
||||
root = true
|
||||
|
||||
[*]
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
end_of_line = lf
|
||||
charset = utf-8
|
||||
tab_width = 4
|
||||
|
||||
[*.{c,h,y,awk,w32,bat,mk,frag,cpp}]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
[{*.{awk,bat,c,cpp,d,h,l,mk,re,skl,w32,y},Makefile*}]
|
||||
indent_size = 4
|
||||
indent_style = tab
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
|
||||
[*.{php,phpt,inc}]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
[*.{dtd,html,inc,php,phpt,rng,wsdl,xml,xsd,xsl}]
|
||||
indent_size = 4
|
||||
indent_style = space
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
|
||||
[*.{yml,m4,sh}]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
[*.{ac,m4,sh,yml}]
|
||||
indent_size = 2
|
||||
indent_style = space
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
|
||||
[*.md]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
indent_style = space
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
max_line_length = 80
|
||||
|
||||
[COMMIT_EDITMSG]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
indent_size = 4
|
||||
indent_style = space
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
max_line_length = 80
|
||||
|
||||
[*.patch]
|
||||
trim_trailing_whitespace = false
|
||||
+2
-1
@@ -67,7 +67,8 @@ before_script:
|
||||
|
||||
# Run PHPs run-tests.php
|
||||
script:
|
||||
- ./sapi/cli/php run-tests.php -p `pwd`/sapi/cli/php $(if [ $ENABLE_DEBUG == 0 ]; then echo "-d opcache.enable_cli=1 -d zend_extension=`pwd`/modules/opcache.so"; fi) -g "FAIL,XFAIL,BORK,WARN,LEAK,SKIP" --offline --show-diff --show-slow 1000 --set-timeout 120
|
||||
- ./sapi/cli/php run-tests.php -P -d extension=`pwd`/modules/zend_test.so $(if [ $ENABLE_DEBUG == 0 ]; then echo "-d opcache.enable_cli=1 -d zend_extension=`pwd`/modules/opcache.so"; fi) -g "FAIL,XFAIL,BORK,WARN,LEAK,SKIP" --offline --show-diff --show-slow 1000 --set-timeout 120
|
||||
- sapi/cli/php -d extension_dir=`pwd`/modules -r 'dl("zend_test");'
|
||||
|
||||
after_success:
|
||||
- ccache --show-stats
|
||||
@@ -1,6 +1,357 @@
|
||||
PHP NEWS
|
||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||
?? ??? ????, PHP 7.3.5
|
||||
21 Nov 2019, PHP 7.3.12
|
||||
|
||||
- Core:
|
||||
. Fixed bug #78658 (Memory corruption using Closure::bindTo). (Nikita)
|
||||
. Fixed bug #78656 (Parse errors classified as highest log-level). (Erik
|
||||
Lundin)
|
||||
. Fixed bug #78752 (Segfault if GC triggered while generator stack frame is
|
||||
being destroyed). (Nikita)
|
||||
. Fixed bug #78689 (Closure::fromCallable() doesn't handle
|
||||
[Closure, '__invoke']). (Nikita)
|
||||
|
||||
- COM:
|
||||
. Fixed bug #78694 (Appending to a variant array causes segfault). (cmb)
|
||||
|
||||
- Date:
|
||||
. Fixed bug #70153 (\DateInterval incorrectly unserialized). (Maksim Iakunin)
|
||||
. Fixed bug #78751 (Serialising DatePeriod converts DateTimeImmutable). (cmb)
|
||||
|
||||
- Iconv:
|
||||
. Fixed bug #78642 (Wrong libiconv version displayed). (gedas at martynas,
|
||||
cmb).
|
||||
|
||||
- OpCache:
|
||||
. Fixed bug #78654 (Incorrectly computed opcache checksum on files with
|
||||
non-ascii characters). (mhagstrand)
|
||||
. Fixed bug #78747 (OpCache corrupts custom extension result). (Nikita)
|
||||
|
||||
- OpenSSL:
|
||||
. Fixed bug #78775 (TLS issues from HTTP request affecting other encrypted
|
||||
connections). (Nikita)
|
||||
|
||||
- Reflection:
|
||||
. Fixed bug #78697 (ReflectionClass::ImplementsInterface - inaccurate error
|
||||
message with traits). (villfa)
|
||||
|
||||
- Sockets:
|
||||
. Fixed bug #78665 (Multicasting may leak memory). (cmb)
|
||||
|
||||
24 Oct 2019, PHP 7.3.11
|
||||
|
||||
- Core:
|
||||
. Fixed bug #78535 (auto_detect_line_endings value not parsed as bool).
|
||||
(bugreportuser)
|
||||
. Fixed bug #78620 (Out of memory error). (cmb, Nikita)
|
||||
|
||||
- Exif :
|
||||
. Fixed bug #78442 ('Illegal component' on exif_read_data since PHP7)
|
||||
(Kalle)
|
||||
|
||||
- FPM:
|
||||
. Fixed bug #78599 (env_path_info underflow in fpm_main.c can lead to RCE).
|
||||
(CVE-2019-11043) (Jakub Zelenka)
|
||||
. Fixed bug #78413 (request_terminate_timeout does not take effect after
|
||||
fastcgi_finish_request). (Sergei Turchanov)
|
||||
|
||||
- MBString:
|
||||
. Fixed bug #78633 (Heap buffer overflow (read) in mb_eregi). (cmb)
|
||||
. Fixed bug #78579 (mb_decode_numericentity: args number inconsistency).
|
||||
(cmb)
|
||||
. Fixed bug #78609 (mb_check_encoding() no longer supports stringable
|
||||
objects). (cmb)
|
||||
|
||||
- MySQLi:
|
||||
. Fixed bug #76809 (SSL settings aren't respected when persistent connections
|
||||
are used). (fabiomsouto)
|
||||
|
||||
- Mysqlnd:
|
||||
. Fixed bug #78525 (Memory leak in pdo when reusing native prepared
|
||||
statements). (Nikita)
|
||||
|
||||
- PCRE:
|
||||
. Fixed bug #78272 (calling preg_match() before pcntl_fork() will freeze
|
||||
child process). (Nikita)
|
||||
|
||||
- PDO_MySQL:
|
||||
. Fixed bug #78623 (Regression caused by "SP call yields additional empty
|
||||
result set"). (cmb)
|
||||
|
||||
- Session:
|
||||
. Fixed bug #78624 (session_gc return value for user defined session
|
||||
handlers). (bshaffer)
|
||||
|
||||
- Standard:
|
||||
. Fixed bug #76342 (file_get_contents waits twice specified timeout).
|
||||
(Thomas Calvet)
|
||||
. Fixed bug #78612 (strtr leaks memory when integer keys are used and the
|
||||
subject string shorter). (Nikita)
|
||||
. Fixed bug #76859 (stream_get_line skips data if used with data-generating
|
||||
filter). (kkopachev)
|
||||
|
||||
- Zip:
|
||||
. Fixed bug #78641 (addGlob can modify given remove_path value). (cmb)
|
||||
|
||||
26 Sep 2019, PHP 7.3.10
|
||||
|
||||
- Core:
|
||||
. Fixed bug #78220 (Can't access OneDrive folder). (cmb, ab)
|
||||
. Fixed bug #77922 (Double release of doc comment on inherited shadow
|
||||
property). (Nikita)
|
||||
. Fixed bug #78441 (Parse error due to heredoc identifier followed by digit).
|
||||
(cmb)
|
||||
. Fixed bug #77812 (Interactive mode does not support PHP 7.3-style heredoc).
|
||||
(cmb, Nikita)
|
||||
|
||||
- FastCGI:
|
||||
. Fixed bug #78469 (FastCGI on_accept hook is not called when using named
|
||||
pipes on Windows). (Sergei Turchanov)
|
||||
|
||||
- FPM:
|
||||
. Fixed bug #78334 (fpm log prefix message includes wrong stdout/stderr
|
||||
notation). (Tsuyoshi Sadakata)
|
||||
|
||||
- Intl:
|
||||
. Ensure IDNA2003 rules are used with idn_to_ascii() and idn_to_utf8()
|
||||
when requested. (Sara)
|
||||
|
||||
- MBString:
|
||||
. Fixed bug #78559 (Heap buffer overflow in mb_eregi). (cmb)
|
||||
|
||||
- MySQLnd:
|
||||
. Fixed connect_attr issues and added the _server_host connection attribute.
|
||||
(Qianqian Bu)
|
||||
|
||||
- ODBC:
|
||||
. Fixed bug #78473 (odbc_close() closes arbitrary resources). (cmb)
|
||||
|
||||
- PDO_MySQL:
|
||||
. Fixed bug #41997 (SP call yields additional empty result set). (cmb)
|
||||
|
||||
- sodium:
|
||||
. Fixed bug #78510 (Partially uninitialized buffer returned by
|
||||
sodium_crypto_generichash_init()). (Frank Denis, cmb)
|
||||
|
||||
29 Aug 2019, PHP 7.3.9
|
||||
|
||||
- Core:
|
||||
. Fixed bug #78363 (Buffer overflow in zendparse). (Nikita)
|
||||
. Fixed bug #78379 (Cast to object confuses GC, causes crash). (Dmitry)
|
||||
. Fixed bug #78412 (Generator incorrectly reports non-releasable $this as GC
|
||||
child). (Nikita)
|
||||
|
||||
- Curl:
|
||||
. Fixed bug #77946 (Bad cURL resources returned by curl_multi_info_read()).
|
||||
(Abyr Valg)
|
||||
|
||||
- Exif:
|
||||
. Fixed bug #78333 (Exif crash (bus error) due to wrong alignment and
|
||||
invalid cast). (Nikita)
|
||||
|
||||
- FPM:
|
||||
. Fixed bug #77185 (Use-after-free in FPM master event handling).
|
||||
(Maksim Nikulin)
|
||||
|
||||
- Iconv:
|
||||
. Fixed bug #78342 (Bus error in configure test for iconv //IGNORE). (Rainer
|
||||
Jung)
|
||||
|
||||
- LiteSpeed:
|
||||
. Updated to LiteSpeed SAPI V7.5 (Fixed clean shutdown). (George Wang)
|
||||
|
||||
- MBString:
|
||||
. Fixed bug #78380 (Oniguruma 6.9.3 fixes CVEs). (CVE-2019-13224) (Stas)
|
||||
|
||||
- MySQLnd:
|
||||
. Fixed bug #78179 (MariaDB server version incorrectly detected). (cmb)
|
||||
. Fixed bug #78213 (Empty row pocket). (cmb)
|
||||
|
||||
- Opcache:
|
||||
. Fixed bug #77191 (Assertion failure in dce_live_ranges() when silencing is
|
||||
used). (Nikita)
|
||||
|
||||
- Standard:
|
||||
. Fixed bug #69100 (Bus error from stream_copy_to_stream (file -> SSL stream)
|
||||
with invalid length). (Nikita)
|
||||
. Fixed bug #78282 (atime and mtime mismatch). (cmb)
|
||||
. Fixed bug #78326 (improper memory deallocation on stream_get_contents()
|
||||
with fixed length buffer). (Albert Casademont)
|
||||
. Fixed bug #78346 (strip_tags no longer handling nested php tags). (cmb)
|
||||
|
||||
01 Aug 2019, PHP 7.3.8
|
||||
|
||||
- Core:
|
||||
. Added syslog.filter=raw option. (Erik Lundin)
|
||||
. Fixed bug #78212 (Segfault in built-in webserver). (cmb)
|
||||
|
||||
- Date:
|
||||
. Fixed bug #69044 (discrepency between time and microtime). (krakjoe)
|
||||
. Updated timelib to 2018.02. (Derick)
|
||||
|
||||
- EXIF:
|
||||
. Fixed bug #78256 (heap-buffer-overflow on exif_process_user_comment).
|
||||
(CVE-2019-11042) (Stas)
|
||||
. Fixed bug #78222 (heap-buffer-overflow on exif_scan_thumbnail).
|
||||
(CVE-2019-11041) (Stas)
|
||||
|
||||
- FTP:
|
||||
. Fixed bug #78039 (FTP with SSL memory leak). (Nikita)
|
||||
|
||||
- Libxml:
|
||||
. Fixed bug #78279 (libxml_disable_entity_loader settings is shared between
|
||||
requests (cgi-fcgi)). (Nikita)
|
||||
|
||||
- LiteSpeed:
|
||||
. Updated to LiteSpeed SAPI V7.4.3 (increased response header count limit from
|
||||
100 to 1000, added crash handler to cleanly shutdown PHP request, added
|
||||
CloudLinux mod_lsapi mode). (George Wang)
|
||||
. Fixed bug #76058 (After "POST data can't be buffered", using php://input
|
||||
makes huge tmp files). (George Wang)
|
||||
|
||||
- Openssl:
|
||||
. Fixed bug #78231 (Segmentation fault upon stream_socket_accept of exported
|
||||
socket-to-stream). (Nikita)
|
||||
|
||||
- Opcache:
|
||||
. Fixed bug #78189 (file cache strips last character of uname hash). (cmb)
|
||||
. Fixed bug #78202 (Opcache stats for cache hits are capped at 32bit NUM).
|
||||
(cmb)
|
||||
. Fixed bug #78271 (Invalid result of if-else). (Nikita)
|
||||
. Fixed bug #78291 (opcache_get_configuration doesn't list all directives).
|
||||
(Andrew Collington)
|
||||
. Fixed bug #78341 (Failure to detect smart branch in DFA pass). (Nikita)
|
||||
|
||||
- PCRE:
|
||||
. Fixed bug #78197 (PCRE2 version check in configure fails for "##.##-xxx"
|
||||
version strings). (pgnet, Peter Kokot)
|
||||
. Fixed bug #78338 (Array cross-border reading in PCRE). (cmb)
|
||||
|
||||
- PDO_Sqlite:
|
||||
. Fixed bug #78192 (SegFault when reuse statement after schema has changed).
|
||||
(Vincent Quatrevieux)
|
||||
|
||||
- Phar:
|
||||
. Fixed bug #77919 (Potential UAF in Phar RSHUTDOWN). (cmb)
|
||||
|
||||
- Phpdbg:
|
||||
. Fixed bug #78297 (Include unexistent file memory leak). (Nikita)
|
||||
|
||||
- SQLite:
|
||||
. Upgraded to SQLite 3.28.0. (cmb)
|
||||
|
||||
- Standard:
|
||||
. Fixed bug #78241 (touch() does not handle dates after 2038 in PHP 64-bit). (cmb)
|
||||
. Fixed bug #78269 (password_hash uses weak options for argon2). (Remi)
|
||||
|
||||
04 Jul 2019, PHP 7.3.7
|
||||
|
||||
- Core:
|
||||
. Fixed bug #76980 (Interface gets skipped if autoloader throws an exception).
|
||||
(Nikita)
|
||||
|
||||
- DOM:
|
||||
. Fixed bug #78025 (segfault when accessing properties of DOMDocumentType).
|
||||
(cmb)
|
||||
|
||||
- MySQLi:
|
||||
. Fixed bug #77956 (When mysqli.allow_local_infile = Off, use a meaningful
|
||||
error message). (Sjon Hortensius)
|
||||
. Fixed bug #38546 (bindParam incorrect processing of bool types).
|
||||
(camporter)
|
||||
|
||||
- MySQLnd:
|
||||
. Fixed bug #77955 (Random segmentation fault in mysqlnd from php-fpm).
|
||||
(Nikita)
|
||||
|
||||
- Opcache:
|
||||
. Fixed bug #78015 (Incorrect evaluation of expressions involving partials
|
||||
arrays in SCCP). (Nikita)
|
||||
. Fixed bug #78106 (Path resolution fails if opcache disabled during request).
|
||||
(Nikita)
|
||||
|
||||
- OpenSSL:
|
||||
. Fixed bug #78079 (openssl_encrypt_ccm.phpt fails with OpenSSL 1.1.1c).
|
||||
(Jakub Zelenka)
|
||||
|
||||
- phpdbg:
|
||||
. Fixed bug #78050 (SegFault phpdbg + opcache on include file twice).
|
||||
(Nikita)
|
||||
|
||||
- Sockets:
|
||||
. Fixed bug #78038 (Socket_select fails when resource array contains
|
||||
references). (Nikita)
|
||||
|
||||
- Sodium:
|
||||
. Fixed bug #78114 (segfault when calling sodium_* functions from eval). (cmb)
|
||||
|
||||
- Standard:
|
||||
. Fixed bug #77135 (Extract with EXTR_SKIP should skip $this).
|
||||
(Craig Duncan, Dmitry)
|
||||
. Fixed bug #77937 (preg_match failed). (cmb, Anatol)
|
||||
|
||||
- Zip:
|
||||
. Fixed bug #76345 (zip.h not found). (Michael Maroszek)
|
||||
|
||||
30 May 2019, PHP 7.3.6
|
||||
|
||||
- cURL:
|
||||
. Implemented FR #72189 (Add missing CURL_VERSION_* constants). (Javier
|
||||
Spagnoletti)
|
||||
|
||||
- Date:
|
||||
. Fixed bug #77909 (DatePeriod::__construct() with invalid recurrence count
|
||||
value). (Ignace Nyamagana Butera)
|
||||
|
||||
- EXIF:
|
||||
. Fixed bug #77988 (heap-buffer-overflow on php_jpg_get16).
|
||||
(CVE-2019-11040) (Stas)
|
||||
|
||||
- FPM:
|
||||
. Fixed bug #77934 (php-fpm kill -USR2 not working). (Jakub Zelenka)
|
||||
. Fixed bug #77921 (static.php.net doesn't work anymore). (Peter Kokot)
|
||||
|
||||
- GD:
|
||||
. Fixed bug #77943 (imageantialias($image, false); does not work). (cmb)
|
||||
. Fixed bug #77973 (Uninitialized read in gdImageCreateFromXbm).
|
||||
(CVE-2019-11038) (cmb)
|
||||
|
||||
- Iconv:
|
||||
. Fixed bug #78069 (Out-of-bounds read in iconv.c:_php_iconv_mime_decode()
|
||||
due to integer overflow). (CVE-2019-11039). (maris dot adam)
|
||||
|
||||
- JSON:
|
||||
. Fixed bug #77843 (Use after free with json serializer). (Nikita)
|
||||
|
||||
- Opcache:
|
||||
. Fixed possible crashes, because of inconsistent PCRE cache and opcache
|
||||
SHM reset. (Alexey Kalinin, Dmitry)
|
||||
|
||||
- PDO_MySQL:
|
||||
. Fixed bug #77944 (Wrong meta pdo_type for bigint on LLP64). (cmb)
|
||||
|
||||
- Reflection:
|
||||
. Fixed bug #75186 (Inconsistent reflection of Closure:::__invoke()). (Nikita)
|
||||
|
||||
- Session:
|
||||
. Fixed bug #77911 (Wrong warning for session.sid_bits_per_character). (cmb)
|
||||
|
||||
- SOAP:
|
||||
. Fixed bug #77945 (Segmentation fault when constructing SoapClient with
|
||||
WSDL_CACHE_BOTH). (Nikita)
|
||||
|
||||
- SPL:
|
||||
. Fixed bug #77024 (SplFileObject::__toString() may return array). (Craig
|
||||
Duncan)
|
||||
|
||||
- SQLite:
|
||||
. Fixed bug #77967 (Bypassing open_basedir restrictions via file uris). (Stas)
|
||||
|
||||
- Standard:
|
||||
. Fixed bug #77931 (Warning for array_map mentions wrong type). (Nikita)
|
||||
. Fixed bug #78003 (strip_tags output change since PHP 7.3). (cmb)
|
||||
|
||||
02 May 2019, PHP 7.3.5
|
||||
|
||||
- Core:
|
||||
. Fixed bug #77903 (ArrayIterator stops iterating after offsetSet call).
|
||||
@@ -10,6 +361,10 @@ PHP NEWS
|
||||
. Fixed bug #77794 (Incorrect Date header format in built-in server).
|
||||
(kelunik)
|
||||
|
||||
- EXIF
|
||||
. Fixed bug #77950 (Heap-buffer-overflow in _estrndup via exif_process_IFD_TAG).
|
||||
(CVE-2019-11036) (Stas)
|
||||
|
||||
- Interbase:
|
||||
. Fixed bug #72175 (Impossibility of creating multiple connections to
|
||||
Interbase with php 7.x). (Nikita)
|
||||
@@ -21,6 +376,9 @@ PHP NEWS
|
||||
- LDAP:
|
||||
. Fixed bug #77869 (Core dump when using server controls) (mcmic)
|
||||
|
||||
- Mail
|
||||
. Fixed bug #77821 (Potential heap corruption in TSendMail()). (cmb)
|
||||
|
||||
- mbstring:
|
||||
. Implemented FR #72777 (Implement regex stack limits for mbregex functions).
|
||||
(Yasuo Ohgaki, Stas)
|
||||
@@ -82,8 +440,10 @@ PHP NEWS
|
||||
. Fixed bug #77578 (Crash when php unload). (cmb)
|
||||
|
||||
- EXIF:
|
||||
. Fixed bug #77753 (Heap-buffer-overflow in php_ifd_get32s). (Stas)
|
||||
. Fixed bug #77831 (Heap-buffer-overflow in exif_iif_add_value). (Stas)
|
||||
. Fixed bug #77753 (Heap-buffer-overflow in php_ifd_get32s). (CVE-2019-11034)
|
||||
(Stas)
|
||||
. Fixed bug #77831 (Heap-buffer-overflow in exif_iif_add_value).
|
||||
(CVE-2019-11035) (Stas)
|
||||
|
||||
- FPM:
|
||||
. Fixed bug #77677 (FPM fails to build on AIX due to missing WCOREDUMP).
|
||||
|
||||
@@ -167,13 +167,7 @@ TSRM_API const char *tsrm_api_name(void);
|
||||
#define TSRMG_BULK_STATIC(id, type) ((type) (*((void ***) TSRMLS_CACHE))[TSRM_UNSHUFFLE_RSRC_ID(id)])
|
||||
#define TSRMLS_CACHE_EXTERN() extern TSRM_TLS void *TSRMLS_CACHE;
|
||||
#define TSRMLS_CACHE_DEFINE() TSRM_TLS void *TSRMLS_CACHE = NULL;
|
||||
#if ZEND_DEBUG
|
||||
#define TSRMLS_CACHE_UPDATE() TSRMLS_CACHE = tsrm_get_ls_cache()
|
||||
#define TSRMLS_CACHE_RESET()
|
||||
#else
|
||||
#define TSRMLS_CACHE_UPDATE() if (!TSRMLS_CACHE) TSRMLS_CACHE = tsrm_get_ls_cache()
|
||||
#define TSRMLS_CACHE_RESET() TSRMLS_CACHE = NULL
|
||||
#endif
|
||||
#define TSRMLS_CACHE _tsrm_ls_cache
|
||||
|
||||
/* BC only */
|
||||
|
||||
+1
-1
@@ -770,7 +770,7 @@ static zend_always_inline void UnixTimeToFileTime(time_t t, LPFILETIME pft) /* {
|
||||
// Note that LONGLONG is a 64-bit value
|
||||
LONGLONG ll;
|
||||
|
||||
ll = Int32x32To64(t, 10000000) + 116444736000000000;
|
||||
ll = t * 10000000LL + 116444736000000000LL;
|
||||
pft->dwLowDateTime = (DWORD)ll;
|
||||
pft->dwHighDateTime = ll >> 32;
|
||||
}
|
||||
|
||||
@@ -273,6 +273,10 @@ FPM:
|
||||
disabling output decoration for workers output when catch_workers_output
|
||||
enabled.
|
||||
. The getallheaders() function is now also available.
|
||||
. In PHP 7.3.11 a new pool option
|
||||
request_terminate_timeout_track_finished has been added. When enabled,
|
||||
request_terminate_timeout will also apply after fastcgi_finish_request()
|
||||
has been called, as well as during execution of shutdown functions.
|
||||
|
||||
========================================
|
||||
4. Deprecated Functionality
|
||||
@@ -622,9 +626,11 @@ Curl:
|
||||
. CURL_SSLVERSION_MAX_TLSv1_2
|
||||
. CURL_SSLVERSION_MAX_TLSv1_3
|
||||
. CURL_SSLVERSION_TLSv1_3
|
||||
. CURL_VERSION_ALTSVC
|
||||
. CURL_VERSION_ASYNCHDNS
|
||||
. CURL_VERSION_BROTLI
|
||||
. CURL_VERSION_CONV
|
||||
. CURL_VERSION_CURLDEBUG
|
||||
. CURL_VERSION_DEBUG
|
||||
. CURL_VERSION_GSSAPI
|
||||
. CURL_VERSION_GSSNEGOTIATE
|
||||
@@ -634,6 +640,7 @@ Curl:
|
||||
. CURL_VERSION_MULTI_SSL
|
||||
. CURL_VERSION_NTLM
|
||||
. CURL_VERSION_NTLM_WB
|
||||
. CURL_VERSION_PSL
|
||||
. CURL_VERSION_SPNEGO
|
||||
. CURL_VERSION_SSPI
|
||||
. CURL_VERSION_TLSAUTH_SRP
|
||||
@@ -728,8 +735,8 @@ LDAP:
|
||||
is used only when error_log is set syslog.
|
||||
|
||||
- mbstring.regex_stack_limit
|
||||
. New INI directive (since 7.3.6) limiting stack depth of mbstring/oniguruma
|
||||
regular expressions.
|
||||
. New INI directive (since 7.3.5) limiting stack depth of mbstring/oniguruma
|
||||
regular expressions.
|
||||
|
||||
========================================
|
||||
12. Windows Support
|
||||
@@ -748,4 +755,3 @@ LDAP:
|
||||
|
||||
. The cyclic GC has been enhanced, which may result in considerable performance
|
||||
improvements.
|
||||
|
||||
@@ -140,6 +140,7 @@ assert(0 && ($a = function () {
|
||||
if ($a) {
|
||||
} elseif ($b) {
|
||||
}
|
||||
if ($a); else;
|
||||
}));
|
||||
|
||||
?>
|
||||
@@ -292,4 +293,7 @@ Warning: assert(): assert(0 && ($a = function () {
|
||||
if ($a) {
|
||||
} elseif ($b) {
|
||||
}
|
||||
if ($a) {
|
||||
} else {
|
||||
}
|
||||
})) failed in %sexpect_015.php on line %d
|
||||
@@ -0,0 +1,17 @@
|
||||
--TEST--
|
||||
AST pretty-printer
|
||||
--INI--
|
||||
zend.assertions=1
|
||||
assert.exception=0
|
||||
--FILE--
|
||||
<?php
|
||||
assert(0 && ($a = function () {
|
||||
$var = 'test';
|
||||
$str = "$var, $var[1], {$var}[], {$var[1]}[], ${var}[], ${var[1]}[]";
|
||||
}));
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: assert(): assert(0 && ($a = function () {
|
||||
$var = 'test';
|
||||
$str = "$var, {$var[1]}, {$var}[], {$var[1]}[], {$var}[], {$var[1]}[]";
|
||||
})) failed in %sexpect_020.php on line %d
|
||||
@@ -46,7 +46,7 @@ elseif (PHP_OS == 'FreeBSD') {
|
||||
die('skip Not enough memory.');
|
||||
}
|
||||
} elseif (PHP_OS == "WINNT") {
|
||||
$s = trim(shell_exec("wmic OS get FreeVirtualMemory /Value 2>nil"));
|
||||
$s = trim(shell_exec("wmic OS get FreeVirtualMemory /Value 2>nul"));
|
||||
$freeMemory = explode('=', $s)[1]*1;
|
||||
|
||||
if ($freeMemory < 2.1*1024*1024) {
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
--TEST--
|
||||
Bug #77922: Double release of doc comment on inherited shadow property
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class A {
|
||||
/** Foo */
|
||||
private $prop;
|
||||
}
|
||||
|
||||
class B extends A {
|
||||
}
|
||||
|
||||
class C extends B {
|
||||
}
|
||||
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECT--
|
||||
===DONE===
|
||||
@@ -0,0 +1,7 @@
|
||||
--TEST--
|
||||
Bug #77993 (Wrong parse error for invalid hex literal on Windows)
|
||||
--FILE--
|
||||
<?php
|
||||
0xg10;
|
||||
--EXPECTF--
|
||||
Parse error: syntax error, unexpected 'xg10' (T_STRING) in %s on line %d
|
||||
@@ -0,0 +1,32 @@
|
||||
--TEST--
|
||||
Bug #78010: Segmentation fault during GC
|
||||
--INI--
|
||||
memory_limit=2G
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class foo
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
$this->x = $this;
|
||||
|
||||
for ($i = 0; $i < 898; $i++) { //Will not trigger with <898
|
||||
$obj = [new stdClass, new stdClass]; //This must have at least 2 elements
|
||||
$this->y[] = $obj;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for ($i = 0; $i < 2; ++$i) { //This must run >=2 (increasing the number of elements in the array *2 will not do)
|
||||
$x = []; //This must be reset
|
||||
foreach (array_fill(0, 389, 'x') as &$params) { //Will not trigger <389
|
||||
$x[] = new foo;
|
||||
}
|
||||
}
|
||||
|
||||
echo "Completed\n";
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
Completed
|
||||
@@ -0,0 +1,27 @@
|
||||
--TEST--
|
||||
Bug #78271: Invalid result of if-else
|
||||
--FILE--
|
||||
<?php
|
||||
function test($a, $b){
|
||||
if ($a==10) {
|
||||
$w="x";
|
||||
} else {
|
||||
$w="y";
|
||||
}
|
||||
|
||||
if ($b) {
|
||||
$d1="none";
|
||||
$d2="block";
|
||||
} else {
|
||||
$d1="block";
|
||||
$d2="none";
|
||||
}
|
||||
|
||||
echo $d2.$b."\n";
|
||||
|
||||
}
|
||||
|
||||
test(1, 1);
|
||||
?>
|
||||
--EXPECT--
|
||||
block1
|
||||
Binary file not shown.
@@ -0,0 +1,32 @@
|
||||
--TEST--
|
||||
Bug #78379 (Cast to object confuses GC, causes crash)
|
||||
--INI--
|
||||
opcache.enable=0
|
||||
--FILE--
|
||||
<?php
|
||||
class C {
|
||||
public function __construct() {
|
||||
$this->p = (object)["x" => [1]];
|
||||
}
|
||||
}
|
||||
class E {
|
||||
}
|
||||
$e = new E;
|
||||
$e->f = new E;
|
||||
$e->f->e = $e;
|
||||
$e->a = new C;
|
||||
$e = null;
|
||||
gc_collect_cycles();
|
||||
var_dump(new C);
|
||||
?>
|
||||
--EXPECTF--
|
||||
object(C)#%d (1) {
|
||||
["p"]=>
|
||||
object(stdClass)#%d (1) {
|
||||
["x"]=>
|
||||
array(1) {
|
||||
[0]=>
|
||||
int(1)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
--TEST--
|
||||
Bug #78379.2 (Cast to object confuses GC, causes crash)
|
||||
--FILE--
|
||||
<?php
|
||||
class E {}
|
||||
function f() {
|
||||
$e1 = new E;
|
||||
$e2 = new E;
|
||||
$a = ['e2' => $e2];
|
||||
$e1->a = (object)$a;
|
||||
$e2->e1 = $e1;
|
||||
$e2->a = (object)$a;
|
||||
}
|
||||
f();
|
||||
gc_collect_cycles();
|
||||
echo "End\n";
|
||||
?>
|
||||
--EXPECT--
|
||||
End
|
||||
@@ -0,0 +1,14 @@
|
||||
--TEST--
|
||||
Bug #78658: Memory corruption using Closure::bindTo()
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$c = function(){};
|
||||
|
||||
$scope = "AAAA";
|
||||
$scope = "{$scope}BBBB";
|
||||
$c->bindTo(new stdClass, $scope);
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: Class 'AAAABBBB' not found in %s on line %d
|
||||
@@ -0,0 +1,13 @@
|
||||
--TEST--
|
||||
Bug #78689: Closure::fromCallable() doesn't handle [Closure, '__invoke']
|
||||
--FILE--
|
||||
<?php
|
||||
$a = [function () { echo "123\n"; }, '__invoke'];
|
||||
$a();
|
||||
|
||||
$b = Closure::fromCallable($a);
|
||||
$b();
|
||||
?>
|
||||
--EXPECT--
|
||||
123
|
||||
123
|
||||
@@ -0,0 +1,24 @@
|
||||
--TEST--
|
||||
Bug #78752: Segfault if GC triggered while generator stack frame is being destroyed
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
function gen(&$gen) {
|
||||
$a = new stdClass;
|
||||
$a->a = $a;
|
||||
$b = new stdClass;
|
||||
$b->b = $b;
|
||||
yield 1;
|
||||
}
|
||||
|
||||
$gen = gen($gen);
|
||||
var_dump($gen->current());
|
||||
for ($i = 0; $i < 9999; $i++) {
|
||||
$a = new stdClass;
|
||||
$a->a = $a;
|
||||
}
|
||||
$gen->next();
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
int(1)
|
||||
@@ -0,0 +1,11 @@
|
||||
--TEST--
|
||||
Immediately invoked closure with extra args
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
(function() {})(new stdClass);
|
||||
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECT--
|
||||
===DONE===
|
||||
@@ -0,0 +1,35 @@
|
||||
--TEST--
|
||||
GC 041: Handling of references in nested data of objects with destructor
|
||||
--INI--
|
||||
zend.enable_gc = 1
|
||||
--FILE--
|
||||
<?php
|
||||
class ryat {
|
||||
var $ryat;
|
||||
var $chtg;
|
||||
var $nested;
|
||||
function __destruct() {
|
||||
$GLOBALS['x'] = $this;
|
||||
}
|
||||
}
|
||||
$o = new ryat;
|
||||
$o->nested = [];
|
||||
$o->nested[] =& $o->nested;
|
||||
$o->ryat = $o;
|
||||
$x =& $o->chtg;
|
||||
unset($o);
|
||||
gc_collect_cycles();
|
||||
var_dump($x);
|
||||
?>
|
||||
--EXPECT--
|
||||
object(ryat)#1 (3) {
|
||||
["ryat"]=>
|
||||
*RECURSION*
|
||||
["chtg"]=>
|
||||
*RECURSION*
|
||||
["nested"]=>
|
||||
&array(1) {
|
||||
[0]=>
|
||||
*RECURSION*
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
--TEST--
|
||||
Object properties HT may need to be removed from nested data
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class Test {
|
||||
public function __destruct() {
|
||||
$GLOBALS['x'] = $this;
|
||||
}
|
||||
}
|
||||
|
||||
$t = new Test;
|
||||
$t->x = new stdClass;
|
||||
$t->x->t = $t;
|
||||
$a = (array) $t->x;
|
||||
unset($t, $a);
|
||||
gc_collect_cycles();
|
||||
var_dump($x);
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
object(Test)#1 (1) {
|
||||
["x"]=>
|
||||
object(stdClass)#2 (1) {
|
||||
["t"]=>
|
||||
*RECURSION*
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
--TEST--
|
||||
Bug #78441 (Parse error due to heredoc identifier followed by digit)
|
||||
--FILE--
|
||||
<?php
|
||||
echo <<<FOO
|
||||
FOO4
|
||||
FOO, PHP_EOL;
|
||||
|
||||
echo <<<FOO
|
||||
bar
|
||||
FOO4
|
||||
FOO, PHP_EOL;
|
||||
|
||||
echo <<<'FOO'
|
||||
bar
|
||||
FOO4
|
||||
FOO, PHP_EOL;
|
||||
?>
|
||||
--EXPECT--
|
||||
FOO4
|
||||
bar
|
||||
FOO4
|
||||
bar
|
||||
FOO4
|
||||
@@ -0,0 +1,8 @@
|
||||
--TEST--
|
||||
Using __COMPILER_HALF_OFFSET__ with trailing {} (OSS-Fuzz #17895)
|
||||
--FILE--
|
||||
<?php
|
||||
__COMPILER_HALT_OFFSET__;
|
||||
{}
|
||||
--EXPECTF--
|
||||
Warning: Use of undefined constant __COMPILER_HALT_OFFSET__ - assumed '__COMPILER_HALT_OFFSET__' (this will throw an Error in a future version of PHP) in %s on line %d
|
||||
@@ -0,0 +1,17 @@
|
||||
--TEST--
|
||||
Memory leak on ** with result==op1 array
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$x = [0];
|
||||
$x **= 1;
|
||||
var_dump($x);
|
||||
|
||||
$x = [0];
|
||||
$x **= $x;
|
||||
var_dump($x);
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
int(0)
|
||||
int(0)
|
||||
@@ -0,0 +1,15 @@
|
||||
--TEST--
|
||||
Calling a static method on a non-existing class
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$str = "foo";
|
||||
try {
|
||||
Test::{$str . "bar"}();
|
||||
} catch (Error $e) {
|
||||
echo $e->getMessage(), "\n";
|
||||
}
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
Class 'Test' not found
|
||||
@@ -0,0 +1,17 @@
|
||||
--TEST--
|
||||
The parent class is not necessarily the class of the prototype
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class A {
|
||||
function test(): B {}
|
||||
}
|
||||
class B extends A {}
|
||||
class C extends B {
|
||||
function test(): parent {}
|
||||
}
|
||||
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECT--
|
||||
===DONE===
|
||||
@@ -0,0 +1,20 @@
|
||||
--TEST--
|
||||
No warnings should be thrown during heredoc scan-ahead
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
<<<TEST
|
||||
${x}
|
||||
\400
|
||||
${/*}
|
||||
TEST;
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: Unexpected character in input: '' (ASCII=1) state=0 in %s on line %d
|
||||
|
||||
Warning: Octal escape sequence overflow \400 is greater than \377 in %s on line %d
|
||||
|
||||
Warning: Unterminated comment starting line %d in %s on line %d
|
||||
|
||||
Parse error: syntax error, unexpected end of file in %s on line %d
|
||||
+1
-1
@@ -20,7 +20,7 @@
|
||||
#ifndef ZEND_H
|
||||
#define ZEND_H
|
||||
|
||||
#define ZEND_VERSION "3.3.5-dev"
|
||||
#define ZEND_VERSION "3.3.12"
|
||||
|
||||
#define ZEND_ENGINE_3
|
||||
|
||||
|
||||
+23
-13
@@ -2051,13 +2051,13 @@ ZEND_API zend_module_entry* zend_register_module_ex(zend_module_entry *module) /
|
||||
}
|
||||
|
||||
name_len = strlen(module->name);
|
||||
lcname = zend_string_alloc(name_len, 1);
|
||||
lcname = zend_string_alloc(name_len, module->type == MODULE_PERSISTENT);
|
||||
zend_str_tolower_copy(ZSTR_VAL(lcname), module->name, name_len);
|
||||
|
||||
lcname = zend_new_interned_string(lcname);
|
||||
if ((module_ptr = zend_hash_add_mem(&module_registry, lcname, module, sizeof(zend_module_entry))) == NULL) {
|
||||
zend_error(E_CORE_WARNING, "Module '%s' already loaded", module->name);
|
||||
zend_string_release_ex(lcname, 1);
|
||||
zend_string_release(lcname);
|
||||
return NULL;
|
||||
}
|
||||
module = module_ptr;
|
||||
@@ -2065,14 +2065,14 @@ ZEND_API zend_module_entry* zend_register_module_ex(zend_module_entry *module) /
|
||||
|
||||
if (module->functions && zend_register_functions(NULL, module->functions, NULL, module->type)==FAILURE) {
|
||||
zend_hash_del(&module_registry, lcname);
|
||||
zend_string_release_ex(lcname, 1);
|
||||
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_ex(lcname, 1);
|
||||
zend_string_release(lcname);
|
||||
return module;
|
||||
}
|
||||
/* }}} */
|
||||
@@ -2279,14 +2279,14 @@ ZEND_API int zend_register_functions(zend_class_entry *scope, const zend_functio
|
||||
return FAILURE;
|
||||
}
|
||||
}
|
||||
lowercase_name = zend_string_tolower_ex(internal_function->function_name, 1);
|
||||
lowercase_name = zend_string_tolower_ex(internal_function->function_name, type == MODULE_PERSISTENT);
|
||||
lowercase_name = zend_new_interned_string(lowercase_name);
|
||||
reg_function = malloc(sizeof(zend_internal_function));
|
||||
memcpy(reg_function, &function, sizeof(zend_internal_function));
|
||||
if (zend_hash_add_ptr(target_function_table, lowercase_name, reg_function) == NULL) {
|
||||
unload=1;
|
||||
free(reg_function);
|
||||
zend_string_release_ex(lowercase_name, 1);
|
||||
zend_string_release(lowercase_name);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -2378,7 +2378,7 @@ ZEND_API int zend_register_functions(zend_class_entry *scope, const zend_functio
|
||||
}
|
||||
ptr++;
|
||||
count++;
|
||||
zend_string_release_ex(lowercase_name, 1);
|
||||
zend_string_release(lowercase_name);
|
||||
}
|
||||
if (unload) { /* before unloading, display all remaining bad function in the module */
|
||||
if (scope) {
|
||||
@@ -2724,10 +2724,10 @@ static zend_class_entry *do_register_internal_class(zend_class_entry *orig_class
|
||||
class_entry->info.internal.module = EG(current_module);
|
||||
|
||||
if (class_entry->info.internal.builtin_functions) {
|
||||
zend_register_functions(class_entry, class_entry->info.internal.builtin_functions, &class_entry->function_table, MODULE_PERSISTENT);
|
||||
zend_register_functions(class_entry, class_entry->info.internal.builtin_functions, &class_entry->function_table, EG(current_module)->type);
|
||||
}
|
||||
|
||||
lowercase_name = zend_string_tolower_ex(orig_class_entry->name, 1);
|
||||
lowercase_name = zend_string_tolower_ex(orig_class_entry->name, EG(current_module)->type == MODULE_PERSISTENT);
|
||||
lowercase_name = zend_new_interned_string(lowercase_name);
|
||||
zend_hash_update_ptr(CG(class_table), lowercase_name, class_entry);
|
||||
zend_string_release_ex(lowercase_name, 1);
|
||||
@@ -2786,6 +2786,11 @@ ZEND_API int zend_register_class_alias_ex(const char *name, size_t name_len, zen
|
||||
{
|
||||
zend_string *lcname;
|
||||
|
||||
/* TODO: Move this out of here in 7.4. */
|
||||
if (persistent && EG(current_module) && EG(current_module)->type == MODULE_TEMPORARY) {
|
||||
persistent = 0;
|
||||
}
|
||||
|
||||
if (name[0] == '\\') {
|
||||
lcname = zend_string_alloc(name_len-1, persistent);
|
||||
zend_str_tolower_copy(ZSTR_VAL(lcname), name+1, name_len-1);
|
||||
@@ -2843,7 +2848,7 @@ ZEND_API int zend_disable_function(char *function_name, size_t function_name_len
|
||||
{
|
||||
zend_internal_function *func;
|
||||
if ((func = zend_hash_str_find_ptr(CG(function_table), function_name, function_name_length))) {
|
||||
func->fn_flags &= ~(ZEND_ACC_VARIADIC | ZEND_ACC_HAS_TYPE_HINTS);
|
||||
func->fn_flags &= ~(ZEND_ACC_VARIADIC | ZEND_ACC_HAS_TYPE_HINTS | ZEND_ACC_HAS_RETURN_TYPE);
|
||||
func->num_args = 0;
|
||||
func->arg_info = NULL;
|
||||
func->handler = ZEND_FN(display_disabled_function);
|
||||
@@ -3696,6 +3701,11 @@ static inline zend_string *zval_make_interned_string(zval *zv) /* {{{ */
|
||||
return Z_STR_P(zv);
|
||||
}
|
||||
|
||||
static zend_always_inline zend_bool is_persistent_class(zend_class_entry *ce) {
|
||||
return (ce->type & ZEND_INTERNAL_CLASS)
|
||||
&& ce->info.internal.module->type == MODULE_PERSISTENT;
|
||||
}
|
||||
|
||||
ZEND_API int zend_declare_property_ex(zend_class_entry *ce, zend_string *name, zval *property, int access_type, zend_string *doc_comment) /* {{{ */
|
||||
{
|
||||
zend_property_info *property_info, *property_info_ptr;
|
||||
@@ -3761,10 +3771,10 @@ ZEND_API int zend_declare_property_ex(zend_class_entry *ce, zend_string *name, z
|
||||
if (access_type & ZEND_ACC_PUBLIC) {
|
||||
property_info->name = zend_string_copy(name);
|
||||
} else if (access_type & ZEND_ACC_PRIVATE) {
|
||||
property_info->name = zend_mangle_property_name(ZSTR_VAL(ce->name), ZSTR_LEN(ce->name), ZSTR_VAL(name), ZSTR_LEN(name), ce->type & ZEND_INTERNAL_CLASS);
|
||||
property_info->name = zend_mangle_property_name(ZSTR_VAL(ce->name), ZSTR_LEN(ce->name), ZSTR_VAL(name), ZSTR_LEN(name), is_persistent_class(ce));
|
||||
} else {
|
||||
ZEND_ASSERT(access_type & ZEND_ACC_PROTECTED);
|
||||
property_info->name = zend_mangle_property_name("*", 1, ZSTR_VAL(name), ZSTR_LEN(name), ce->type & ZEND_INTERNAL_CLASS);
|
||||
property_info->name = zend_mangle_property_name("*", 1, ZSTR_VAL(name), ZSTR_LEN(name), is_persistent_class(ce));
|
||||
}
|
||||
|
||||
property_info->name = zend_new_interned_string(property_info->name);
|
||||
@@ -3779,7 +3789,7 @@ ZEND_API int zend_declare_property_ex(zend_class_entry *ce, zend_string *name, z
|
||||
|
||||
ZEND_API int zend_declare_property(zend_class_entry *ce, const char *name, size_t name_length, zval *property, int access_type) /* {{{ */
|
||||
{
|
||||
zend_string *key = zend_string_init(name, name_length, ce->type & ZEND_INTERNAL_CLASS);
|
||||
zend_string *key = zend_string_init(name, name_length, is_persistent_class(ce));
|
||||
int ret = zend_declare_property_ex(ce, key, property, access_type, NULL);
|
||||
zend_string_release(key);
|
||||
return ret;
|
||||
|
||||
+12
-7
@@ -982,7 +982,7 @@ get_chunk:
|
||||
heap->cached_chunks = chunk->next;
|
||||
} else {
|
||||
#if ZEND_MM_LIMIT
|
||||
if (UNEXPECTED(heap->real_size + ZEND_MM_CHUNK_SIZE > heap->limit)) {
|
||||
if (UNEXPECTED(ZEND_MM_CHUNK_SIZE > heap->limit - heap->real_size)) {
|
||||
if (zend_mm_gc(heap)) {
|
||||
goto get_chunk;
|
||||
} else if (heap->overflow == 0) {
|
||||
@@ -1510,8 +1510,8 @@ static zend_never_inline void *zend_mm_realloc_huge(zend_mm_heap *heap, void *pt
|
||||
}
|
||||
} else /* if (new_size > old_size) */ {
|
||||
#if ZEND_MM_LIMIT
|
||||
if (UNEXPECTED(heap->real_size + (new_size - old_size) > heap->limit)) {
|
||||
if (zend_mm_gc(heap) && heap->real_size + (new_size - old_size) <= heap->limit) {
|
||||
if (UNEXPECTED(new_size - old_size > heap->limit - heap->real_size)) {
|
||||
if (zend_mm_gc(heap) && new_size - old_size <= heap->limit - heap->real_size) {
|
||||
/* pass */
|
||||
} else if (heap->overflow == 0) {
|
||||
#if ZEND_DEBUG
|
||||
@@ -1792,15 +1792,20 @@ static void *zend_mm_alloc_huge(zend_mm_heap *heap, size_t size ZEND_FILE_LINE_D
|
||||
* We allocate them with 2MB size granularity, to avoid many
|
||||
* reallocations when they are extended by small pieces
|
||||
*/
|
||||
size_t new_size = ZEND_MM_ALIGNED_SIZE_EX(size, MAX(REAL_PAGE_SIZE, ZEND_MM_CHUNK_SIZE));
|
||||
size_t alignment = MAX(REAL_PAGE_SIZE, ZEND_MM_CHUNK_SIZE);
|
||||
#else
|
||||
size_t new_size = ZEND_MM_ALIGNED_SIZE_EX(size, REAL_PAGE_SIZE);
|
||||
size_t alignment = REAL_PAGE_SIZE;
|
||||
#endif
|
||||
size_t new_size = ZEND_MM_ALIGNED_SIZE_EX(size, alignment);
|
||||
void *ptr;
|
||||
|
||||
if (UNEXPECTED(new_size < size)) {
|
||||
zend_error_noreturn(E_ERROR, "Possible integer overflow in memory allocation (%zu + %zu)", size, alignment);
|
||||
}
|
||||
|
||||
#if ZEND_MM_LIMIT
|
||||
if (UNEXPECTED(heap->real_size + new_size > heap->limit)) {
|
||||
if (zend_mm_gc(heap) && heap->real_size + new_size <= heap->limit) {
|
||||
if (UNEXPECTED(new_size > heap->limit - heap->real_size)) {
|
||||
if (zend_mm_gc(heap) && new_size <= heap->limit - heap->real_size) {
|
||||
/* pass */
|
||||
} else if (heap->overflow == 0) {
|
||||
#if ZEND_DEBUG
|
||||
|
||||
@@ -110,6 +110,17 @@ static zend_always_inline void zend_arena_release(zend_arena **arena_ptr, void *
|
||||
arena->ptr = (char*)checkpoint;
|
||||
}
|
||||
|
||||
static zend_always_inline zend_bool zend_arena_contains(zend_arena *arena, void *ptr)
|
||||
{
|
||||
while (arena) {
|
||||
if ((char*)ptr > (char*)arena && (char*)ptr <= arena->ptr) {
|
||||
return 1;
|
||||
}
|
||||
arena = arena->prev;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif /* _ZEND_ARENA_H_ */
|
||||
|
||||
/*
|
||||
|
||||
+9
-2
@@ -995,6 +995,11 @@ static ZEND_COLD int zend_ast_valid_var_name(const char *s, size_t len)
|
||||
return 1;
|
||||
}
|
||||
|
||||
static ZEND_COLD int zend_ast_var_needs_braces(char ch)
|
||||
{
|
||||
return ch == '[' || zend_ast_valid_var_char(ch);
|
||||
}
|
||||
|
||||
static ZEND_COLD void zend_ast_export_var(smart_str *str, zend_ast *ast, int priority, int indent)
|
||||
{
|
||||
if (ast->kind == ZEND_AST_ZVAL) {
|
||||
@@ -1042,7 +1047,7 @@ static ZEND_COLD void zend_ast_export_encaps_list(smart_str *str, char quote, ze
|
||||
ast->child[0]->kind == ZEND_AST_ZVAL &&
|
||||
(i + 1 == list->children ||
|
||||
list->child[i + 1]->kind != ZEND_AST_ZVAL ||
|
||||
!zend_ast_valid_var_char(
|
||||
!zend_ast_var_needs_braces(
|
||||
*Z_STRVAL_P(
|
||||
zend_ast_get_zval(list->child[i + 1]))))) {
|
||||
zend_ast_export_ex(str, ast, 0, indent);
|
||||
@@ -1153,7 +1158,7 @@ tail_call:
|
||||
} else {
|
||||
zend_ast_export_indent(str, indent);
|
||||
smart_str_appends(str, "} else ");
|
||||
if (ast->child[1]->kind == ZEND_AST_IF) {
|
||||
if (ast->child[1] && ast->child[1]->kind == ZEND_AST_IF) {
|
||||
list = (zend_ast_list*)ast->child[1];
|
||||
goto tail_call;
|
||||
} else {
|
||||
@@ -1659,6 +1664,8 @@ simple_list:
|
||||
zend_ast_export_ex(str, ast->child[1], 80, indent);
|
||||
smart_str_appends(str, " => ");
|
||||
}
|
||||
if (ast->attr)
|
||||
smart_str_appendc(str, '&');
|
||||
zend_ast_export_ex(str, ast->child[0], 80, indent);
|
||||
break;
|
||||
case ZEND_AST_NEW:
|
||||
|
||||
+10
-2
@@ -200,7 +200,7 @@ ZEND_METHOD(Closure, bind)
|
||||
ce = closure->func.common.scope;
|
||||
} else if ((ce = zend_lookup_class_ex(class_name, NULL, 1)) == NULL) {
|
||||
zend_error(E_WARNING, "Class '%s' not found", ZSTR_VAL(class_name));
|
||||
zend_string_release_ex(class_name, 0);
|
||||
zend_tmp_string_release(tmp_class_name);
|
||||
RETURN_NULL();
|
||||
}
|
||||
zend_tmp_string_release(tmp_class_name);
|
||||
@@ -268,8 +268,16 @@ static int zend_create_closure_from_callable(zval *return_value, zval *callable,
|
||||
|
||||
mptr = fcc.function_handler;
|
||||
if (mptr->common.fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE) {
|
||||
memset(&call, 0, sizeof(zend_internal_function));
|
||||
/* For Closure::fromCallable([$closure, "__invoke"]) return $closure. */
|
||||
if (fcc.object && fcc.object->ce == zend_ce_closure
|
||||
&& zend_string_equals_literal(mptr->common.function_name, "__invoke")) {
|
||||
ZVAL_OBJ(return_value, fcc.object);
|
||||
GC_ADDREF(fcc.object);
|
||||
zend_free_trampoline(mptr);
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
memset(&call, 0, sizeof(zend_internal_function));
|
||||
call.type = ZEND_INTERNAL_FUNCTION;
|
||||
call.fn_flags = mptr->common.fn_flags & ZEND_ACC_STATIC;
|
||||
call.handler = zend_closure_call_magic;
|
||||
|
||||
+9
-1
@@ -1693,13 +1693,17 @@ ZEND_API void zend_activate_auto_globals(void) /* {{{ */
|
||||
int ZEND_FASTCALL zendlex(zend_parser_stack_elem *elem) /* {{{ */
|
||||
{
|
||||
zval zv;
|
||||
int ret;
|
||||
|
||||
if (CG(increment_lineno)) {
|
||||
CG(zend_lineno)++;
|
||||
CG(increment_lineno) = 0;
|
||||
}
|
||||
|
||||
return lex_scan(&zv, elem);
|
||||
ret = lex_scan(&zv, elem);
|
||||
ZEND_ASSERT(!EG(exception) || ret == T_ERROR);
|
||||
return ret;
|
||||
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
@@ -6694,6 +6698,7 @@ void zend_compile_use(zend_ast *ast) /* {{{ */
|
||||
}
|
||||
|
||||
zend_string_addref(old_name);
|
||||
old_name = zend_new_interned_string(old_name);
|
||||
if (!zend_hash_add_ptr(current_import, lookup_name, old_name)) {
|
||||
zend_error_noreturn(E_COMPILE_ERROR, "Cannot use%s %s as %s because the name "
|
||||
"is already in use", zend_get_use_type_str(type), ZSTR_VAL(old_name), ZSTR_VAL(new_name));
|
||||
@@ -7763,6 +7768,9 @@ void zend_compile_const(znode *result, zend_ast *ast) /* {{{ */
|
||||
|
||||
while (last && last->kind == ZEND_AST_STMT_LIST) {
|
||||
zend_ast_list *list = zend_ast_get_list(last);
|
||||
if (list->children == 0) {
|
||||
break;
|
||||
}
|
||||
last = list->child[list->children-1];
|
||||
}
|
||||
if (last && last->kind == ZEND_AST_HALT_COMPILER) {
|
||||
|
||||
+63
-33
@@ -86,6 +86,22 @@
|
||||
#define GC_GREY 0x200000
|
||||
#define GC_PURPLE 0x300000
|
||||
|
||||
/* Debug tracing */
|
||||
#if ZEND_GC_DEBUG > 1
|
||||
# define GC_TRACE(format, ...) fprintf(stderr, format "\n", ##__VA_ARGS__);
|
||||
# define GC_TRACE_REF(ref, format, ...) \
|
||||
do { \
|
||||
gc_trace_ref((zend_refcounted *) ref); \
|
||||
fprintf(stderr, format "\n", ##__VA_ARGS__); \
|
||||
} while (0)
|
||||
# define GC_TRACE_SET_COLOR(ref, color) \
|
||||
GC_TRACE_REF(ref, "->%s", gc_color_name(color))
|
||||
#else
|
||||
# define GC_TRACE_REF(ref, format, ...)
|
||||
# define GC_TRACE_SET_COLOR(ref, new_color)
|
||||
# define GC_TRACE(str)
|
||||
#endif
|
||||
|
||||
/* GC_INFO access */
|
||||
#define GC_REF_ADDRESS(ref) \
|
||||
(((GC_TYPE_INFO(ref)) & (GC_ADDRESS << GC_INFO_SHIFT)) >> GC_INFO_SHIFT)
|
||||
@@ -103,16 +119,19 @@
|
||||
} while (0)
|
||||
|
||||
#define GC_REF_SET_COLOR(ref, c) do { \
|
||||
GC_TRACE_SET_COLOR(ref, c); \
|
||||
GC_TYPE_INFO(ref) = \
|
||||
(GC_TYPE_INFO(ref) & ~(GC_COLOR << GC_INFO_SHIFT)) | \
|
||||
((c) << GC_INFO_SHIFT); \
|
||||
} while (0)
|
||||
|
||||
#define GC_REF_SET_BLACK(ref) do { \
|
||||
GC_TRACE_SET_COLOR(ref, GC_BLACK); \
|
||||
GC_TYPE_INFO(ref) &= ~(GC_COLOR << GC_INFO_SHIFT); \
|
||||
} while (0)
|
||||
|
||||
#define GC_REF_SET_PURPLE(ref) do { \
|
||||
GC_TRACE_SET_COLOR(ref, GC_PURPLE); \
|
||||
GC_TYPE_INFO(ref) |= (GC_COLOR << GC_INFO_SHIFT); \
|
||||
} while (0)
|
||||
|
||||
@@ -150,7 +169,7 @@
|
||||
#define GC_DEFAULT_BUF_SIZE (16 * 1024)
|
||||
#define GC_BUF_GROW_STEP (128 * 1024)
|
||||
|
||||
#define GC_MAX_UNCOMPRESSED (1024 * 1024)
|
||||
#define GC_MAX_UNCOMPRESSED (512 * 1024)
|
||||
#define GC_MAX_BUF_SIZE 0x40000000
|
||||
|
||||
#define GC_THRESHOLD_DEFAULT 10000
|
||||
@@ -230,21 +249,6 @@ static zend_gc_globals gc_globals;
|
||||
# define GC_BENCH_PEAK(peak, counter)
|
||||
#endif
|
||||
|
||||
#if ZEND_GC_DEBUG > 1
|
||||
# define GC_TRACE(format, ...) fprintf(stderr, format "\n", ##__VA_ARGS__);
|
||||
# define GC_TRACE_REF(ref, format, ...) \
|
||||
do { \
|
||||
gc_trace_ref((zend_refcounted *) ref); \
|
||||
fprintf(stderr, format "\n", ##__VA_ARGS__); \
|
||||
} while (0)
|
||||
# define GC_TRACE_SET_COLOR(ref, color) \
|
||||
GC_TRACE_REF(ref, "->%s", gc_color_name(color))
|
||||
#else
|
||||
# define GC_TRACE_REF(ref, format, ...)
|
||||
# define GC_TRACE_SET_COLOR(ref, new_color)
|
||||
# define GC_TRACE(str)
|
||||
#endif
|
||||
|
||||
|
||||
#define GC_STACK_SEGMENT_SIZE (((4096 - ZEND_MM_OVERHEAD) / sizeof(void*)) - 2)
|
||||
|
||||
@@ -314,7 +318,10 @@ static void gc_stack_free(gc_stack *stack)
|
||||
|
||||
static zend_always_inline uint32_t gc_compress(uint32_t idx)
|
||||
{
|
||||
return idx % GC_MAX_UNCOMPRESSED;
|
||||
if (EXPECTED(idx < GC_MAX_UNCOMPRESSED)) {
|
||||
return idx;
|
||||
}
|
||||
return (idx % GC_MAX_UNCOMPRESSED) | GC_MAX_UNCOMPRESSED;
|
||||
}
|
||||
|
||||
static zend_always_inline gc_root_buffer* gc_decompress(zend_refcounted *ref, uint32_t idx)
|
||||
@@ -694,11 +701,14 @@ tail_call:
|
||||
ZVAL_OBJ(&tmp, obj);
|
||||
ht = get_gc(&tmp, &zv, &n);
|
||||
end = zv + n;
|
||||
if (EXPECTED(!ht)) {
|
||||
if (EXPECTED(!ht) || UNEXPECTED(GC_REF_CHECK_COLOR(ht, GC_BLACK))) {
|
||||
ht = NULL;
|
||||
if (!n) goto next;
|
||||
while (!Z_REFCOUNTED_P(--end)) {
|
||||
if (zv == end) goto next;
|
||||
}
|
||||
} else {
|
||||
GC_REF_SET_BLACK(ht);
|
||||
}
|
||||
while (zv != end) {
|
||||
if (Z_REFCOUNTED_P(zv)) {
|
||||
@@ -813,15 +823,19 @@ static void gc_mark_grey(zend_refcounted *ref, gc_stack *stack)
|
||||
ZVAL_OBJ(&tmp, obj);
|
||||
ht = get_gc(&tmp, &zv, &n);
|
||||
end = zv + n;
|
||||
if (EXPECTED(!ht)) {
|
||||
if (EXPECTED(!ht) || UNEXPECTED(GC_REF_CHECK_COLOR(ht, GC_GREY))) {
|
||||
ht = NULL;
|
||||
if (!n) goto next;
|
||||
while (!Z_REFCOUNTED_P(--end)) {
|
||||
if (zv == end) goto next;
|
||||
}
|
||||
} else {
|
||||
GC_REF_SET_COLOR(ht, GC_GREY);
|
||||
}
|
||||
while (zv != end) {
|
||||
if (Z_REFCOUNTED_P(zv)) {
|
||||
ref = Z_COUNTED_P(zv);
|
||||
ZEND_ASSERT(GC_REFCOUNT(ref) > 0);
|
||||
GC_DELREF(ref);
|
||||
if (!GC_REF_CHECK_COLOR(ref, GC_GREY)) {
|
||||
GC_REF_SET_COLOR(ref, GC_GREY);
|
||||
@@ -832,6 +846,7 @@ static void gc_mark_grey(zend_refcounted *ref, gc_stack *stack)
|
||||
}
|
||||
if (EXPECTED(!ht)) {
|
||||
ref = Z_COUNTED_P(zv);
|
||||
ZEND_ASSERT(GC_REFCOUNT(ref) > 0);
|
||||
GC_DELREF(ref);
|
||||
if (!GC_REF_CHECK_COLOR(ref, GC_GREY)) {
|
||||
GC_REF_SET_COLOR(ref, GC_GREY);
|
||||
@@ -852,6 +867,7 @@ static void gc_mark_grey(zend_refcounted *ref, gc_stack *stack)
|
||||
} else if (GC_TYPE(ref) == IS_REFERENCE) {
|
||||
if (Z_REFCOUNTED(((zend_reference*)ref)->val)) {
|
||||
ref = Z_COUNTED(((zend_reference*)ref)->val);
|
||||
ZEND_ASSERT(GC_REFCOUNT(ref) > 0);
|
||||
GC_DELREF(ref);
|
||||
if (!GC_REF_CHECK_COLOR(ref, GC_GREY)) {
|
||||
GC_REF_SET_COLOR(ref, GC_GREY);
|
||||
@@ -884,6 +900,7 @@ static void gc_mark_grey(zend_refcounted *ref, gc_stack *stack)
|
||||
}
|
||||
if (Z_REFCOUNTED_P(zv)) {
|
||||
ref = Z_COUNTED_P(zv);
|
||||
ZEND_ASSERT(GC_REFCOUNT(ref) > 0);
|
||||
GC_DELREF(ref);
|
||||
if (!GC_REF_CHECK_COLOR(ref, GC_GREY)) {
|
||||
GC_REF_SET_COLOR(ref, GC_GREY);
|
||||
@@ -897,6 +914,7 @@ static void gc_mark_grey(zend_refcounted *ref, gc_stack *stack)
|
||||
zv = Z_INDIRECT_P(zv);
|
||||
}
|
||||
ref = Z_COUNTED_P(zv);
|
||||
ZEND_ASSERT(GC_REFCOUNT(ref) > 0);
|
||||
GC_DELREF(ref);
|
||||
if (!GC_REF_CHECK_COLOR(ref, GC_GREY)) {
|
||||
GC_REF_SET_COLOR(ref, GC_GREY);
|
||||
@@ -998,11 +1016,14 @@ tail_call:
|
||||
ZVAL_OBJ(&tmp, obj);
|
||||
ht = get_gc(&tmp, &zv, &n);
|
||||
end = zv + n;
|
||||
if (EXPECTED(!ht)) {
|
||||
if (EXPECTED(!ht) || UNEXPECTED(!GC_REF_CHECK_COLOR(ht, GC_GREY))) {
|
||||
ht = NULL;
|
||||
if (!n) goto next;
|
||||
while (!Z_REFCOUNTED_P(--end)) {
|
||||
if (zv == end) goto next;
|
||||
}
|
||||
} else {
|
||||
GC_REF_SET_COLOR(ht, GC_WHITE);
|
||||
}
|
||||
while (zv != end) {
|
||||
if (Z_REFCOUNTED_P(zv)) {
|
||||
@@ -1169,7 +1190,8 @@ static int gc_collect_white(zend_refcounted *ref, uint32_t *flags, gc_stack *sta
|
||||
ZVAL_OBJ(&tmp, obj);
|
||||
ht = get_gc(&tmp, &zv, &n);
|
||||
end = zv + n;
|
||||
if (EXPECTED(!ht)) {
|
||||
if (EXPECTED(!ht) || UNEXPECTED(GC_REF_CHECK_COLOR(ht, GC_BLACK))) {
|
||||
ht = NULL;
|
||||
if (!n) goto next;
|
||||
while (!Z_REFCOUNTED_P(--end)) {
|
||||
/* count non-refcounted for compatibility ??? */
|
||||
@@ -1178,6 +1200,8 @@ static int gc_collect_white(zend_refcounted *ref, uint32_t *flags, gc_stack *sta
|
||||
}
|
||||
if (zv == end) goto next;
|
||||
}
|
||||
} else {
|
||||
GC_REF_SET_BLACK(ht);
|
||||
}
|
||||
while (zv != end) {
|
||||
if (Z_REFCOUNTED_P(zv)) {
|
||||
@@ -1326,16 +1350,24 @@ static void gc_remove_nested_data_from_buffer(zend_refcounted *ref, gc_root_buff
|
||||
zval *zv;
|
||||
|
||||
tail_call:
|
||||
if (root ||
|
||||
(GC_REF_ADDRESS(ref) != 0 &&
|
||||
GC_REF_CHECK_COLOR(ref, GC_BLACK))) {
|
||||
GC_TRACE_REF(ref, "removing from buffer");
|
||||
do {
|
||||
if (root) {
|
||||
GC_TRACE_REF(ref, "removing from buffer");
|
||||
gc_remove_from_roots(root);
|
||||
GC_REF_SET_INFO(ref, 0);
|
||||
root = NULL;
|
||||
} else {
|
||||
} else if (GC_REF_ADDRESS(ref) != 0
|
||||
&& GC_REF_CHECK_COLOR(ref, GC_BLACK)) {
|
||||
GC_TRACE_REF(ref, "removing from buffer");
|
||||
GC_REMOVE_FROM_BUFFER(ref);
|
||||
} else if (GC_TYPE(ref) == IS_REFERENCE) {
|
||||
if (Z_REFCOUNTED(((zend_reference*)ref)->val)) {
|
||||
ref = Z_COUNTED(((zend_reference*)ref)->val);
|
||||
goto tail_call;
|
||||
}
|
||||
return;
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
|
||||
if (GC_TYPE(ref) == IS_OBJECT) {
|
||||
@@ -1368,17 +1400,15 @@ tail_call:
|
||||
ref = Z_COUNTED_P(zv);
|
||||
goto tail_call;
|
||||
}
|
||||
if (GC_REF_ADDRESS(ht) != 0 && GC_REF_CHECK_COLOR(ht, GC_BLACK)) {
|
||||
GC_TRACE_REF(ht, "removing from buffer");
|
||||
GC_REMOVE_FROM_BUFFER(ht);
|
||||
}
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
} else if (GC_TYPE(ref) == IS_ARRAY) {
|
||||
ht = (zend_array*)ref;
|
||||
} else if (GC_TYPE(ref) == IS_REFERENCE) {
|
||||
if (Z_REFCOUNTED(((zend_reference*)ref)->val)) {
|
||||
ref = Z_COUNTED(((zend_reference*)ref)->val);
|
||||
goto tail_call;
|
||||
}
|
||||
return;
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
@@ -1414,7 +1444,7 @@ tail_call:
|
||||
}
|
||||
ref = Z_COUNTED_P(zv);
|
||||
goto tail_call;
|
||||
}
|
||||
} while (0);
|
||||
}
|
||||
|
||||
ZEND_API int zend_gc_collect_cycles(void)
|
||||
|
||||
+14
-10
@@ -96,16 +96,18 @@ ZEND_API zend_execute_data* zend_generator_freeze_call_stack(zend_execute_data *
|
||||
/* }}} */
|
||||
|
||||
static void zend_generator_cleanup_unfinished_execution(
|
||||
zend_generator *generator, uint32_t catch_op_num) /* {{{ */
|
||||
zend_generator *generator, zend_execute_data *execute_data, uint32_t catch_op_num) /* {{{ */
|
||||
{
|
||||
zend_execute_data *execute_data = generator->execute_data;
|
||||
|
||||
if (execute_data->opline != execute_data->func->op_array.opcodes) {
|
||||
/* -1 required because we want the last run opcode, not the next to-be-run one. */
|
||||
uint32_t op_num = execute_data->opline - execute_data->func->op_array.opcodes - 1;
|
||||
|
||||
if (UNEXPECTED(generator->frozen_call_stack)) {
|
||||
/* Temporarily restore generator->execute_data if it has been NULLed out already. */
|
||||
zend_execute_data *save_ex = generator->execute_data;
|
||||
generator->execute_data = execute_data;
|
||||
zend_generator_restore_call_stack(generator);
|
||||
generator->execute_data = save_ex;
|
||||
}
|
||||
zend_cleanup_unfinished_execution(execute_data, op_num, catch_op_num);
|
||||
}
|
||||
@@ -116,6 +118,9 @@ ZEND_API void zend_generator_close(zend_generator *generator, zend_bool finished
|
||||
{
|
||||
if (EXPECTED(generator->execute_data)) {
|
||||
zend_execute_data *execute_data = generator->execute_data;
|
||||
/* Null out execute_data early, to prevent double frees if GC runs while we're
|
||||
* already cleaning up execute_data. */
|
||||
generator->execute_data = NULL;
|
||||
|
||||
if (EX_CALL_INFO() & ZEND_CALL_HAS_SYMBOL_TABLE) {
|
||||
zend_clean_and_cache_symbol_table(execute_data->symbol_table);
|
||||
@@ -134,12 +139,12 @@ ZEND_API void zend_generator_close(zend_generator *generator, zend_bool finished
|
||||
return;
|
||||
}
|
||||
|
||||
zend_vm_stack_free_extra_args(generator->execute_data);
|
||||
zend_vm_stack_free_extra_args(execute_data);
|
||||
|
||||
/* Some cleanups are only necessary if the generator was closed
|
||||
* before it could finish execution (reach a return statement). */
|
||||
if (UNEXPECTED(!finished_execution)) {
|
||||
zend_generator_cleanup_unfinished_execution(generator, 0);
|
||||
zend_generator_cleanup_unfinished_execution(generator, execute_data, 0);
|
||||
}
|
||||
|
||||
/* Free closure object */
|
||||
@@ -153,8 +158,7 @@ ZEND_API void zend_generator_close(zend_generator *generator, zend_bool finished
|
||||
generator->gc_buffer = NULL;
|
||||
}
|
||||
|
||||
efree(generator->execute_data);
|
||||
generator->execute_data = NULL;
|
||||
efree(execute_data);
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
@@ -215,7 +219,7 @@ static void zend_generator_dtor_storage(zend_object *object) /* {{{ */
|
||||
if (finally_op_num) {
|
||||
zval *fast_call;
|
||||
|
||||
zend_generator_cleanup_unfinished_execution(generator, finally_op_num);
|
||||
zend_generator_cleanup_unfinished_execution(generator, ex, finally_op_num);
|
||||
|
||||
fast_call = ZEND_CALL_VAR(ex, ex->func->op_array.opcodes[finally_op_end].op1.var);
|
||||
Z_OBJ_P(fast_call) = EG(exception);
|
||||
@@ -271,7 +275,7 @@ static uint32_t calc_gc_buffer_size(zend_generator *generator) /* {{{ */
|
||||
if (EX_CALL_INFO() & ZEND_CALL_FREE_EXTRA_ARGS) {
|
||||
size += EX_NUM_ARGS() - op_array->num_args;
|
||||
}
|
||||
size += Z_TYPE(execute_data->This) == IS_OBJECT; /* $this */
|
||||
size += (EX_CALL_INFO() & ZEND_CALL_RELEASE_THIS) != 0; /* $this */
|
||||
size += (EX_CALL_INFO() & ZEND_CALL_CLOSURE) != 0; /* Closure object */
|
||||
|
||||
/* Live vars */
|
||||
@@ -352,7 +356,7 @@ static HashTable *zend_generator_get_gc(zval *object, zval **table, int *n) /* {
|
||||
}
|
||||
}
|
||||
|
||||
if (Z_TYPE(execute_data->This) == IS_OBJECT) {
|
||||
if (EX_CALL_INFO() & ZEND_CALL_RELEASE_THIS) {
|
||||
ZVAL_OBJ(gc_buffer++, Z_OBJ(execute_data->This));
|
||||
}
|
||||
if (EX_CALL_INFO() & ZEND_CALL_CLOSURE) {
|
||||
|
||||
+6
-4
@@ -481,6 +481,7 @@ ZEND_API void ZEND_FASTCALL zend_hash_iterator_del(uint32_t idx)
|
||||
|
||||
if (EXPECTED(iter->ht) && EXPECTED(iter->ht != HT_POISONED_PTR)
|
||||
&& EXPECTED(!HT_ITERATORS_OVERFLOW(iter->ht))) {
|
||||
ZEND_ASSERT(HT_ITERATORS_COUNT(iter->ht) != 0);
|
||||
HT_DEC_ITERATORS_COUNT(iter->ht);
|
||||
}
|
||||
iter->ht = NULL;
|
||||
@@ -1928,7 +1929,8 @@ ZEND_API HashTable* ZEND_FASTCALL zend_array_dup(HashTable *source)
|
||||
target->pDestructor = ZVAL_PTR_DTOR;
|
||||
|
||||
if (source->nNumOfElements == 0) {
|
||||
HT_FLAGS(target) = (HT_FLAGS(source) & ~(HASH_FLAG_INITIALIZED|HASH_FLAG_PACKED)) | HASH_FLAG_STATIC_KEYS;
|
||||
uint32_t mask = HASH_FLAG_MASK & ~(HASH_FLAG_INITIALIZED|HASH_FLAG_PACKED);
|
||||
HT_FLAGS(target) = (HT_FLAGS(source) & mask) | HASH_FLAG_STATIC_KEYS;
|
||||
target->nTableMask = HT_MIN_MASK;
|
||||
target->nNumUsed = 0;
|
||||
target->nNumOfElements = 0;
|
||||
@@ -1936,7 +1938,7 @@ ZEND_API HashTable* ZEND_FASTCALL zend_array_dup(HashTable *source)
|
||||
target->nInternalPointer = 0;
|
||||
HT_SET_DATA_ADDR(target, &uninitialized_bucket);
|
||||
} else if (GC_FLAGS(source) & IS_ARRAY_IMMUTABLE) {
|
||||
HT_FLAGS(target) = HT_FLAGS(source);
|
||||
HT_FLAGS(target) = HT_FLAGS(source) & HASH_FLAG_MASK;
|
||||
target->nTableMask = source->nTableMask;
|
||||
target->nNumUsed = source->nNumUsed;
|
||||
target->nNumOfElements = source->nNumOfElements;
|
||||
@@ -1945,7 +1947,7 @@ ZEND_API HashTable* ZEND_FASTCALL zend_array_dup(HashTable *source)
|
||||
target->nInternalPointer = source->nInternalPointer;
|
||||
memcpy(HT_GET_DATA_ADDR(target), HT_GET_DATA_ADDR(source), HT_USED_SIZE(source));
|
||||
} else if (HT_FLAGS(source) & HASH_FLAG_PACKED) {
|
||||
HT_FLAGS(target) = HT_FLAGS(source);
|
||||
HT_FLAGS(target) = HT_FLAGS(source) & HASH_FLAG_MASK;
|
||||
target->nTableMask = HT_MIN_MASK;
|
||||
target->nNumUsed = source->nNumUsed;
|
||||
target->nNumOfElements = source->nNumOfElements;
|
||||
@@ -1963,7 +1965,7 @@ ZEND_API HashTable* ZEND_FASTCALL zend_array_dup(HashTable *source)
|
||||
zend_array_dup_packed_elements(source, target, 1);
|
||||
}
|
||||
} else {
|
||||
HT_FLAGS(target) = HT_FLAGS(source);
|
||||
HT_FLAGS(target) = HT_FLAGS(source) & HASH_FLAG_MASK;
|
||||
target->nTableMask = source->nTableMask;
|
||||
target->nNextFreeElement = source->nNextFreeElement;
|
||||
target->nInternalPointer =
|
||||
|
||||
@@ -40,6 +40,9 @@
|
||||
#define HASH_FLAG_HAS_EMPTY_IND (1<<5)
|
||||
#define HASH_FLAG_ALLOW_COW_VIOLATION (1<<6)
|
||||
|
||||
/* Only the low byte are real flags */
|
||||
#define HASH_FLAG_MASK 0xff
|
||||
|
||||
#define HT_FLAGS(ht) (ht)->u.flags
|
||||
|
||||
#define HT_IS_PACKED(ht) \
|
||||
|
||||
@@ -208,8 +208,8 @@ static int zend_do_perform_type_hint_check(const zend_function *fe, zend_arg_inf
|
||||
fe_class_name = ZEND_TYPE_NAME(fe_arg_info->type);
|
||||
class_name = ZSTR_VAL(fe_class_name);
|
||||
class_name_len = ZSTR_LEN(fe_class_name);
|
||||
if (class_name_len == sizeof("parent")-1 && !strcasecmp(class_name, "parent") && proto->common.scope) {
|
||||
fe_class_name = zend_string_copy(proto->common.scope->name);
|
||||
if (class_name_len == sizeof("parent")-1 && !strcasecmp(class_name, "parent") && fe->common.scope && fe->common.scope->parent) {
|
||||
fe_class_name = zend_string_copy(fe->common.scope->parent->name);
|
||||
} else if (class_name_len == sizeof("self")-1 && !strcasecmp(class_name, "self") && fe->common.scope) {
|
||||
fe_class_name = zend_string_copy(fe->common.scope->name);
|
||||
} else {
|
||||
|
||||
@@ -1312,7 +1312,7 @@ static YYSIZE_T zend_yytnamerr(char *yyres, const char *yystr)
|
||||
|
||||
if (LANG_SCNG(yy_text)[0] == 0 &&
|
||||
LANG_SCNG(yy_leng) == 1 &&
|
||||
memcmp(yystr, "\"end of file\"", sizeof("\"end of file\"") - 1) == 0) {
|
||||
strcmp(yystr, "\"end of file\"") == 0) {
|
||||
if (yyres) {
|
||||
yystpcpy(yyres, "end of file");
|
||||
}
|
||||
|
||||
+376
-355
File diff suppressed because it is too large.
Load diff
@@ -115,6 +115,7 @@ do { \
|
||||
#define GET_DOUBLE_QUOTES_SCANNED_LENGTH() SCNG(scanned_string_len)
|
||||
|
||||
#define IS_LABEL_START(c) (((c) >= 'a' && (c) <= 'z') || ((c) >= 'A' && (c) <= 'Z') || (c) == '_' || (c) >= 0x80)
|
||||
#define IS_LABEL_SUCCESSOR(c) (((c) >= 'a' && (c) <= 'z') || ((c) >= 'A' && (c) <= 'Z') || ((c) >= '0' && (c) <= '9') || (c) == '_' || (c) >= 0x80)
|
||||
|
||||
#define ZEND_IS_OCT(c) ((c)>='0' && (c)<='7')
|
||||
#define ZEND_IS_HEX(c) (((c)>='0' && (c)<='9') || ((c)>='a' && (c)<='f') || ((c)>='A' && (c)<='F'))
|
||||
@@ -1781,7 +1782,8 @@ NEWLINE ("\r"|"\n"|"\r\n")
|
||||
char *end;
|
||||
if (yyleng < MAX_LENGTH_OF_LONG - 1) { /* Won't overflow */
|
||||
errno = 0;
|
||||
ZVAL_LONG(zendlval, ZEND_STRTOL(yytext, &end, 0));
|
||||
/* base must be passed explicitly for correct parse error on Windows */
|
||||
ZVAL_LONG(zendlval, ZEND_STRTOL(yytext, &end, yytext[0] == '0' ? 8 : 10));
|
||||
/* This isn't an assert, we need to ensure 019 isn't valid octal
|
||||
* Because the lexing itself doesn't do that for us
|
||||
*/
|
||||
@@ -2096,7 +2098,7 @@ inline_char_handler:
|
||||
|
||||
if (YYCURSOR < YYLIMIT) {
|
||||
YYCURSOR++;
|
||||
} else {
|
||||
} else if (!SCNG(heredoc_scan_ahead)) {
|
||||
zend_error(E_COMPILE_WARNING, "Unterminated comment starting line %d", CG(zend_lineno));
|
||||
}
|
||||
|
||||
@@ -2318,9 +2320,12 @@ skip_escape_conversion:
|
||||
|
||||
/* Check for ending label on the next line */
|
||||
if (heredoc_label->length < YYLIMIT - YYCURSOR && !memcmp(YYCURSOR, s, heredoc_label->length)) {
|
||||
if (!IS_LABEL_START(YYCURSOR[heredoc_label->length])) {
|
||||
if (!IS_LABEL_SUCCESSOR(YYCURSOR[heredoc_label->length])) {
|
||||
if (spacing == (HEREDOC_USING_SPACES | HEREDOC_USING_TABS)) {
|
||||
zend_throw_exception(zend_ce_parse_error, "Invalid indentation - tabs and spaces cannot be mixed", 0);
|
||||
if (PARSER_MODE()) {
|
||||
RETURN_TOKEN(T_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
YYCURSOR = saved_cursor;
|
||||
@@ -2337,6 +2342,7 @@ skip_escape_conversion:
|
||||
zend_lex_state current_state;
|
||||
int heredoc_nesting_level = 1;
|
||||
int first_token = 0;
|
||||
int error = 0;
|
||||
|
||||
zend_save_lexical_state(¤t_state);
|
||||
|
||||
@@ -2384,6 +2390,7 @@ skip_escape_conversion:
|
||||
|| first_token == T_CURLY_OPEN
|
||||
) && SCNG(heredoc_indentation)) {
|
||||
zend_throw_exception_ex(zend_ce_parse_error, 0, "Invalid body indentation level (expecting an indentation level of at least %d)", SCNG(heredoc_indentation));
|
||||
error = 1;
|
||||
}
|
||||
|
||||
heredoc_label->indentation = SCNG(heredoc_indentation);
|
||||
@@ -2392,6 +2399,10 @@ skip_escape_conversion:
|
||||
zend_restore_lexical_state(¤t_state);
|
||||
SCNG(heredoc_scan_ahead) = 0;
|
||||
CG(increment_lineno) = 0;
|
||||
|
||||
if (PARSER_MODE() && error) {
|
||||
RETURN_TOKEN(T_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
RETURN_TOKEN(T_START_HEREDOC);
|
||||
@@ -2575,12 +2586,15 @@ double_quotes_scan_done:
|
||||
|
||||
/* Check for ending label on the next line */
|
||||
if (IS_LABEL_START(*YYCURSOR) && heredoc_label->length < YYLIMIT - YYCURSOR && !memcmp(YYCURSOR, heredoc_label->label, heredoc_label->length)) {
|
||||
if (IS_LABEL_START(YYCURSOR[heredoc_label->length])) {
|
||||
if (IS_LABEL_SUCCESSOR(YYCURSOR[heredoc_label->length])) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (spacing == (HEREDOC_USING_SPACES | HEREDOC_USING_TABS)) {
|
||||
zend_throw_exception(zend_ce_parse_error, "Invalid indentation - tabs and spaces cannot be mixed", 0);
|
||||
if (PARSER_MODE()) {
|
||||
RETURN_TOKEN(T_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
/* newline before label will be subtracted from returned text, but
|
||||
@@ -2696,12 +2710,15 @@ heredoc_scan_done:
|
||||
|
||||
/* Check for ending label on the next line */
|
||||
if (IS_LABEL_START(*YYCURSOR) && heredoc_label->length < YYLIMIT - YYCURSOR && !memcmp(YYCURSOR, heredoc_label->label, heredoc_label->length)) {
|
||||
if (IS_LABEL_START(YYCURSOR[heredoc_label->length])) {
|
||||
if (IS_LABEL_SUCCESSOR(YYCURSOR[heredoc_label->length])) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (spacing == (HEREDOC_USING_SPACES | HEREDOC_USING_TABS)) {
|
||||
zend_throw_exception(zend_ce_parse_error, "Invalid indentation - tabs and spaces cannot be mixed", 0);
|
||||
if (PARSER_MODE()) {
|
||||
RETURN_TOKEN(T_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
/* newline before label will be subtracted from returned text, but
|
||||
@@ -2750,7 +2767,9 @@ nowdoc_scan_done:
|
||||
RETURN_TOKEN(END);
|
||||
}
|
||||
|
||||
zend_error(E_COMPILE_WARNING,"Unexpected character in input: '%c' (ASCII=%d) state=%d", yytext[0], yytext[0], YYSTATE);
|
||||
if (!SCNG(heredoc_scan_ahead)) {
|
||||
zend_error(E_COMPILE_WARNING, "Unexpected character in input: '%c' (ASCII=%d) state=%d", yytext[0], yytext[0], YYSTATE);
|
||||
}
|
||||
goto restart;
|
||||
}
|
||||
|
||||
|
||||
@@ -124,6 +124,11 @@ ZEND_API HashTable *zend_std_get_gc(zval *object, zval **table, int *n) /* {{{ *
|
||||
if (zobj->properties) {
|
||||
*table = NULL;
|
||||
*n = 0;
|
||||
if (UNEXPECTED(GC_REFCOUNT(zobj->properties) > 1)
|
||||
&& EXPECTED(!(GC_FLAGS(zobj->properties) & IS_ARRAY_IMMUTABLE))) {
|
||||
GC_DELREF(zobj->properties);
|
||||
zobj->properties = zend_array_dup(zobj->properties);
|
||||
}
|
||||
return zobj->properties;
|
||||
} else {
|
||||
*table = zobj->properties_table;
|
||||
|
||||
+2
-1
@@ -43,7 +43,8 @@ ZEND_API void zend_object_std_dtor(zend_object *object)
|
||||
|
||||
if (object->properties) {
|
||||
if (EXPECTED(!(GC_FLAGS(object->properties) & IS_ARRAY_IMMUTABLE))) {
|
||||
if (EXPECTED(GC_DELREF(object->properties) == 0)) {
|
||||
if (EXPECTED(GC_DELREF(object->properties) == 0)
|
||||
&& EXPECTED(GC_TYPE(object->properties) != IS_NULL)) {
|
||||
zend_array_destroy(object->properties);
|
||||
}
|
||||
}
|
||||
|
||||
+2
-1
@@ -235,7 +235,8 @@ ZEND_API void destroy_zend_class(zval *zv)
|
||||
efree(ce->default_static_members_table);
|
||||
}
|
||||
ZEND_HASH_FOREACH_PTR(&ce->properties_info, prop_info) {
|
||||
if (prop_info->ce == ce || (prop_info->flags & ZEND_ACC_SHADOW)) {
|
||||
if (prop_info->ce == ce ||
|
||||
((prop_info->flags & ZEND_ACC_SHADOW) && prop_info->ce == ce->parent)) {
|
||||
zend_string_release_ex(prop_info->name, 0);
|
||||
if (prop_info->doc_comment) {
|
||||
zend_string_release_ex(prop_info->doc_comment, 0);
|
||||
|
||||
@@ -1193,12 +1193,18 @@ ZEND_API int ZEND_FASTCALL pow_function(zval *result, zval *op1, zval *op2) /* {
|
||||
|
||||
if (EXPECTED(op1 != op2)) {
|
||||
if (Z_TYPE_P(op1) == IS_ARRAY) {
|
||||
if (op1 == result) {
|
||||
zval_ptr_dtor(result);
|
||||
}
|
||||
ZVAL_LONG(result, 0);
|
||||
return SUCCESS;
|
||||
} else {
|
||||
op1 = zendi_convert_scalar_to_number(op1, &op1_copy, result, 0);
|
||||
}
|
||||
if (Z_TYPE_P(op2) == IS_ARRAY) {
|
||||
if (op1 == result) {
|
||||
zval_ptr_dtor(result);
|
||||
}
|
||||
ZVAL_LONG(result, 1L);
|
||||
return SUCCESS;
|
||||
} else {
|
||||
@@ -1206,6 +1212,9 @@ ZEND_API int ZEND_FASTCALL pow_function(zval *result, zval *op1, zval *op2) /* {
|
||||
}
|
||||
} else {
|
||||
if (Z_TYPE_P(op1) == IS_ARRAY) {
|
||||
if (op1 == result) {
|
||||
zval_ptr_dtor(result);
|
||||
}
|
||||
ZVAL_LONG(result, 0);
|
||||
return SUCCESS;
|
||||
} else {
|
||||
|
||||
@@ -90,10 +90,10 @@ ZEND_API const char* ZEND_FASTCALL zend_memnstr_ex(const char *haystack, const c
|
||||
ZEND_API const char* ZEND_FASTCALL zend_memnrstr_ex(const char *haystack, const char *needle, size_t needle_len, const char *end);
|
||||
|
||||
#if SIZEOF_ZEND_LONG == 4
|
||||
# define ZEND_DOUBLE_FITS_LONG(d) (!((d) > ZEND_LONG_MAX || (d) < ZEND_LONG_MIN))
|
||||
# define ZEND_DOUBLE_FITS_LONG(d) (!((d) > (double)ZEND_LONG_MAX || (d) < (double)ZEND_LONG_MIN))
|
||||
#else
|
||||
/* >= as (double)ZEND_LONG_MAX is outside signed range */
|
||||
# define ZEND_DOUBLE_FITS_LONG(d) (!((d) >= ZEND_LONG_MAX || (d) < ZEND_LONG_MIN))
|
||||
# define ZEND_DOUBLE_FITS_LONG(d) (!((d) >= (double)ZEND_LONG_MAX || (d) < (double)ZEND_LONG_MIN))
|
||||
#endif
|
||||
|
||||
#if ZEND_DVAL_TO_LVAL_CAST_OK
|
||||
|
||||
+16
-5
@@ -328,13 +328,13 @@ void zend_signal_activate(void)
|
||||
|
||||
SIGG(active) = 1;
|
||||
SIGG(depth) = 0;
|
||||
SIGG(check) = ZEND_DEBUG;
|
||||
} /* }}} */
|
||||
|
||||
/* {{{ zend_signal_deactivate
|
||||
* */
|
||||
void zend_signal_deactivate(void)
|
||||
{
|
||||
|
||||
if (SIGG(check)) {
|
||||
size_t x;
|
||||
struct sigaction sa;
|
||||
@@ -342,21 +342,32 @@ void zend_signal_deactivate(void)
|
||||
if (SIGG(depth) != 0) {
|
||||
zend_error(E_CORE_WARNING, "zend_signal: shutdown with non-zero blocking depth (%d)", SIGG(depth));
|
||||
}
|
||||
|
||||
/* did anyone steal our installed handler */
|
||||
for (x = 0; x < sizeof(zend_sigs) / sizeof(*zend_sigs); x++) {
|
||||
sigaction(zend_sigs[x], NULL, &sa);
|
||||
if (sa.sa_sigaction != zend_signal_handler_defer) {
|
||||
if (sa.sa_sigaction != zend_signal_handler_defer &&
|
||||
sa.sa_sigaction != (void *) SIG_IGN) {
|
||||
zend_error(E_CORE_WARNING, "zend_signal: handler was replaced for signal (%d) after startup", zend_sigs[x]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SIGNAL_BEGIN_CRITICAL();
|
||||
SIGG(active) = 0;
|
||||
/* After active=0 is set, signal handlers will be called directly and other
|
||||
* state that is reset below will not be accessed. */
|
||||
*((volatile int *) &SIGG(active)) = 0;
|
||||
|
||||
SIGG(running) = 0;
|
||||
SIGG(blocked) = 0;
|
||||
SIGG(depth) = 0;
|
||||
SIGNAL_END_CRITICAL();
|
||||
|
||||
/* If there are any queued signals because of a missed unblock, drop them. */
|
||||
if (SIGG(phead) && SIGG(ptail)) {
|
||||
SIGG(ptail)->next = SIGG(pavail);
|
||||
SIGG(pavail) = SIGG(phead);
|
||||
SIGG(phead) = NULL;
|
||||
SIGG(ptail) = NULL;
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
+15
-1
@@ -234,7 +234,13 @@ static zend_string* ZEND_FASTCALL zend_new_interned_string_request(zend_string *
|
||||
}
|
||||
|
||||
/* Create a short living interned, freed after the request. */
|
||||
ZEND_ASSERT(!(GC_FLAGS(str) & GC_PERSISTENT));
|
||||
#if ZEND_RC_DEBUG
|
||||
if (zend_rc_debug) {
|
||||
/* PHP shouldn't create persistent interned string during request,
|
||||
* but at least dl() may do this */
|
||||
ZEND_ASSERT(!(GC_FLAGS(str) & GC_PERSISTENT));
|
||||
}
|
||||
#endif
|
||||
if (GC_REFCOUNT(str) > 1) {
|
||||
zend_ulong h = ZSTR_H(str);
|
||||
zend_string_delref(str);
|
||||
@@ -257,6 +263,7 @@ static zend_string* ZEND_FASTCALL zend_string_init_interned_permanent(const char
|
||||
return ret;
|
||||
}
|
||||
|
||||
ZEND_ASSERT(permanent);
|
||||
ret = zend_string_init(str, size, permanent);
|
||||
ZSTR_H(ret) = h;
|
||||
return zend_add_interned_string(ret, &interned_strings_permanent, IS_STR_PERMANENT);
|
||||
@@ -278,6 +285,13 @@ static zend_string* ZEND_FASTCALL zend_string_init_interned_request(const char *
|
||||
return ret;
|
||||
}
|
||||
|
||||
#if ZEND_RC_DEBUG
|
||||
if (zend_rc_debug) {
|
||||
/* PHP shouldn't create persistent interned string during request,
|
||||
* but at least dl() may do this */
|
||||
ZEND_ASSERT(!permanent);
|
||||
}
|
||||
#endif
|
||||
ret = zend_string_init(str, size, permanent);
|
||||
ZSTR_H(ret) = h;
|
||||
|
||||
|
||||
+18
-2
@@ -89,6 +89,8 @@ static cwd_state main_cwd_state; /* True global */
|
||||
#include <unistd.h>
|
||||
#else
|
||||
#include <direct.h>
|
||||
#include "zend_globals.h"
|
||||
#include "zend_globals_macros.h"
|
||||
#endif
|
||||
|
||||
#define CWD_STATE_COPY(d, s) \
|
||||
@@ -857,6 +859,7 @@ static size_t tsrm_realpath_r(char *path, size_t start, size_t len, int *ll, tim
|
||||
tmp = do_alloca(len+1, use_heap);
|
||||
memcpy(tmp, path, len+1);
|
||||
|
||||
retry:
|
||||
if(save &&
|
||||
!(IS_UNC_PATH(path, len) && len >= 3 && path[2] != '?') &&
|
||||
(dataw.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT)
|
||||
@@ -904,7 +907,21 @@ static size_t tsrm_realpath_r(char *path, size_t start, size_t len, int *ll, tim
|
||||
return (size_t)-1;
|
||||
}
|
||||
if(!DeviceIoControl(hLink, FSCTL_GET_REPARSE_POINT, NULL, 0, pbuffer, MAXIMUM_REPARSE_DATA_BUFFER_SIZE, &retlength, NULL)) {
|
||||
BY_HANDLE_FILE_INFORMATION fileInformation;
|
||||
|
||||
free_alloca(pbuffer, use_heap_large);
|
||||
if ((dataw.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT) &&
|
||||
(dataw.dwReserved0 & ~IO_REPARSE_TAG_CLOUD_MASK) == IO_REPARSE_TAG_CLOUD &&
|
||||
EG(windows_version_info).dwMajorVersion >= 10 &&
|
||||
EG(windows_version_info).dwMinorVersion == 0 &&
|
||||
EG(windows_version_info).dwBuildNumber >= 18362 &&
|
||||
GetFileInformationByHandle(hLink, &fileInformation) &&
|
||||
!(fileInformation.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT)) {
|
||||
dataw.dwFileAttributes = fileInformation.dwFileAttributes;
|
||||
CloseHandle(hLink);
|
||||
(*ll)--;
|
||||
goto retry;
|
||||
}
|
||||
free_alloca(tmp, use_heap);
|
||||
CloseHandle(hLink);
|
||||
FREE_PATHW()
|
||||
@@ -984,8 +1001,7 @@ static size_t tsrm_realpath_r(char *path, size_t start, size_t len, int *ll, tim
|
||||
}
|
||||
else if (pbuffer->ReparseTag == IO_REPARSE_TAG_DEDUP ||
|
||||
/* Starting with 1709. */
|
||||
(pbuffer->ReparseTag & IO_REPARSE_TAG_CLOUD_MASK) != 0 && 0x90001018L != pbuffer->ReparseTag ||
|
||||
IO_REPARSE_TAG_CLOUD == pbuffer->ReparseTag ||
|
||||
(pbuffer->ReparseTag & ~IO_REPARSE_TAG_CLOUD_MASK) == IO_REPARSE_TAG_CLOUD ||
|
||||
IO_REPARSE_TAG_ONEDRIVE == pbuffer->ReparseTag) {
|
||||
isabsolute = 1;
|
||||
substitutename = malloc((len + 1) * sizeof(char));
|
||||
|
||||
+18
-13
@@ -2430,6 +2430,11 @@ ZEND_VM_HOT_HELPER(zend_leave_helper, ANY, ANY)
|
||||
zend_clean_and_cache_symbol_table(EX(symbol_table));
|
||||
}
|
||||
EG(current_execute_data) = EX(prev_execute_data);
|
||||
|
||||
/* Free extra args before releasing the closure,
|
||||
* as that may free the op_array. */
|
||||
zend_vm_stack_free_extra_args_ex(call_info, execute_data);
|
||||
|
||||
if (UNEXPECTED(call_info & ZEND_CALL_RELEASE_THIS)) {
|
||||
zend_object *object = Z_OBJ(execute_data->This);
|
||||
#if 0
|
||||
@@ -2445,7 +2450,6 @@ ZEND_VM_HOT_HELPER(zend_leave_helper, ANY, ANY)
|
||||
OBJ_RELEASE(ZEND_CLOSURE_OBJECT(EX(func)));
|
||||
}
|
||||
|
||||
zend_vm_stack_free_extra_args_ex(call_info, execute_data);
|
||||
old_execute_data = execute_data;
|
||||
execute_data = EX(prev_execute_data);
|
||||
zend_vm_stack_free_call_frame_ex(call_info, old_execute_data);
|
||||
@@ -3157,6 +3161,7 @@ ZEND_VM_HANDLER(113, ZEND_INIT_STATIC_METHOD_CALL, UNUSED|CLASS_FETCH|CONST|VAR,
|
||||
ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), RT_CONSTANT(opline, opline->op1) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
|
||||
if (UNEXPECTED(ce == NULL)) {
|
||||
ZEND_ASSERT(EG(exception));
|
||||
FREE_UNFETCHED_OP2();
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
if (OP2_TYPE != IS_CONST) {
|
||||
@@ -8506,7 +8511,7 @@ ZEND_VM_HOT_TYPE_SPEC_HANDLER(ZEND_IS_SMALLER_OR_EQUAL, (op1_info == MAY_BE_DOUB
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
ZEND_VM_HOT_TYPE_SPEC_HANDLER(ZEND_PRE_INC, (res_info == MAY_BE_LONG && op1_info == MAY_BE_LONG), ZEND_PRE_INC_LONG_NO_OVERFLOW, TMPVARCV, ANY, SPEC(RETVAL))
|
||||
ZEND_VM_HOT_TYPE_SPEC_HANDLER(ZEND_PRE_INC, (res_info == MAY_BE_LONG && op1_info == MAY_BE_LONG), ZEND_PRE_INC_LONG_NO_OVERFLOW, CV, ANY, SPEC(RETVAL))
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
@@ -8519,7 +8524,7 @@ ZEND_VM_HOT_TYPE_SPEC_HANDLER(ZEND_PRE_INC, (res_info == MAY_BE_LONG && op1_info
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
ZEND_VM_HOT_TYPE_SPEC_HANDLER(ZEND_PRE_INC, (op1_info == MAY_BE_LONG), ZEND_PRE_INC_LONG, TMPVARCV, ANY, SPEC(RETVAL))
|
||||
ZEND_VM_HOT_TYPE_SPEC_HANDLER(ZEND_PRE_INC, (op1_info == MAY_BE_LONG), ZEND_PRE_INC_LONG, CV, ANY, SPEC(RETVAL))
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
@@ -8532,7 +8537,7 @@ ZEND_VM_HOT_TYPE_SPEC_HANDLER(ZEND_PRE_INC, (op1_info == MAY_BE_LONG), ZEND_PRE_
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
ZEND_VM_HOT_TYPE_SPEC_HANDLER(ZEND_PRE_INC, (op1_info == (MAY_BE_LONG|MAY_BE_DOUBLE)), ZEND_PRE_INC_LONG_OR_DOUBLE, TMPVARCV, ANY, SPEC(RETVAL))
|
||||
ZEND_VM_HOT_TYPE_SPEC_HANDLER(ZEND_PRE_INC, (op1_info == (MAY_BE_LONG|MAY_BE_DOUBLE)), ZEND_PRE_INC_LONG_OR_DOUBLE, CV, ANY, SPEC(RETVAL))
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
@@ -8549,7 +8554,7 @@ ZEND_VM_HOT_TYPE_SPEC_HANDLER(ZEND_PRE_INC, (op1_info == (MAY_BE_LONG|MAY_BE_DOU
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
ZEND_VM_HOT_TYPE_SPEC_HANDLER(ZEND_PRE_DEC, (res_info == MAY_BE_LONG && op1_info == MAY_BE_LONG), ZEND_PRE_DEC_LONG_NO_OVERFLOW, TMPVARCV, ANY, SPEC(RETVAL))
|
||||
ZEND_VM_HOT_TYPE_SPEC_HANDLER(ZEND_PRE_DEC, (res_info == MAY_BE_LONG && op1_info == MAY_BE_LONG), ZEND_PRE_DEC_LONG_NO_OVERFLOW, CV, ANY, SPEC(RETVAL))
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
@@ -8562,7 +8567,7 @@ ZEND_VM_HOT_TYPE_SPEC_HANDLER(ZEND_PRE_DEC, (res_info == MAY_BE_LONG && op1_info
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
ZEND_VM_HOT_TYPE_SPEC_HANDLER(ZEND_PRE_DEC, (op1_info == MAY_BE_LONG), ZEND_PRE_DEC_LONG, TMPVARCV, ANY, SPEC(RETVAL))
|
||||
ZEND_VM_HOT_TYPE_SPEC_HANDLER(ZEND_PRE_DEC, (op1_info == MAY_BE_LONG), ZEND_PRE_DEC_LONG, CV, ANY, SPEC(RETVAL))
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
@@ -8575,7 +8580,7 @@ ZEND_VM_HOT_TYPE_SPEC_HANDLER(ZEND_PRE_DEC, (op1_info == MAY_BE_LONG), ZEND_PRE_
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
ZEND_VM_HOT_TYPE_SPEC_HANDLER(ZEND_PRE_DEC, (op1_info == (MAY_BE_LONG|MAY_BE_DOUBLE)), ZEND_PRE_DEC_LONG_OR_DOUBLE, TMPVARCV, ANY, SPEC(RETVAL))
|
||||
ZEND_VM_HOT_TYPE_SPEC_HANDLER(ZEND_PRE_DEC, (op1_info == (MAY_BE_LONG|MAY_BE_DOUBLE)), ZEND_PRE_DEC_LONG_OR_DOUBLE, CV, ANY, SPEC(RETVAL))
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
@@ -8592,7 +8597,7 @@ ZEND_VM_HOT_TYPE_SPEC_HANDLER(ZEND_PRE_DEC, (op1_info == (MAY_BE_LONG|MAY_BE_DOU
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
ZEND_VM_HOT_TYPE_SPEC_HANDLER(ZEND_POST_INC, (res_info == MAY_BE_LONG && op1_info == MAY_BE_LONG), ZEND_POST_INC_LONG_NO_OVERFLOW, TMPVARCV, ANY)
|
||||
ZEND_VM_HOT_TYPE_SPEC_HANDLER(ZEND_POST_INC, (res_info == MAY_BE_LONG && op1_info == MAY_BE_LONG), ZEND_POST_INC_LONG_NO_OVERFLOW, CV, ANY)
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
@@ -8603,7 +8608,7 @@ ZEND_VM_HOT_TYPE_SPEC_HANDLER(ZEND_POST_INC, (res_info == MAY_BE_LONG && op1_inf
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
ZEND_VM_HOT_TYPE_SPEC_HANDLER(ZEND_POST_INC, (op1_info == MAY_BE_LONG), ZEND_POST_INC_LONG, TMPVARCV, ANY)
|
||||
ZEND_VM_HOT_TYPE_SPEC_HANDLER(ZEND_POST_INC, (op1_info == MAY_BE_LONG), ZEND_POST_INC_LONG, CV, ANY)
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
@@ -8614,7 +8619,7 @@ ZEND_VM_HOT_TYPE_SPEC_HANDLER(ZEND_POST_INC, (op1_info == MAY_BE_LONG), ZEND_POS
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
ZEND_VM_HOT_TYPE_SPEC_HANDLER(ZEND_POST_INC, (op1_info == (MAY_BE_LONG|MAY_BE_DOUBLE)), ZEND_POST_INC_LONG_OR_DOUBLE, TMPVARCV, ANY)
|
||||
ZEND_VM_HOT_TYPE_SPEC_HANDLER(ZEND_POST_INC, (op1_info == (MAY_BE_LONG|MAY_BE_DOUBLE)), ZEND_POST_INC_LONG_OR_DOUBLE, CV, ANY)
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
@@ -8630,7 +8635,7 @@ ZEND_VM_HOT_TYPE_SPEC_HANDLER(ZEND_POST_INC, (op1_info == (MAY_BE_LONG|MAY_BE_DO
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
ZEND_VM_HOT_TYPE_SPEC_HANDLER(ZEND_POST_DEC, (res_info == MAY_BE_LONG && op1_info == MAY_BE_LONG), ZEND_POST_DEC_LONG_NO_OVERFLOW, TMPVARCV, ANY)
|
||||
ZEND_VM_HOT_TYPE_SPEC_HANDLER(ZEND_POST_DEC, (res_info == MAY_BE_LONG && op1_info == MAY_BE_LONG), ZEND_POST_DEC_LONG_NO_OVERFLOW, CV, ANY)
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
@@ -8641,7 +8646,7 @@ ZEND_VM_HOT_TYPE_SPEC_HANDLER(ZEND_POST_DEC, (res_info == MAY_BE_LONG && op1_inf
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
ZEND_VM_HOT_TYPE_SPEC_HANDLER(ZEND_POST_DEC, (op1_info == MAY_BE_LONG), ZEND_POST_DEC_LONG, TMPVARCV, ANY)
|
||||
ZEND_VM_HOT_TYPE_SPEC_HANDLER(ZEND_POST_DEC, (op1_info == MAY_BE_LONG), ZEND_POST_DEC_LONG, CV, ANY)
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
@@ -8652,7 +8657,7 @@ ZEND_VM_HOT_TYPE_SPEC_HANDLER(ZEND_POST_DEC, (op1_info == MAY_BE_LONG), ZEND_POS
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
ZEND_VM_HOT_TYPE_SPEC_HANDLER(ZEND_POST_DEC, (op1_info == (MAY_BE_LONG|MAY_BE_DOUBLE)), ZEND_POST_DEC_LONG_OR_DOUBLE, TMPVARCV, ANY)
|
||||
ZEND_VM_HOT_TYPE_SPEC_HANDLER(ZEND_POST_DEC, (op1_info == (MAY_BE_LONG|MAY_BE_DOUBLE)), ZEND_POST_DEC_LONG_OR_DOUBLE, CV, ANY)
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
|
||||
+378
-358
@@ -541,6 +541,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_leave_helper_SPEC(ZEND_OPCODE_
|
||||
zend_clean_and_cache_symbol_table(EX(symbol_table));
|
||||
}
|
||||
EG(current_execute_data) = EX(prev_execute_data);
|
||||
|
||||
/* Free extra args before releasing the closure,
|
||||
* as that may free the op_array. */
|
||||
zend_vm_stack_free_extra_args_ex(call_info, execute_data);
|
||||
|
||||
if (UNEXPECTED(call_info & ZEND_CALL_RELEASE_THIS)) {
|
||||
zend_object *object = Z_OBJ(execute_data->This);
|
||||
#if 0
|
||||
@@ -556,7 +561,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_leave_helper_SPEC(ZEND_OPCODE_
|
||||
OBJ_RELEASE(ZEND_CLOSURE_OBJECT(EX(func)));
|
||||
}
|
||||
|
||||
zend_vm_stack_free_extra_args_ex(call_info, execute_data);
|
||||
old_execute_data = execute_data;
|
||||
execute_data = EX(prev_execute_data);
|
||||
zend_vm_stack_free_call_frame_ex(call_info, old_execute_data);
|
||||
@@ -5205,6 +5209,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_C
|
||||
ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), RT_CONSTANT(opline, opline->op1) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
|
||||
if (UNEXPECTED(ce == NULL)) {
|
||||
ZEND_ASSERT(EG(exception));
|
||||
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
if (IS_CONST != IS_CONST) {
|
||||
@@ -7386,6 +7391,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_C
|
||||
ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), RT_CONSTANT(opline, opline->op1) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
|
||||
if (UNEXPECTED(ce == NULL)) {
|
||||
ZEND_ASSERT(EG(exception));
|
||||
zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
if ((IS_TMP_VAR|IS_VAR) != IS_CONST) {
|
||||
@@ -8619,6 +8625,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_C
|
||||
ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), RT_CONSTANT(opline, opline->op1) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
|
||||
if (UNEXPECTED(ce == NULL)) {
|
||||
ZEND_ASSERT(EG(exception));
|
||||
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
if (IS_UNUSED != IS_CONST) {
|
||||
@@ -10486,6 +10493,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_C
|
||||
ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), RT_CONSTANT(opline, opline->op1) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
|
||||
if (UNEXPECTED(ce == NULL)) {
|
||||
ZEND_ASSERT(EG(exception));
|
||||
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
if (IS_CV != IS_CONST) {
|
||||
@@ -11048,254 +11056,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_CONST_CV_HANDLER(ZE
|
||||
ZEND_VM_RETURN();
|
||||
}
|
||||
|
||||
static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_INC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_RETVAL_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
|
||||
var_ptr = EX_VAR(opline->op1.var);
|
||||
Z_LVAL_P(var_ptr)++;
|
||||
if (UNEXPECTED(0)) {
|
||||
ZVAL_LONG(EX_VAR(opline->result.var), Z_LVAL_P(var_ptr));
|
||||
}
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_INC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_RETVAL_USED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
|
||||
var_ptr = EX_VAR(opline->op1.var);
|
||||
Z_LVAL_P(var_ptr)++;
|
||||
if (UNEXPECTED(1)) {
|
||||
ZVAL_LONG(EX_VAR(opline->result.var), Z_LVAL_P(var_ptr));
|
||||
}
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_INC_LONG_SPEC_TMPVARCV_RETVAL_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
|
||||
var_ptr = EX_VAR(opline->op1.var);
|
||||
fast_long_increment_function(var_ptr);
|
||||
if (UNEXPECTED(0)) {
|
||||
ZVAL_COPY_VALUE(EX_VAR(opline->result.var), var_ptr);
|
||||
}
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_INC_LONG_SPEC_TMPVARCV_RETVAL_USED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
|
||||
var_ptr = EX_VAR(opline->op1.var);
|
||||
fast_long_increment_function(var_ptr);
|
||||
if (UNEXPECTED(1)) {
|
||||
ZVAL_COPY_VALUE(EX_VAR(opline->result.var), var_ptr);
|
||||
}
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_INC_LONG_OR_DOUBLE_SPEC_TMPVARCV_RETVAL_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
|
||||
var_ptr = EX_VAR(opline->op1.var);
|
||||
if (EXPECTED(Z_TYPE_P(var_ptr) == IS_LONG)) {
|
||||
fast_long_increment_function(var_ptr);
|
||||
} else {
|
||||
Z_DVAL_P(var_ptr)++;
|
||||
}
|
||||
if (UNEXPECTED(0)) {
|
||||
ZVAL_COPY_VALUE(EX_VAR(opline->result.var), var_ptr);
|
||||
}
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_INC_LONG_OR_DOUBLE_SPEC_TMPVARCV_RETVAL_USED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
|
||||
var_ptr = EX_VAR(opline->op1.var);
|
||||
if (EXPECTED(Z_TYPE_P(var_ptr) == IS_LONG)) {
|
||||
fast_long_increment_function(var_ptr);
|
||||
} else {
|
||||
Z_DVAL_P(var_ptr)++;
|
||||
}
|
||||
if (UNEXPECTED(1)) {
|
||||
ZVAL_COPY_VALUE(EX_VAR(opline->result.var), var_ptr);
|
||||
}
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_DEC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_RETVAL_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
|
||||
var_ptr = EX_VAR(opline->op1.var);
|
||||
Z_LVAL_P(var_ptr)--;
|
||||
if (UNEXPECTED(0)) {
|
||||
ZVAL_LONG(EX_VAR(opline->result.var), Z_LVAL_P(var_ptr));
|
||||
}
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_DEC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_RETVAL_USED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
|
||||
var_ptr = EX_VAR(opline->op1.var);
|
||||
Z_LVAL_P(var_ptr)--;
|
||||
if (UNEXPECTED(1)) {
|
||||
ZVAL_LONG(EX_VAR(opline->result.var), Z_LVAL_P(var_ptr));
|
||||
}
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_DEC_LONG_SPEC_TMPVARCV_RETVAL_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
|
||||
var_ptr = EX_VAR(opline->op1.var);
|
||||
fast_long_decrement_function(var_ptr);
|
||||
if (UNEXPECTED(0)) {
|
||||
ZVAL_COPY_VALUE(EX_VAR(opline->result.var), var_ptr);
|
||||
}
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_DEC_LONG_SPEC_TMPVARCV_RETVAL_USED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
|
||||
var_ptr = EX_VAR(opline->op1.var);
|
||||
fast_long_decrement_function(var_ptr);
|
||||
if (UNEXPECTED(1)) {
|
||||
ZVAL_COPY_VALUE(EX_VAR(opline->result.var), var_ptr);
|
||||
}
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_DEC_LONG_OR_DOUBLE_SPEC_TMPVARCV_RETVAL_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
|
||||
var_ptr = EX_VAR(opline->op1.var);
|
||||
if (EXPECTED(Z_TYPE_P(var_ptr) == IS_LONG)) {
|
||||
fast_long_decrement_function(var_ptr);
|
||||
} else {
|
||||
Z_DVAL_P(var_ptr)--;
|
||||
}
|
||||
if (UNEXPECTED(0)) {
|
||||
ZVAL_COPY_VALUE(EX_VAR(opline->result.var), var_ptr);
|
||||
}
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_DEC_LONG_OR_DOUBLE_SPEC_TMPVARCV_RETVAL_USED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
|
||||
var_ptr = EX_VAR(opline->op1.var);
|
||||
if (EXPECTED(Z_TYPE_P(var_ptr) == IS_LONG)) {
|
||||
fast_long_decrement_function(var_ptr);
|
||||
} else {
|
||||
Z_DVAL_P(var_ptr)--;
|
||||
}
|
||||
if (UNEXPECTED(1)) {
|
||||
ZVAL_COPY_VALUE(EX_VAR(opline->result.var), var_ptr);
|
||||
}
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POST_INC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
|
||||
var_ptr = EX_VAR(opline->op1.var);
|
||||
ZVAL_LONG(EX_VAR(opline->result.var), Z_LVAL_P(var_ptr));
|
||||
Z_LVAL_P(var_ptr)++;
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POST_INC_LONG_SPEC_TMPVARCV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
|
||||
var_ptr = EX_VAR(opline->op1.var);
|
||||
ZVAL_LONG(EX_VAR(opline->result.var), Z_LVAL_P(var_ptr));
|
||||
fast_long_increment_function(var_ptr);
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POST_INC_LONG_OR_DOUBLE_SPEC_TMPVARCV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
|
||||
var_ptr = EX_VAR(opline->op1.var);
|
||||
if (EXPECTED(Z_TYPE_P(var_ptr) == IS_LONG)) {
|
||||
ZVAL_LONG(EX_VAR(opline->result.var), Z_LVAL_P(var_ptr));
|
||||
fast_long_increment_function(var_ptr);
|
||||
} else {
|
||||
ZVAL_DOUBLE(EX_VAR(opline->result.var), Z_DVAL_P(var_ptr));
|
||||
Z_DVAL_P(var_ptr)++;
|
||||
}
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POST_DEC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
|
||||
var_ptr = EX_VAR(opline->op1.var);
|
||||
ZVAL_LONG(EX_VAR(opline->result.var), Z_LVAL_P(var_ptr));
|
||||
Z_LVAL_P(var_ptr)--;
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POST_DEC_LONG_SPEC_TMPVARCV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
|
||||
var_ptr = EX_VAR(opline->op1.var);
|
||||
ZVAL_LONG(EX_VAR(opline->result.var), Z_LVAL_P(var_ptr));
|
||||
fast_long_decrement_function(var_ptr);
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POST_DEC_LONG_OR_DOUBLE_SPEC_TMPVARCV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
|
||||
var_ptr = EX_VAR(opline->op1.var);
|
||||
if (EXPECTED(Z_TYPE_P(var_ptr) == IS_LONG)) {
|
||||
ZVAL_LONG(EX_VAR(opline->result.var), Z_LVAL_P(var_ptr));
|
||||
fast_long_decrement_function(var_ptr);
|
||||
} else {
|
||||
ZVAL_DOUBLE(EX_VAR(opline->result.var), Z_DVAL_P(var_ptr));
|
||||
Z_DVAL_P(var_ptr)--;
|
||||
}
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_QM_ASSIGN_DOUBLE_SPEC_TMPVARCV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
{
|
||||
USE_OPLINE
|
||||
@@ -23749,6 +23509,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_V
|
||||
ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), RT_CONSTANT(opline, opline->op1) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
|
||||
if (UNEXPECTED(ce == NULL)) {
|
||||
ZEND_ASSERT(EG(exception));
|
||||
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
if (IS_CONST != IS_CONST) {
|
||||
@@ -26063,6 +25824,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_V
|
||||
ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), RT_CONSTANT(opline, opline->op1) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
|
||||
if (UNEXPECTED(ce == NULL)) {
|
||||
ZEND_ASSERT(EG(exception));
|
||||
zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
if ((IS_TMP_VAR|IS_VAR) != IS_CONST) {
|
||||
@@ -27622,6 +27384,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_V
|
||||
ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), RT_CONSTANT(opline, opline->op1) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
|
||||
if (UNEXPECTED(ce == NULL)) {
|
||||
ZEND_ASSERT(EG(exception));
|
||||
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
if (IS_UNUSED != IS_CONST) {
|
||||
@@ -30060,6 +29823,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_V
|
||||
ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), RT_CONSTANT(opline, opline->op1) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
|
||||
if (UNEXPECTED(ce == NULL)) {
|
||||
ZEND_ASSERT(EG(exception));
|
||||
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
if (IS_CV != IS_CONST) {
|
||||
@@ -32162,6 +31926,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_U
|
||||
ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), RT_CONSTANT(opline, opline->op1) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
|
||||
if (UNEXPECTED(ce == NULL)) {
|
||||
ZEND_ASSERT(EG(exception));
|
||||
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
if (IS_CONST != IS_CONST) {
|
||||
@@ -33897,6 +33662,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_U
|
||||
ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), RT_CONSTANT(opline, opline->op1) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
|
||||
if (UNEXPECTED(ce == NULL)) {
|
||||
ZEND_ASSERT(EG(exception));
|
||||
zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
if ((IS_TMP_VAR|IS_VAR) != IS_CONST) {
|
||||
@@ -34435,6 +34201,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_U
|
||||
ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), RT_CONSTANT(opline, opline->op1) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
|
||||
if (UNEXPECTED(ce == NULL)) {
|
||||
ZEND_ASSERT(EG(exception));
|
||||
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
if (IS_UNUSED != IS_CONST) {
|
||||
@@ -36276,6 +36043,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_U
|
||||
ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), RT_CONSTANT(opline, opline->op1) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
|
||||
if (UNEXPECTED(ce == NULL)) {
|
||||
ZEND_ASSERT(EG(exception));
|
||||
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
if (IS_CV != IS_CONST) {
|
||||
@@ -38219,6 +37987,254 @@ type_check_resource:
|
||||
}
|
||||
}
|
||||
|
||||
static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_INC_LONG_NO_OVERFLOW_SPEC_CV_RETVAL_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
|
||||
var_ptr = EX_VAR(opline->op1.var);
|
||||
Z_LVAL_P(var_ptr)++;
|
||||
if (UNEXPECTED(0)) {
|
||||
ZVAL_LONG(EX_VAR(opline->result.var), Z_LVAL_P(var_ptr));
|
||||
}
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_INC_LONG_NO_OVERFLOW_SPEC_CV_RETVAL_USED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
|
||||
var_ptr = EX_VAR(opline->op1.var);
|
||||
Z_LVAL_P(var_ptr)++;
|
||||
if (UNEXPECTED(1)) {
|
||||
ZVAL_LONG(EX_VAR(opline->result.var), Z_LVAL_P(var_ptr));
|
||||
}
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_INC_LONG_SPEC_CV_RETVAL_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
|
||||
var_ptr = EX_VAR(opline->op1.var);
|
||||
fast_long_increment_function(var_ptr);
|
||||
if (UNEXPECTED(0)) {
|
||||
ZVAL_COPY_VALUE(EX_VAR(opline->result.var), var_ptr);
|
||||
}
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_INC_LONG_SPEC_CV_RETVAL_USED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
|
||||
var_ptr = EX_VAR(opline->op1.var);
|
||||
fast_long_increment_function(var_ptr);
|
||||
if (UNEXPECTED(1)) {
|
||||
ZVAL_COPY_VALUE(EX_VAR(opline->result.var), var_ptr);
|
||||
}
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_INC_LONG_OR_DOUBLE_SPEC_CV_RETVAL_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
|
||||
var_ptr = EX_VAR(opline->op1.var);
|
||||
if (EXPECTED(Z_TYPE_P(var_ptr) == IS_LONG)) {
|
||||
fast_long_increment_function(var_ptr);
|
||||
} else {
|
||||
Z_DVAL_P(var_ptr)++;
|
||||
}
|
||||
if (UNEXPECTED(0)) {
|
||||
ZVAL_COPY_VALUE(EX_VAR(opline->result.var), var_ptr);
|
||||
}
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_INC_LONG_OR_DOUBLE_SPEC_CV_RETVAL_USED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
|
||||
var_ptr = EX_VAR(opline->op1.var);
|
||||
if (EXPECTED(Z_TYPE_P(var_ptr) == IS_LONG)) {
|
||||
fast_long_increment_function(var_ptr);
|
||||
} else {
|
||||
Z_DVAL_P(var_ptr)++;
|
||||
}
|
||||
if (UNEXPECTED(1)) {
|
||||
ZVAL_COPY_VALUE(EX_VAR(opline->result.var), var_ptr);
|
||||
}
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_DEC_LONG_NO_OVERFLOW_SPEC_CV_RETVAL_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
|
||||
var_ptr = EX_VAR(opline->op1.var);
|
||||
Z_LVAL_P(var_ptr)--;
|
||||
if (UNEXPECTED(0)) {
|
||||
ZVAL_LONG(EX_VAR(opline->result.var), Z_LVAL_P(var_ptr));
|
||||
}
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_DEC_LONG_NO_OVERFLOW_SPEC_CV_RETVAL_USED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
|
||||
var_ptr = EX_VAR(opline->op1.var);
|
||||
Z_LVAL_P(var_ptr)--;
|
||||
if (UNEXPECTED(1)) {
|
||||
ZVAL_LONG(EX_VAR(opline->result.var), Z_LVAL_P(var_ptr));
|
||||
}
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_DEC_LONG_SPEC_CV_RETVAL_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
|
||||
var_ptr = EX_VAR(opline->op1.var);
|
||||
fast_long_decrement_function(var_ptr);
|
||||
if (UNEXPECTED(0)) {
|
||||
ZVAL_COPY_VALUE(EX_VAR(opline->result.var), var_ptr);
|
||||
}
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_DEC_LONG_SPEC_CV_RETVAL_USED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
|
||||
var_ptr = EX_VAR(opline->op1.var);
|
||||
fast_long_decrement_function(var_ptr);
|
||||
if (UNEXPECTED(1)) {
|
||||
ZVAL_COPY_VALUE(EX_VAR(opline->result.var), var_ptr);
|
||||
}
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_DEC_LONG_OR_DOUBLE_SPEC_CV_RETVAL_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
|
||||
var_ptr = EX_VAR(opline->op1.var);
|
||||
if (EXPECTED(Z_TYPE_P(var_ptr) == IS_LONG)) {
|
||||
fast_long_decrement_function(var_ptr);
|
||||
} else {
|
||||
Z_DVAL_P(var_ptr)--;
|
||||
}
|
||||
if (UNEXPECTED(0)) {
|
||||
ZVAL_COPY_VALUE(EX_VAR(opline->result.var), var_ptr);
|
||||
}
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_DEC_LONG_OR_DOUBLE_SPEC_CV_RETVAL_USED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
|
||||
var_ptr = EX_VAR(opline->op1.var);
|
||||
if (EXPECTED(Z_TYPE_P(var_ptr) == IS_LONG)) {
|
||||
fast_long_decrement_function(var_ptr);
|
||||
} else {
|
||||
Z_DVAL_P(var_ptr)--;
|
||||
}
|
||||
if (UNEXPECTED(1)) {
|
||||
ZVAL_COPY_VALUE(EX_VAR(opline->result.var), var_ptr);
|
||||
}
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POST_INC_LONG_NO_OVERFLOW_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
|
||||
var_ptr = EX_VAR(opline->op1.var);
|
||||
ZVAL_LONG(EX_VAR(opline->result.var), Z_LVAL_P(var_ptr));
|
||||
Z_LVAL_P(var_ptr)++;
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POST_INC_LONG_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
|
||||
var_ptr = EX_VAR(opline->op1.var);
|
||||
ZVAL_LONG(EX_VAR(opline->result.var), Z_LVAL_P(var_ptr));
|
||||
fast_long_increment_function(var_ptr);
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POST_INC_LONG_OR_DOUBLE_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
|
||||
var_ptr = EX_VAR(opline->op1.var);
|
||||
if (EXPECTED(Z_TYPE_P(var_ptr) == IS_LONG)) {
|
||||
ZVAL_LONG(EX_VAR(opline->result.var), Z_LVAL_P(var_ptr));
|
||||
fast_long_increment_function(var_ptr);
|
||||
} else {
|
||||
ZVAL_DOUBLE(EX_VAR(opline->result.var), Z_DVAL_P(var_ptr));
|
||||
Z_DVAL_P(var_ptr)++;
|
||||
}
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POST_DEC_LONG_NO_OVERFLOW_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
|
||||
var_ptr = EX_VAR(opline->op1.var);
|
||||
ZVAL_LONG(EX_VAR(opline->result.var), Z_LVAL_P(var_ptr));
|
||||
Z_LVAL_P(var_ptr)--;
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POST_DEC_LONG_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
|
||||
var_ptr = EX_VAR(opline->op1.var);
|
||||
ZVAL_LONG(EX_VAR(opline->result.var), Z_LVAL_P(var_ptr));
|
||||
fast_long_decrement_function(var_ptr);
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POST_DEC_LONG_OR_DOUBLE_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *var_ptr;
|
||||
|
||||
var_ptr = EX_VAR(opline->op1.var);
|
||||
if (EXPECTED(Z_TYPE_P(var_ptr) == IS_LONG)) {
|
||||
ZVAL_LONG(EX_VAR(opline->result.var), Z_LVAL_P(var_ptr));
|
||||
fast_long_decrement_function(var_ptr);
|
||||
} else {
|
||||
ZVAL_DOUBLE(EX_VAR(opline->result.var), Z_DVAL_P(var_ptr));
|
||||
Z_DVAL_P(var_ptr)--;
|
||||
}
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
|
||||
static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SEND_VAR_SIMPLE_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
{
|
||||
USE_OPLINE
|
||||
@@ -55240,24 +55256,24 @@ ZEND_API void execute_ex(zend_execute_data *ex)
|
||||
(void*)&&ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_LABEL,
|
||||
(void*)&&ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ_LABEL,
|
||||
(void*)&&ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ_LABEL,
|
||||
(void*)&&ZEND_PRE_INC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_RETVAL_UNUSED_LABEL,
|
||||
(void*)&&ZEND_PRE_INC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_RETVAL_USED_LABEL,
|
||||
(void*)&&ZEND_PRE_INC_LONG_SPEC_TMPVARCV_RETVAL_UNUSED_LABEL,
|
||||
(void*)&&ZEND_PRE_INC_LONG_SPEC_TMPVARCV_RETVAL_USED_LABEL,
|
||||
(void*)&&ZEND_PRE_INC_LONG_OR_DOUBLE_SPEC_TMPVARCV_RETVAL_UNUSED_LABEL,
|
||||
(void*)&&ZEND_PRE_INC_LONG_OR_DOUBLE_SPEC_TMPVARCV_RETVAL_USED_LABEL,
|
||||
(void*)&&ZEND_PRE_DEC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_RETVAL_UNUSED_LABEL,
|
||||
(void*)&&ZEND_PRE_DEC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_RETVAL_USED_LABEL,
|
||||
(void*)&&ZEND_PRE_DEC_LONG_SPEC_TMPVARCV_RETVAL_UNUSED_LABEL,
|
||||
(void*)&&ZEND_PRE_DEC_LONG_SPEC_TMPVARCV_RETVAL_USED_LABEL,
|
||||
(void*)&&ZEND_PRE_DEC_LONG_OR_DOUBLE_SPEC_TMPVARCV_RETVAL_UNUSED_LABEL,
|
||||
(void*)&&ZEND_PRE_DEC_LONG_OR_DOUBLE_SPEC_TMPVARCV_RETVAL_USED_LABEL,
|
||||
(void*)&&ZEND_POST_INC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_LABEL,
|
||||
(void*)&&ZEND_POST_INC_LONG_SPEC_TMPVARCV_LABEL,
|
||||
(void*)&&ZEND_POST_INC_LONG_OR_DOUBLE_SPEC_TMPVARCV_LABEL,
|
||||
(void*)&&ZEND_POST_DEC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_LABEL,
|
||||
(void*)&&ZEND_POST_DEC_LONG_SPEC_TMPVARCV_LABEL,
|
||||
(void*)&&ZEND_POST_DEC_LONG_OR_DOUBLE_SPEC_TMPVARCV_LABEL,
|
||||
(void*)&&ZEND_PRE_INC_LONG_NO_OVERFLOW_SPEC_CV_RETVAL_UNUSED_LABEL,
|
||||
(void*)&&ZEND_PRE_INC_LONG_NO_OVERFLOW_SPEC_CV_RETVAL_USED_LABEL,
|
||||
(void*)&&ZEND_PRE_INC_LONG_SPEC_CV_RETVAL_UNUSED_LABEL,
|
||||
(void*)&&ZEND_PRE_INC_LONG_SPEC_CV_RETVAL_USED_LABEL,
|
||||
(void*)&&ZEND_PRE_INC_LONG_OR_DOUBLE_SPEC_CV_RETVAL_UNUSED_LABEL,
|
||||
(void*)&&ZEND_PRE_INC_LONG_OR_DOUBLE_SPEC_CV_RETVAL_USED_LABEL,
|
||||
(void*)&&ZEND_PRE_DEC_LONG_NO_OVERFLOW_SPEC_CV_RETVAL_UNUSED_LABEL,
|
||||
(void*)&&ZEND_PRE_DEC_LONG_NO_OVERFLOW_SPEC_CV_RETVAL_USED_LABEL,
|
||||
(void*)&&ZEND_PRE_DEC_LONG_SPEC_CV_RETVAL_UNUSED_LABEL,
|
||||
(void*)&&ZEND_PRE_DEC_LONG_SPEC_CV_RETVAL_USED_LABEL,
|
||||
(void*)&&ZEND_PRE_DEC_LONG_OR_DOUBLE_SPEC_CV_RETVAL_UNUSED_LABEL,
|
||||
(void*)&&ZEND_PRE_DEC_LONG_OR_DOUBLE_SPEC_CV_RETVAL_USED_LABEL,
|
||||
(void*)&&ZEND_POST_INC_LONG_NO_OVERFLOW_SPEC_CV_LABEL,
|
||||
(void*)&&ZEND_POST_INC_LONG_SPEC_CV_LABEL,
|
||||
(void*)&&ZEND_POST_INC_LONG_OR_DOUBLE_SPEC_CV_LABEL,
|
||||
(void*)&&ZEND_POST_DEC_LONG_NO_OVERFLOW_SPEC_CV_LABEL,
|
||||
(void*)&&ZEND_POST_DEC_LONG_SPEC_CV_LABEL,
|
||||
(void*)&&ZEND_POST_DEC_LONG_OR_DOUBLE_SPEC_CV_LABEL,
|
||||
(void*)&&ZEND_QM_ASSIGN_DOUBLE_SPEC_CONST_LABEL,
|
||||
(void*)&&ZEND_QM_ASSIGN_DOUBLE_SPEC_TMPVARCV_LABEL,
|
||||
(void*)&&ZEND_QM_ASSIGN_DOUBLE_SPEC_TMPVARCV_LABEL,
|
||||
@@ -55375,6 +55391,11 @@ zend_leave_helper_SPEC_LABEL:
|
||||
zend_clean_and_cache_symbol_table(EX(symbol_table));
|
||||
}
|
||||
EG(current_execute_data) = EX(prev_execute_data);
|
||||
|
||||
/* Free extra args before releasing the closure,
|
||||
* as that may free the op_array. */
|
||||
zend_vm_stack_free_extra_args_ex(call_info, execute_data);
|
||||
|
||||
if (UNEXPECTED(call_info & ZEND_CALL_RELEASE_THIS)) {
|
||||
zend_object *object = Z_OBJ(execute_data->This);
|
||||
#if 0
|
||||
@@ -55390,7 +55411,6 @@ zend_leave_helper_SPEC_LABEL:
|
||||
OBJ_RELEASE(ZEND_CLOSURE_OBJECT(EX(func)));
|
||||
}
|
||||
|
||||
zend_vm_stack_free_extra_args_ex(call_info, execute_data);
|
||||
old_execute_data = execute_data;
|
||||
execute_data = EX(prev_execute_data);
|
||||
zend_vm_stack_free_call_frame_ex(call_info, old_execute_data);
|
||||
@@ -56458,78 +56478,6 @@ zend_leave_helper_SPEC_LABEL:
|
||||
VM_TRACE(ZEND_YIELD_SPEC_CONST_CV)
|
||||
ZEND_YIELD_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
HYBRID_BREAK();
|
||||
HYBRID_CASE(ZEND_PRE_INC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_RETVAL_UNUSED):
|
||||
VM_TRACE(ZEND_PRE_INC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_RETVAL_UNUSED)
|
||||
ZEND_PRE_INC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_RETVAL_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
HYBRID_BREAK();
|
||||
HYBRID_CASE(ZEND_PRE_INC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_RETVAL_USED):
|
||||
VM_TRACE(ZEND_PRE_INC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_RETVAL_USED)
|
||||
ZEND_PRE_INC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_RETVAL_USED_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
HYBRID_BREAK();
|
||||
HYBRID_CASE(ZEND_PRE_INC_LONG_SPEC_TMPVARCV_RETVAL_UNUSED):
|
||||
VM_TRACE(ZEND_PRE_INC_LONG_SPEC_TMPVARCV_RETVAL_UNUSED)
|
||||
ZEND_PRE_INC_LONG_SPEC_TMPVARCV_RETVAL_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
HYBRID_BREAK();
|
||||
HYBRID_CASE(ZEND_PRE_INC_LONG_SPEC_TMPVARCV_RETVAL_USED):
|
||||
VM_TRACE(ZEND_PRE_INC_LONG_SPEC_TMPVARCV_RETVAL_USED)
|
||||
ZEND_PRE_INC_LONG_SPEC_TMPVARCV_RETVAL_USED_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
HYBRID_BREAK();
|
||||
HYBRID_CASE(ZEND_PRE_INC_LONG_OR_DOUBLE_SPEC_TMPVARCV_RETVAL_UNUSED):
|
||||
VM_TRACE(ZEND_PRE_INC_LONG_OR_DOUBLE_SPEC_TMPVARCV_RETVAL_UNUSED)
|
||||
ZEND_PRE_INC_LONG_OR_DOUBLE_SPEC_TMPVARCV_RETVAL_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
HYBRID_BREAK();
|
||||
HYBRID_CASE(ZEND_PRE_INC_LONG_OR_DOUBLE_SPEC_TMPVARCV_RETVAL_USED):
|
||||
VM_TRACE(ZEND_PRE_INC_LONG_OR_DOUBLE_SPEC_TMPVARCV_RETVAL_USED)
|
||||
ZEND_PRE_INC_LONG_OR_DOUBLE_SPEC_TMPVARCV_RETVAL_USED_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
HYBRID_BREAK();
|
||||
HYBRID_CASE(ZEND_PRE_DEC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_RETVAL_UNUSED):
|
||||
VM_TRACE(ZEND_PRE_DEC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_RETVAL_UNUSED)
|
||||
ZEND_PRE_DEC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_RETVAL_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
HYBRID_BREAK();
|
||||
HYBRID_CASE(ZEND_PRE_DEC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_RETVAL_USED):
|
||||
VM_TRACE(ZEND_PRE_DEC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_RETVAL_USED)
|
||||
ZEND_PRE_DEC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_RETVAL_USED_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
HYBRID_BREAK();
|
||||
HYBRID_CASE(ZEND_PRE_DEC_LONG_SPEC_TMPVARCV_RETVAL_UNUSED):
|
||||
VM_TRACE(ZEND_PRE_DEC_LONG_SPEC_TMPVARCV_RETVAL_UNUSED)
|
||||
ZEND_PRE_DEC_LONG_SPEC_TMPVARCV_RETVAL_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
HYBRID_BREAK();
|
||||
HYBRID_CASE(ZEND_PRE_DEC_LONG_SPEC_TMPVARCV_RETVAL_USED):
|
||||
VM_TRACE(ZEND_PRE_DEC_LONG_SPEC_TMPVARCV_RETVAL_USED)
|
||||
ZEND_PRE_DEC_LONG_SPEC_TMPVARCV_RETVAL_USED_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
HYBRID_BREAK();
|
||||
HYBRID_CASE(ZEND_PRE_DEC_LONG_OR_DOUBLE_SPEC_TMPVARCV_RETVAL_UNUSED):
|
||||
VM_TRACE(ZEND_PRE_DEC_LONG_OR_DOUBLE_SPEC_TMPVARCV_RETVAL_UNUSED)
|
||||
ZEND_PRE_DEC_LONG_OR_DOUBLE_SPEC_TMPVARCV_RETVAL_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
HYBRID_BREAK();
|
||||
HYBRID_CASE(ZEND_PRE_DEC_LONG_OR_DOUBLE_SPEC_TMPVARCV_RETVAL_USED):
|
||||
VM_TRACE(ZEND_PRE_DEC_LONG_OR_DOUBLE_SPEC_TMPVARCV_RETVAL_USED)
|
||||
ZEND_PRE_DEC_LONG_OR_DOUBLE_SPEC_TMPVARCV_RETVAL_USED_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
HYBRID_BREAK();
|
||||
HYBRID_CASE(ZEND_POST_INC_LONG_NO_OVERFLOW_SPEC_TMPVARCV):
|
||||
VM_TRACE(ZEND_POST_INC_LONG_NO_OVERFLOW_SPEC_TMPVARCV)
|
||||
ZEND_POST_INC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
HYBRID_BREAK();
|
||||
HYBRID_CASE(ZEND_POST_INC_LONG_SPEC_TMPVARCV):
|
||||
VM_TRACE(ZEND_POST_INC_LONG_SPEC_TMPVARCV)
|
||||
ZEND_POST_INC_LONG_SPEC_TMPVARCV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
HYBRID_BREAK();
|
||||
HYBRID_CASE(ZEND_POST_INC_LONG_OR_DOUBLE_SPEC_TMPVARCV):
|
||||
VM_TRACE(ZEND_POST_INC_LONG_OR_DOUBLE_SPEC_TMPVARCV)
|
||||
ZEND_POST_INC_LONG_OR_DOUBLE_SPEC_TMPVARCV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
HYBRID_BREAK();
|
||||
HYBRID_CASE(ZEND_POST_DEC_LONG_NO_OVERFLOW_SPEC_TMPVARCV):
|
||||
VM_TRACE(ZEND_POST_DEC_LONG_NO_OVERFLOW_SPEC_TMPVARCV)
|
||||
ZEND_POST_DEC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
HYBRID_BREAK();
|
||||
HYBRID_CASE(ZEND_POST_DEC_LONG_SPEC_TMPVARCV):
|
||||
VM_TRACE(ZEND_POST_DEC_LONG_SPEC_TMPVARCV)
|
||||
ZEND_POST_DEC_LONG_SPEC_TMPVARCV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
HYBRID_BREAK();
|
||||
HYBRID_CASE(ZEND_POST_DEC_LONG_OR_DOUBLE_SPEC_TMPVARCV):
|
||||
VM_TRACE(ZEND_POST_DEC_LONG_OR_DOUBLE_SPEC_TMPVARCV)
|
||||
ZEND_POST_DEC_LONG_OR_DOUBLE_SPEC_TMPVARCV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
HYBRID_BREAK();
|
||||
HYBRID_CASE(ZEND_QM_ASSIGN_DOUBLE_SPEC_TMPVARCV):
|
||||
VM_TRACE(ZEND_QM_ASSIGN_DOUBLE_SPEC_TMPVARCV)
|
||||
ZEND_QM_ASSIGN_DOUBLE_SPEC_TMPVARCV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
@@ -59416,6 +59364,78 @@ zend_leave_helper_SPEC_LABEL:
|
||||
VM_TRACE(ZEND_TYPE_CHECK_SPEC_CV)
|
||||
ZEND_TYPE_CHECK_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
HYBRID_BREAK();
|
||||
HYBRID_CASE(ZEND_PRE_INC_LONG_NO_OVERFLOW_SPEC_CV_RETVAL_UNUSED):
|
||||
VM_TRACE(ZEND_PRE_INC_LONG_NO_OVERFLOW_SPEC_CV_RETVAL_UNUSED)
|
||||
ZEND_PRE_INC_LONG_NO_OVERFLOW_SPEC_CV_RETVAL_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
HYBRID_BREAK();
|
||||
HYBRID_CASE(ZEND_PRE_INC_LONG_NO_OVERFLOW_SPEC_CV_RETVAL_USED):
|
||||
VM_TRACE(ZEND_PRE_INC_LONG_NO_OVERFLOW_SPEC_CV_RETVAL_USED)
|
||||
ZEND_PRE_INC_LONG_NO_OVERFLOW_SPEC_CV_RETVAL_USED_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
HYBRID_BREAK();
|
||||
HYBRID_CASE(ZEND_PRE_INC_LONG_SPEC_CV_RETVAL_UNUSED):
|
||||
VM_TRACE(ZEND_PRE_INC_LONG_SPEC_CV_RETVAL_UNUSED)
|
||||
ZEND_PRE_INC_LONG_SPEC_CV_RETVAL_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
HYBRID_BREAK();
|
||||
HYBRID_CASE(ZEND_PRE_INC_LONG_SPEC_CV_RETVAL_USED):
|
||||
VM_TRACE(ZEND_PRE_INC_LONG_SPEC_CV_RETVAL_USED)
|
||||
ZEND_PRE_INC_LONG_SPEC_CV_RETVAL_USED_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
HYBRID_BREAK();
|
||||
HYBRID_CASE(ZEND_PRE_INC_LONG_OR_DOUBLE_SPEC_CV_RETVAL_UNUSED):
|
||||
VM_TRACE(ZEND_PRE_INC_LONG_OR_DOUBLE_SPEC_CV_RETVAL_UNUSED)
|
||||
ZEND_PRE_INC_LONG_OR_DOUBLE_SPEC_CV_RETVAL_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
HYBRID_BREAK();
|
||||
HYBRID_CASE(ZEND_PRE_INC_LONG_OR_DOUBLE_SPEC_CV_RETVAL_USED):
|
||||
VM_TRACE(ZEND_PRE_INC_LONG_OR_DOUBLE_SPEC_CV_RETVAL_USED)
|
||||
ZEND_PRE_INC_LONG_OR_DOUBLE_SPEC_CV_RETVAL_USED_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
HYBRID_BREAK();
|
||||
HYBRID_CASE(ZEND_PRE_DEC_LONG_NO_OVERFLOW_SPEC_CV_RETVAL_UNUSED):
|
||||
VM_TRACE(ZEND_PRE_DEC_LONG_NO_OVERFLOW_SPEC_CV_RETVAL_UNUSED)
|
||||
ZEND_PRE_DEC_LONG_NO_OVERFLOW_SPEC_CV_RETVAL_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
HYBRID_BREAK();
|
||||
HYBRID_CASE(ZEND_PRE_DEC_LONG_NO_OVERFLOW_SPEC_CV_RETVAL_USED):
|
||||
VM_TRACE(ZEND_PRE_DEC_LONG_NO_OVERFLOW_SPEC_CV_RETVAL_USED)
|
||||
ZEND_PRE_DEC_LONG_NO_OVERFLOW_SPEC_CV_RETVAL_USED_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
HYBRID_BREAK();
|
||||
HYBRID_CASE(ZEND_PRE_DEC_LONG_SPEC_CV_RETVAL_UNUSED):
|
||||
VM_TRACE(ZEND_PRE_DEC_LONG_SPEC_CV_RETVAL_UNUSED)
|
||||
ZEND_PRE_DEC_LONG_SPEC_CV_RETVAL_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
HYBRID_BREAK();
|
||||
HYBRID_CASE(ZEND_PRE_DEC_LONG_SPEC_CV_RETVAL_USED):
|
||||
VM_TRACE(ZEND_PRE_DEC_LONG_SPEC_CV_RETVAL_USED)
|
||||
ZEND_PRE_DEC_LONG_SPEC_CV_RETVAL_USED_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
HYBRID_BREAK();
|
||||
HYBRID_CASE(ZEND_PRE_DEC_LONG_OR_DOUBLE_SPEC_CV_RETVAL_UNUSED):
|
||||
VM_TRACE(ZEND_PRE_DEC_LONG_OR_DOUBLE_SPEC_CV_RETVAL_UNUSED)
|
||||
ZEND_PRE_DEC_LONG_OR_DOUBLE_SPEC_CV_RETVAL_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
HYBRID_BREAK();
|
||||
HYBRID_CASE(ZEND_PRE_DEC_LONG_OR_DOUBLE_SPEC_CV_RETVAL_USED):
|
||||
VM_TRACE(ZEND_PRE_DEC_LONG_OR_DOUBLE_SPEC_CV_RETVAL_USED)
|
||||
ZEND_PRE_DEC_LONG_OR_DOUBLE_SPEC_CV_RETVAL_USED_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
HYBRID_BREAK();
|
||||
HYBRID_CASE(ZEND_POST_INC_LONG_NO_OVERFLOW_SPEC_CV):
|
||||
VM_TRACE(ZEND_POST_INC_LONG_NO_OVERFLOW_SPEC_CV)
|
||||
ZEND_POST_INC_LONG_NO_OVERFLOW_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
HYBRID_BREAK();
|
||||
HYBRID_CASE(ZEND_POST_INC_LONG_SPEC_CV):
|
||||
VM_TRACE(ZEND_POST_INC_LONG_SPEC_CV)
|
||||
ZEND_POST_INC_LONG_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
HYBRID_BREAK();
|
||||
HYBRID_CASE(ZEND_POST_INC_LONG_OR_DOUBLE_SPEC_CV):
|
||||
VM_TRACE(ZEND_POST_INC_LONG_OR_DOUBLE_SPEC_CV)
|
||||
ZEND_POST_INC_LONG_OR_DOUBLE_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
HYBRID_BREAK();
|
||||
HYBRID_CASE(ZEND_POST_DEC_LONG_NO_OVERFLOW_SPEC_CV):
|
||||
VM_TRACE(ZEND_POST_DEC_LONG_NO_OVERFLOW_SPEC_CV)
|
||||
ZEND_POST_DEC_LONG_NO_OVERFLOW_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
HYBRID_BREAK();
|
||||
HYBRID_CASE(ZEND_POST_DEC_LONG_SPEC_CV):
|
||||
VM_TRACE(ZEND_POST_DEC_LONG_SPEC_CV)
|
||||
ZEND_POST_DEC_LONG_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
HYBRID_BREAK();
|
||||
HYBRID_CASE(ZEND_POST_DEC_LONG_OR_DOUBLE_SPEC_CV):
|
||||
VM_TRACE(ZEND_POST_DEC_LONG_OR_DOUBLE_SPEC_CV)
|
||||
ZEND_POST_DEC_LONG_OR_DOUBLE_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
HYBRID_BREAK();
|
||||
HYBRID_CASE(ZEND_SEND_VAR_SIMPLE_SPEC_CV):
|
||||
VM_TRACE(ZEND_SEND_VAR_SIMPLE_SPEC_CV)
|
||||
ZEND_SEND_VAR_SIMPLE_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
@@ -64739,24 +64759,24 @@ void zend_vm_init(void)
|
||||
ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_HANDLER,
|
||||
ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ_HANDLER,
|
||||
ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ_HANDLER,
|
||||
ZEND_PRE_INC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_RETVAL_UNUSED_HANDLER,
|
||||
ZEND_PRE_INC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_RETVAL_USED_HANDLER,
|
||||
ZEND_PRE_INC_LONG_SPEC_TMPVARCV_RETVAL_UNUSED_HANDLER,
|
||||
ZEND_PRE_INC_LONG_SPEC_TMPVARCV_RETVAL_USED_HANDLER,
|
||||
ZEND_PRE_INC_LONG_OR_DOUBLE_SPEC_TMPVARCV_RETVAL_UNUSED_HANDLER,
|
||||
ZEND_PRE_INC_LONG_OR_DOUBLE_SPEC_TMPVARCV_RETVAL_USED_HANDLER,
|
||||
ZEND_PRE_DEC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_RETVAL_UNUSED_HANDLER,
|
||||
ZEND_PRE_DEC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_RETVAL_USED_HANDLER,
|
||||
ZEND_PRE_DEC_LONG_SPEC_TMPVARCV_RETVAL_UNUSED_HANDLER,
|
||||
ZEND_PRE_DEC_LONG_SPEC_TMPVARCV_RETVAL_USED_HANDLER,
|
||||
ZEND_PRE_DEC_LONG_OR_DOUBLE_SPEC_TMPVARCV_RETVAL_UNUSED_HANDLER,
|
||||
ZEND_PRE_DEC_LONG_OR_DOUBLE_SPEC_TMPVARCV_RETVAL_USED_HANDLER,
|
||||
ZEND_POST_INC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_HANDLER,
|
||||
ZEND_POST_INC_LONG_SPEC_TMPVARCV_HANDLER,
|
||||
ZEND_POST_INC_LONG_OR_DOUBLE_SPEC_TMPVARCV_HANDLER,
|
||||
ZEND_POST_DEC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_HANDLER,
|
||||
ZEND_POST_DEC_LONG_SPEC_TMPVARCV_HANDLER,
|
||||
ZEND_POST_DEC_LONG_OR_DOUBLE_SPEC_TMPVARCV_HANDLER,
|
||||
ZEND_PRE_INC_LONG_NO_OVERFLOW_SPEC_CV_RETVAL_UNUSED_HANDLER,
|
||||
ZEND_PRE_INC_LONG_NO_OVERFLOW_SPEC_CV_RETVAL_USED_HANDLER,
|
||||
ZEND_PRE_INC_LONG_SPEC_CV_RETVAL_UNUSED_HANDLER,
|
||||
ZEND_PRE_INC_LONG_SPEC_CV_RETVAL_USED_HANDLER,
|
||||
ZEND_PRE_INC_LONG_OR_DOUBLE_SPEC_CV_RETVAL_UNUSED_HANDLER,
|
||||
ZEND_PRE_INC_LONG_OR_DOUBLE_SPEC_CV_RETVAL_USED_HANDLER,
|
||||
ZEND_PRE_DEC_LONG_NO_OVERFLOW_SPEC_CV_RETVAL_UNUSED_HANDLER,
|
||||
ZEND_PRE_DEC_LONG_NO_OVERFLOW_SPEC_CV_RETVAL_USED_HANDLER,
|
||||
ZEND_PRE_DEC_LONG_SPEC_CV_RETVAL_UNUSED_HANDLER,
|
||||
ZEND_PRE_DEC_LONG_SPEC_CV_RETVAL_USED_HANDLER,
|
||||
ZEND_PRE_DEC_LONG_OR_DOUBLE_SPEC_CV_RETVAL_UNUSED_HANDLER,
|
||||
ZEND_PRE_DEC_LONG_OR_DOUBLE_SPEC_CV_RETVAL_USED_HANDLER,
|
||||
ZEND_POST_INC_LONG_NO_OVERFLOW_SPEC_CV_HANDLER,
|
||||
ZEND_POST_INC_LONG_SPEC_CV_HANDLER,
|
||||
ZEND_POST_INC_LONG_OR_DOUBLE_SPEC_CV_HANDLER,
|
||||
ZEND_POST_DEC_LONG_NO_OVERFLOW_SPEC_CV_HANDLER,
|
||||
ZEND_POST_DEC_LONG_SPEC_CV_HANDLER,
|
||||
ZEND_POST_DEC_LONG_OR_DOUBLE_SPEC_CV_HANDLER,
|
||||
ZEND_QM_ASSIGN_DOUBLE_SPEC_CONST_HANDLER,
|
||||
ZEND_QM_ASSIGN_DOUBLE_SPEC_TMPVARCV_HANDLER,
|
||||
ZEND_QM_ASSIGN_DOUBLE_SPEC_TMPVARCV_HANDLER,
|
||||
|
||||
@@ -321,7 +321,7 @@ $op1_get_zval_ptr_ptr_undef = array(
|
||||
"UNUSED" => "NULL",
|
||||
"CV" => "EX_VAR(opline->op1.var)",
|
||||
"TMPVAR" => "???",
|
||||
"TMPVARCV" => "EX_VAR(opline->op1.var)",
|
||||
"TMPVARCV" => "???",
|
||||
);
|
||||
|
||||
$op2_get_zval_ptr_ptr_undef = array(
|
||||
@@ -332,7 +332,7 @@ $op2_get_zval_ptr_ptr_undef = array(
|
||||
"UNUSED" => "NULL",
|
||||
"CV" => "EX_VAR(opline->op2.var)",
|
||||
"TMPVAR" => "???",
|
||||
"TMPVARCV" => "EX_VAR(opline->op2.var)",
|
||||
"TMPVARCV" => "???",
|
||||
);
|
||||
|
||||
$op1_get_obj_zval_ptr = array(
|
||||
@@ -431,7 +431,7 @@ $op1_get_obj_zval_ptr_ptr_undef = array(
|
||||
"UNUSED" => "&EX(This)",
|
||||
"CV" => "EX_VAR(opline->op1.var)",
|
||||
"TMPVAR" => "???",
|
||||
"TMPVARCV" => "EX_VAR(opline->op1.var)",
|
||||
"TMPVARCV" => "???",
|
||||
);
|
||||
|
||||
$op2_get_obj_zval_ptr_ptr_undef = array(
|
||||
@@ -442,7 +442,7 @@ $op2_get_obj_zval_ptr_ptr_undef = array(
|
||||
"UNUSED" => "&EX(This)",
|
||||
"CV" => "EX_VAR(opline->op2.var)",
|
||||
"TMPVAR" => "???",
|
||||
"TMPVARCV" => "EX_VAR(opline->op2.var)",
|
||||
"TMPVARCV" => "???",
|
||||
);
|
||||
|
||||
$op1_free_op = array(
|
||||
|
||||
+18
-18
@@ -2007,24 +2007,24 @@
|
||||
_(3850, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \
|
||||
_(3851, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \
|
||||
_(3852, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \
|
||||
_(3853, ZEND_PRE_INC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_RETVAL_UNUSED) \
|
||||
_(3854, ZEND_PRE_INC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_RETVAL_USED) \
|
||||
_(3855, ZEND_PRE_INC_LONG_SPEC_TMPVARCV_RETVAL_UNUSED) \
|
||||
_(3856, ZEND_PRE_INC_LONG_SPEC_TMPVARCV_RETVAL_USED) \
|
||||
_(3857, ZEND_PRE_INC_LONG_OR_DOUBLE_SPEC_TMPVARCV_RETVAL_UNUSED) \
|
||||
_(3858, ZEND_PRE_INC_LONG_OR_DOUBLE_SPEC_TMPVARCV_RETVAL_USED) \
|
||||
_(3859, ZEND_PRE_DEC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_RETVAL_UNUSED) \
|
||||
_(3860, ZEND_PRE_DEC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_RETVAL_USED) \
|
||||
_(3861, ZEND_PRE_DEC_LONG_SPEC_TMPVARCV_RETVAL_UNUSED) \
|
||||
_(3862, ZEND_PRE_DEC_LONG_SPEC_TMPVARCV_RETVAL_USED) \
|
||||
_(3863, ZEND_PRE_DEC_LONG_OR_DOUBLE_SPEC_TMPVARCV_RETVAL_UNUSED) \
|
||||
_(3864, ZEND_PRE_DEC_LONG_OR_DOUBLE_SPEC_TMPVARCV_RETVAL_USED) \
|
||||
_(3865, ZEND_POST_INC_LONG_NO_OVERFLOW_SPEC_TMPVARCV) \
|
||||
_(3866, ZEND_POST_INC_LONG_SPEC_TMPVARCV) \
|
||||
_(3867, ZEND_POST_INC_LONG_OR_DOUBLE_SPEC_TMPVARCV) \
|
||||
_(3868, ZEND_POST_DEC_LONG_NO_OVERFLOW_SPEC_TMPVARCV) \
|
||||
_(3869, ZEND_POST_DEC_LONG_SPEC_TMPVARCV) \
|
||||
_(3870, ZEND_POST_DEC_LONG_OR_DOUBLE_SPEC_TMPVARCV) \
|
||||
_(3853, ZEND_PRE_INC_LONG_NO_OVERFLOW_SPEC_CV_RETVAL_UNUSED) \
|
||||
_(3854, ZEND_PRE_INC_LONG_NO_OVERFLOW_SPEC_CV_RETVAL_USED) \
|
||||
_(3855, ZEND_PRE_INC_LONG_SPEC_CV_RETVAL_UNUSED) \
|
||||
_(3856, ZEND_PRE_INC_LONG_SPEC_CV_RETVAL_USED) \
|
||||
_(3857, ZEND_PRE_INC_LONG_OR_DOUBLE_SPEC_CV_RETVAL_UNUSED) \
|
||||
_(3858, ZEND_PRE_INC_LONG_OR_DOUBLE_SPEC_CV_RETVAL_USED) \
|
||||
_(3859, ZEND_PRE_DEC_LONG_NO_OVERFLOW_SPEC_CV_RETVAL_UNUSED) \
|
||||
_(3860, ZEND_PRE_DEC_LONG_NO_OVERFLOW_SPEC_CV_RETVAL_USED) \
|
||||
_(3861, ZEND_PRE_DEC_LONG_SPEC_CV_RETVAL_UNUSED) \
|
||||
_(3862, ZEND_PRE_DEC_LONG_SPEC_CV_RETVAL_USED) \
|
||||
_(3863, ZEND_PRE_DEC_LONG_OR_DOUBLE_SPEC_CV_RETVAL_UNUSED) \
|
||||
_(3864, ZEND_PRE_DEC_LONG_OR_DOUBLE_SPEC_CV_RETVAL_USED) \
|
||||
_(3865, ZEND_POST_INC_LONG_NO_OVERFLOW_SPEC_CV) \
|
||||
_(3866, ZEND_POST_INC_LONG_SPEC_CV) \
|
||||
_(3867, ZEND_POST_INC_LONG_OR_DOUBLE_SPEC_CV) \
|
||||
_(3868, ZEND_POST_DEC_LONG_NO_OVERFLOW_SPEC_CV) \
|
||||
_(3869, ZEND_POST_DEC_LONG_SPEC_CV) \
|
||||
_(3870, ZEND_POST_DEC_LONG_OR_DOUBLE_SPEC_CV) \
|
||||
_(3871, ZEND_QM_ASSIGN_DOUBLE_SPEC_CONST) \
|
||||
_(3872, ZEND_QM_ASSIGN_DOUBLE_SPEC_TMPVARCV) \
|
||||
_(3873, ZEND_QM_ASSIGN_DOUBLE_SPEC_TMPVARCV) \
|
||||
|
||||
+5
-2
@@ -395,6 +395,8 @@ AC_DEFUN([PHP_EVAL_LIBLINE],[
|
||||
$2="[$]$2 -pthread"
|
||||
else
|
||||
PHP_RUN_ONCE(EXTRA_LDFLAGS, [$ac_i], [EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"])
|
||||
PHP_RUN_ONCE(EXTRA_LDFLAGS_PROGRAM, [$ac_i],
|
||||
[EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $ac_i"])
|
||||
fi
|
||||
;;
|
||||
-l*[)]
|
||||
@@ -2179,7 +2181,7 @@ AC_DEFUN([PHP_SETUP_ICU],[
|
||||
|
||||
dnl If pkg-config is found try using it
|
||||
if test "$PHP_ICU_DIR" = "DEFAULT" && test -x "$PKG_CONFIG" && $PKG_CONFIG --exists icu-uc icu-io icu-i18n; then
|
||||
if $PKG_CONFIG --atleast-version=40 icu-uc; then
|
||||
if $PKG_CONFIG --atleast-version=4.0 icu-uc; then
|
||||
found_icu=yes
|
||||
icu_version_full=`$PKG_CONFIG --modversion icu-uc`
|
||||
ac_IFS=$IFS
|
||||
@@ -2191,7 +2193,8 @@ AC_DEFUN([PHP_SETUP_ICU],[
|
||||
|
||||
ICU_LIBS=`$PKG_CONFIG --libs icu-uc icu-io icu-i18n`
|
||||
ICU_INCS=`$PKG_CONFIG --cflags-only-I icu-uc icu-io icu-i18n`
|
||||
ICU_CXXFLAGS="-DU_USING_ICU_NAMESPACE=1"
|
||||
ICU_CXXFLAGS=`$PKG_CONFIG --variable=CXXFLAGS icu-uc`
|
||||
ICU_CXXFLAGS="$ICU_CXXFLAGS -DU_USING_ICU_NAMESPACE=1"
|
||||
|
||||
AC_MSG_RESULT([found $ICU_VERSION])
|
||||
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
@echo off
|
||||
|
||||
set SDK_REMOTE=https://github.com/OSTC/php-sdk-binary-tools.git
|
||||
set SDK_REMOTE=https://github.com/Microsoft/php-sdk-binary-tools.git
|
||||
set SDK_BRANCH=%PHP_BUILD_SDK_BRANCH%
|
||||
set SDK_RUNNER=%PHP_BUILD_CACHE_SDK_DIR%\phpsdk-%PHP_BUILD_CRT%-%PLATFORM%.bat
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ if /i "%APPVEYOR_REPO_BRANCH:~0,4%" equ "php-" (
|
||||
set BRANCH=master
|
||||
)
|
||||
set STABILITY=staging
|
||||
set DEPS_DIR=%PHP_BUILD_CACHE_BASE_DIR%\deps-%BRANCH%-%PHP_SDK_VC%-%PHP_SDK_ARCH%
|
||||
set DEPS_DIR=%PHP_BUILD_CACHE_BASE_DIR%\deps-%BRANCH%-%PHP_SDK_VS%-%PHP_SDK_ARCH%
|
||||
rem SDK is cached, deps info is cached as well
|
||||
echo Updating dependencies in %DEPS_DIR%
|
||||
cmd /c phpsdk_deps --update --no-backup --branch %BRANCH% --stability %STABILITY% --deps %DEPS_DIR% --crt %PHP_BUILD_CRT%
|
||||
|
||||
@@ -11,7 +11,7 @@ if /i "%APPVEYOR_REPO_BRANCH:~0,4%" equ "php-" (
|
||||
set BRANCH=master
|
||||
set STABILITY=staging
|
||||
)
|
||||
set DEPS_DIR=%PHP_BUILD_CACHE_BASE_DIR%\deps-%BRANCH%-%PHP_SDK_VC%-%PHP_SDK_ARCH%
|
||||
set DEPS_DIR=%PHP_BUILD_CACHE_BASE_DIR%\deps-%BRANCH%-%PHP_SDK_VS%-%PHP_SDK_ARCH%
|
||||
if not exist "%DEPS_DIR%" (
|
||||
echo "%DEPS_DIR%" doesn't exist
|
||||
exit /b 3
|
||||
@@ -27,7 +27,7 @@ set PDO_MYSQL_TEST_USER=%MYSQL_TEST_USER%
|
||||
set PDO_MYSQL_TEST_PASS=%MYSQL_PWD%
|
||||
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%
|
||||
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
|
||||
|
||||
@@ -58,7 +58,7 @@ rem set OPENSSL_CONF=
|
||||
rem set SSLEAY_CONF=
|
||||
|
||||
rem prepare for Opcache
|
||||
if "%OPCACHE%" equ "1" set OPCACHE_OPTS=-d opcache.enabled=1 -d opcache.enable_cli=1
|
||||
if "%OPCACHE%" equ "1" set OPCACHE_OPTS=-d opcache.enable=1 -d opcache.enable_cli=1
|
||||
|
||||
rem prepare for enchant
|
||||
mkdir c:\enchant_plugins
|
||||
|
||||
+2
-2
@@ -107,8 +107,8 @@ int zend_sprintf(char *buffer, const char *format, ...);
|
||||
|
||||
PHP_MAJOR_VERSION=7
|
||||
PHP_MINOR_VERSION=3
|
||||
PHP_RELEASE_VERSION=5
|
||||
PHP_EXTRA_VERSION="-dev"
|
||||
PHP_RELEASE_VERSION=12
|
||||
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`
|
||||
|
||||
|
||||
@@ -123,6 +123,11 @@ static void com_write_dimension(zval *object, zval *offset, zval *value)
|
||||
|
||||
obj = CDNO_FETCH(object);
|
||||
|
||||
if (offset == NULL) {
|
||||
php_com_throw_exception(DISP_E_BADINDEX, "appending to variants is not supported");
|
||||
return;
|
||||
}
|
||||
|
||||
if (V_VT(&obj->v) == VT_DISPATCH) {
|
||||
ZVAL_COPY_VALUE(&args[0], offset);
|
||||
ZVAL_COPY_VALUE(&args[1], value);
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
--TEST--
|
||||
Bug #78694 (Appending to a variant array causes segfault)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('com_dotnet')) die('skip com_dotnet extension not available');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
foreach ([new com('WScript.Shell'), new variant([])] as $var) {
|
||||
try {
|
||||
$var[] = 42;
|
||||
} catch (com_exception $ex) {
|
||||
var_dump($ex->getMessage());
|
||||
}
|
||||
}
|
||||
?>
|
||||
--EXPECT--
|
||||
string(38) "appending to variants is not supported"
|
||||
string(38) "appending to variants is not supported"
|
||||
@@ -150,8 +150,6 @@ static void _php_curl_close_ex(php_curl *ch);
|
||||
static void _php_curl_close(zend_resource *rsrc);
|
||||
|
||||
|
||||
#define SAVE_CURL_ERROR(__handle, __err) (__handle)->err.no = (int) __err;
|
||||
|
||||
#define CAAL(s, v) add_assoc_long_ex(return_value, s, sizeof(s) - 1, (zend_long) v);
|
||||
#define CAAD(s, v) add_assoc_double_ex(return_value, s, sizeof(s) - 1, (double) v);
|
||||
#define CAAS(s, v) add_assoc_string_ex(return_value, s, sizeof(s) - 1, (char *) (v ? v : ""));
|
||||
@@ -1130,6 +1128,7 @@ PHP_MINIT_FUNCTION(curl)
|
||||
#endif
|
||||
|
||||
#if LIBCURL_VERSION_NUM >= 0x071306 /* Available since 7.19.6 */
|
||||
REGISTER_CURL_CONSTANT(CURL_VERSION_CURLDEBUG);
|
||||
REGISTER_CURL_CONSTANT(CURLOPT_SSH_KNOWNHOSTS);
|
||||
#endif
|
||||
|
||||
@@ -1334,6 +1333,7 @@ PHP_MINIT_FUNCTION(curl)
|
||||
|
||||
#if LIBCURL_VERSION_NUM >= 0x072f00 /* Available since 7.47.0 */
|
||||
REGISTER_CURL_CONSTANT(CURL_HTTP_VERSION_2TLS);
|
||||
REGISTER_CURL_CONSTANT(CURL_VERSION_PSL);
|
||||
#endif
|
||||
|
||||
#if LIBCURL_VERSION_NUM >= 0x073000 /* Available since 7.48.0 */
|
||||
@@ -1452,6 +1452,10 @@ PHP_MINIT_FUNCTION(curl)
|
||||
REGISTER_CURL_CONSTANT(CURLOPT_TLS13_CIPHERS);
|
||||
#endif
|
||||
|
||||
#if LIBCURL_VERSION_NUM >= 0x074001 /* Available since 7.64.1 */
|
||||
REGISTER_CURL_CONSTANT(CURL_VERSION_ALTSVC);
|
||||
#endif
|
||||
|
||||
REGISTER_CURL_CONSTANT(CURLOPT_SAFE_UPLOAD);
|
||||
|
||||
#ifdef PHP_CURL_NEED_OPENSSL_TSL
|
||||
|
||||
+6
-1
@@ -228,7 +228,7 @@ PHP_FUNCTION(curl_multi_select)
|
||||
}
|
||||
|
||||
#if LIBCURL_VERSION_NUM >= 0x071c00 /* Available since 7.28.0 */
|
||||
error = curl_multi_wait(mh->multi, NULL, 0, (unsigned long) timeout * 1000.0, &numfds);
|
||||
error = curl_multi_wait(mh->multi, NULL, 0, (unsigned long) (timeout * 1000.0), &numfds);
|
||||
if (CURLM_OK != error) {
|
||||
SAVE_CURLM_ERROR(mh, error);
|
||||
RETURN_LONG(-1);
|
||||
@@ -334,6 +334,7 @@ PHP_FUNCTION(curl_multi_info_read)
|
||||
CURLMsg *tmp_msg;
|
||||
int queued_msgs;
|
||||
zval *zmsgs_in_queue = NULL;
|
||||
php_curl *ch;
|
||||
|
||||
ZEND_PARSE_PARAMETERS_START(1, 2)
|
||||
Z_PARAM_RESOURCE(z_mh)
|
||||
@@ -371,6 +372,10 @@ PHP_FUNCTION(curl_multi_info_read)
|
||||
being done in add_assoc_resource */
|
||||
Z_ADDREF_P(pz_ch);
|
||||
|
||||
/* we must save result to be able to read error message */
|
||||
ch = (php_curl*)zend_fetch_resource(Z_RES_P(pz_ch), le_curl_name, le_curl);
|
||||
SAVE_CURL_ERROR(ch, tmp_msg->data.result);
|
||||
|
||||
/* add_assoc_resource automatically creates a new zval to
|
||||
wrap the "resource" represented by the current pz_ch */
|
||||
|
||||
|
||||
@@ -58,6 +58,8 @@ extern zend_module_entry curl_module_entry;
|
||||
#define PHP_CURL_RETURN 4
|
||||
#define PHP_CURL_IGNORE 7
|
||||
|
||||
#define SAVE_CURL_ERROR(__handle, __err) (__handle)->err.no = (int) __err;
|
||||
|
||||
extern int le_curl;
|
||||
#define le_curl_name "cURL handle"
|
||||
extern int le_curl_multi_handle;
|
||||
|
||||
@@ -17,6 +17,8 @@ const IGNORED_CONSTANTS = [
|
||||
'CURLOPT_PROGRESSDATA'
|
||||
];
|
||||
|
||||
const CONSTANTS_REGEX_PATTERN = '~^CURL(?:OPT|_VERSION)_[A-Z0-9_]+$~';
|
||||
|
||||
$curlConstants = getCurlConstants();
|
||||
$sourceConstants = getSourceConstants();
|
||||
|
||||
@@ -157,13 +159,8 @@ function getCurlConstants() : array
|
||||
$deprecated = $match[3] ?? null;
|
||||
$removed = $match[4] ?? null;
|
||||
|
||||
if (strpos($name, 'CURLOPT_') !== 0) {
|
||||
// not a CURLOPT_* constant
|
||||
continue;
|
||||
}
|
||||
|
||||
if (in_array($name, IGNORED_CONSTANTS)) {
|
||||
// purposefully ignored constant
|
||||
if (in_array($name, IGNORED_CONSTANTS, true) || !preg_match(CONSTANTS_REGEX_PATTERN, $name)) {
|
||||
// not a wanted constant
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -197,8 +194,8 @@ function getSourceConstants() : array
|
||||
continue;
|
||||
}
|
||||
|
||||
if (strpos($name, 'CURLOPT_') !== 0) {
|
||||
// not a CURLOPT_* constant
|
||||
if (!preg_match(CONSTANTS_REGEX_PATTERN, $name)) {
|
||||
// not a wanted constant
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
--TEST--
|
||||
Request #72189 (Add missing CURL_VERSION_* constants)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
|
||||
include 'skipif.inc';
|
||||
|
||||
$version = curl_version();
|
||||
|
||||
if ($version['version_number'] < 0x071306) {
|
||||
exit('skip: test works only with curl >= 7.19.6');
|
||||
}
|
||||
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$version = curl_version();
|
||||
|
||||
$bitfields = [
|
||||
CURL_VERSION_ASYNCHDNS,
|
||||
CURL_VERSION_CONV,
|
||||
CURL_VERSION_CURLDEBUG,
|
||||
CURL_VERSION_DEBUG,
|
||||
CURL_VERSION_GSSNEGOTIATE,
|
||||
CURL_VERSION_IDN,
|
||||
CURL_VERSION_IPV6,
|
||||
CURL_VERSION_KERBEROS4,
|
||||
CURL_VERSION_LARGEFILE,
|
||||
CURL_VERSION_LIBZ,
|
||||
CURL_VERSION_NTLM,
|
||||
CURL_VERSION_SPNEGO,
|
||||
CURL_VERSION_SSL,
|
||||
CURL_VERSION_SSPI,
|
||||
];
|
||||
|
||||
$matchesCount = 0;
|
||||
|
||||
foreach ($bitfields as $feature) {
|
||||
if ($version['features'] & $feature) {
|
||||
++$matchesCount;
|
||||
}
|
||||
}
|
||||
|
||||
var_dump($matchesCount > 0);
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
bool(true)
|
||||
@@ -0,0 +1,43 @@
|
||||
--TEST--
|
||||
Bug #77946 (Errored cURL resources returned by curl_multi_info_read() must be compatible with curl_errno() and curl_error())
|
||||
--SKIPIF--
|
||||
<?php
|
||||
|
||||
if (!extension_loaded('curl')) {
|
||||
exit('skip curl extension not loaded');
|
||||
}
|
||||
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
$urls = array(
|
||||
'unknown://scheme.tld',
|
||||
);
|
||||
|
||||
$mh = curl_multi_init();
|
||||
|
||||
foreach ($urls as $i => $url) {
|
||||
$conn[$i] = curl_init($url);
|
||||
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($info['result']);
|
||||
var_dump(curl_errno($info['handle']));
|
||||
var_dump(curl_error($info['handle']));
|
||||
}
|
||||
} while ($status === CURLM_CALL_MULTI_PERFORM || $active);
|
||||
|
||||
foreach ($urls as $i => $url) {
|
||||
curl_close($conn[$i]);
|
||||
}
|
||||
|
||||
curl_multi_close($mh);
|
||||
?>
|
||||
--EXPECTF--
|
||||
int(1)
|
||||
int(1)
|
||||
string(%d) "Protocol %Sunknown%S not supported or disabled in libcurl"
|
||||
@@ -0,0 +1,34 @@
|
||||
--TEST--
|
||||
Bug #78775: TLS issues from HTTP request affecting other encrypted connections
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('curl')) die('skip Requires curl');
|
||||
if (getenv('SKIP_ONLINE_TESTS')) die('skip Online test');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$sock = fsockopen("tls://google.com", 443);
|
||||
|
||||
var_dump($sock);
|
||||
|
||||
$handle = curl_init('https://self-signed.badssl.com/');
|
||||
curl_setopt_array(
|
||||
$handle,
|
||||
[
|
||||
CURLOPT_RETURNTRANSFER => true,
|
||||
CURLOPT_SSL_VERIFYPEER => true,
|
||||
]
|
||||
);
|
||||
|
||||
var_dump(curl_exec($handle));
|
||||
curl_close($handle);
|
||||
|
||||
fwrite($sock, "GET / HTTP/1.0\n\n");
|
||||
var_dump(fread($sock, 8));
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
resource(%d) of type (stream)
|
||||
bool(false)
|
||||
string(8) "HTTP/1.0"
|
||||
@@ -43,7 +43,7 @@ TLS-SRP => No
|
||||
HTTP2 => Yes
|
||||
GSSAPI => No
|
||||
KERBEROS5 => Yes
|
||||
UNIX_SOCKETS => No
|
||||
UNIX_SOCKETS => %r(Yes|No)%r
|
||||
PSL => No
|
||||
HTTPS_PROXY => Yes
|
||||
MULTI_SSL => %s
|
||||
|
||||
@@ -26,5 +26,5 @@ curl_close($ch);
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
string(%d) "%r(Couldn't resolve proxy|Could not resolve proxy:|Could not resolve host:|Could not resolve:)%r %s"
|
||||
string(%d) "%r(Couldn't resolve proxy|Could not resolve proxy:|Could not resolve host:|Could not resolve:|Unsupported proxy syntax in)%r %s"
|
||||
int(5)
|
||||
@@ -1,7 +1,7 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2015-2017 Derick Rethans
|
||||
Copyright (c) 2017 MongoDB, Inc.
|
||||
Copyright (c) 2015-2019 Derick Rethans
|
||||
Copyright (c) 2017-2019 MongoDB, Inc.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2015 Derick Rethans
|
||||
* Copyright (c) 2015-2019 Derick Rethans
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2015 Derick Rethans
|
||||
* Copyright (c) 2015-2019 Derick Rethans
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
@@ -72,4 +72,3 @@
|
||||
/* below the horizon. */
|
||||
#define astronomical_twilight(ts,lon,lat,start,end) \
|
||||
timelib_astro_rise_set_altitude( ts, lon, lat, -18.0, 0, start, end )
|
||||
|
||||
+26
-39
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2015 Derick Rethans
|
||||
* Copyright (c) 2015-2019 Derick Rethans
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
@@ -144,7 +144,7 @@ void timelib_isodate_from_date(timelib_sll y, timelib_sll m, timelib_sll d, time
|
||||
*id = timelib_day_of_week_ex(y, m, d, 1);
|
||||
}
|
||||
|
||||
static timelib_sll timelib_daynr_from_weeknr_ex(timelib_sll iy, timelib_sll iw, timelib_sll id, timelib_sll *y)
|
||||
timelib_sll timelib_daynr_from_weeknr(timelib_sll iy, timelib_sll iw, timelib_sll id)
|
||||
{
|
||||
timelib_sll dow, day;
|
||||
|
||||
@@ -152,54 +152,41 @@ static timelib_sll timelib_daynr_from_weeknr_ex(timelib_sll iy, timelib_sll iw,
|
||||
dow = timelib_day_of_week(iy, 1, 1);
|
||||
/* then use that to figure out the offset for day 1 of week 1 */
|
||||
day = 0 - (dow > 4 ? dow - 7 : dow);
|
||||
/* and adjust the year to the natural year if we need to */
|
||||
*y = (iw == 1 && day < 0 && id < dow) ? iy - 1 : iy;
|
||||
|
||||
/* Add weeks and days */
|
||||
return day + ((iw - 1) * 7) + id;
|
||||
}
|
||||
|
||||
timelib_sll timelib_daynr_from_weeknr(timelib_sll iy, timelib_sll iw, timelib_sll id)
|
||||
{
|
||||
timelib_sll dummy_iso_year;
|
||||
|
||||
return timelib_daynr_from_weeknr_ex(iy, iw, id, &dummy_iso_year);
|
||||
}
|
||||
|
||||
void timelib_date_from_isodate(timelib_sll iy, timelib_sll iw, timelib_sll id, timelib_sll *y, timelib_sll *m, timelib_sll *d)
|
||||
{
|
||||
timelib_sll daynr = timelib_daynr_from_weeknr_ex(iy, iw, id, y) + 1;
|
||||
timelib_sll daynr = timelib_daynr_from_weeknr(iy, iw, id) + 1;
|
||||
int *table;
|
||||
bool is_leap_year;
|
||||
|
||||
*m = 0;
|
||||
// Invariant: is_leap_year == timelib_is_leap(*y)
|
||||
*y = iy;
|
||||
is_leap_year = timelib_is_leap(*y);
|
||||
|
||||
if (daynr <= 0) {
|
||||
*y += 1;
|
||||
}
|
||||
|
||||
if (timelib_is_leap(*y)) {
|
||||
table = ml_table_leap;
|
||||
if (daynr > 366) {
|
||||
*y += 1;
|
||||
daynr -= 366;
|
||||
}
|
||||
} else {
|
||||
table = ml_table_common;
|
||||
if (daynr > 365) {
|
||||
*y += 1;
|
||||
daynr -= 365;
|
||||
}
|
||||
}
|
||||
|
||||
do {
|
||||
daynr -= table[*m];
|
||||
(*m)++;
|
||||
} while (daynr > table[*m]);
|
||||
|
||||
if (daynr <= 0) {
|
||||
daynr += 31;
|
||||
// Establish invariant that daynr >= 0
|
||||
while (daynr <= 0) {
|
||||
*y -= 1;
|
||||
*m = 12;
|
||||
daynr += (is_leap_year = timelib_is_leap(*y)) ? 366 : 365;
|
||||
}
|
||||
|
||||
// Establish invariant that daynr <= number of days in *yr
|
||||
while (daynr > (is_leap_year ? 366 : 365)) {
|
||||
daynr -= is_leap_year ? 366 : 365;
|
||||
*y += 1;
|
||||
is_leap_year = timelib_is_leap(*y);
|
||||
}
|
||||
|
||||
table = is_leap_year ? ml_table_leap : ml_table_common;
|
||||
|
||||
// Establish invariant that daynr <= number of days in *m
|
||||
*m = 1;
|
||||
while (daynr > table[*m]) {
|
||||
daynr -= table[*m];
|
||||
*m += 1;
|
||||
}
|
||||
|
||||
*d = daynr;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2015 Derick Rethans
|
||||
* Copyright (c) 2015-2019 Derick Rethans
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
/*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2015 Derick Rethans
|
||||
* Copyright (c) 2015-2019 Derick Rethans
|
||||
* Copyright (c) 2018 MongoDB, Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2015 Derick Rethans
|
||||
* Copyright (c) 2015-2019 Derick Rethans
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
/*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2015 Derick Rethans
|
||||
* Copyright (c) 2015-2019 Derick Rethans
|
||||
* Copyright (c) 2018 MongoDB, Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
@@ -393,7 +394,7 @@ void timelib_dump_tzinfo(timelib_tzinfo *tz)
|
||||
tz->type[0].isgmtcnt
|
||||
);
|
||||
for (i = 0; i < tz->bit64.timecnt; i++) {
|
||||
printf ("%016lX (%20ld) = %3d [%5ld %1d %3d '%s' (%d,%d)]\n",
|
||||
printf ("%016" PRIX64 " (%20" PRId64 ") = %3d [%5ld %1d %3d '%s' (%d,%d)]\n",
|
||||
tz->trans[i], tz->trans[i], tz->trans_idx[i],
|
||||
(long int) tz->type[tz->trans_idx[i]].offset,
|
||||
tz->type[tz->trans_idx[i]].isdst,
|
||||
@@ -404,7 +405,7 @@ void timelib_dump_tzinfo(timelib_tzinfo *tz)
|
||||
);
|
||||
}
|
||||
for (i = 0; i < tz->bit64.leapcnt; i++) {
|
||||
printf ("%016lX (%20ld) = %d\n",
|
||||
printf ("%016" PRIX64 " (%20ld) = %d\n",
|
||||
tz->leap_times[i].trans,
|
||||
(long) tz->leap_times[i].trans,
|
||||
tz->leap_times[i].offset);
|
||||
@@ -502,11 +503,6 @@ timelib_tzinfo *timelib_parse_tzfile(char *timezone, const timelib_tzdb *tzdb, i
|
||||
tmp = timelib_tzinfo_ctor(timezone);
|
||||
|
||||
version = read_preamble(&tzf, tmp, &type);
|
||||
if (version == -1) {
|
||||
*error_code = TIMELIB_ERROR_UNSUPPORTED_VERSION;
|
||||
timelib_tzinfo_dtor(tmp);
|
||||
return NULL;
|
||||
}
|
||||
if (version < 2 || version > 3) {
|
||||
*error_code = TIMELIB_ERROR_UNSUPPORTED_VERSION;
|
||||
timelib_tzinfo_dtor(tmp);
|
||||
@@ -521,6 +517,7 @@ timelib_tzinfo *timelib_parse_tzfile(char *timezone, const timelib_tzdb *tzdb, i
|
||||
if (!skip_64bit_preamble(&tzf, tmp)) {
|
||||
/* 64 bit preamble is not in place */
|
||||
*error_code = TIMELIB_ERROR_CORRUPT_NO_64BIT_PREAMBLE;
|
||||
timelib_tzinfo_dtor(tmp);
|
||||
return NULL;
|
||||
}
|
||||
read_64bit_header(&tzf, tmp);
|
||||
@@ -607,8 +604,8 @@ static ttinfo* fetch_timezone_offset(timelib_tzinfo *tz, timelib_sll ts, timelib
|
||||
/* If there is no transition time, we pick the first one, if that doesn't
|
||||
* exist we return NULL */
|
||||
if (!tz->bit64.timecnt || !tz->trans) {
|
||||
*transition_time = 0;
|
||||
if (tz->bit64.typecnt == 1) {
|
||||
*transition_time = INT64_MIN;
|
||||
return &(tz->type[0]);
|
||||
}
|
||||
return NULL;
|
||||
@@ -619,6 +616,7 @@ static ttinfo* fetch_timezone_offset(timelib_tzinfo *tz, timelib_sll ts, timelib
|
||||
* one in case there are only DST entries. Not sure which smartass came up
|
||||
* with this idea in the first though :) */
|
||||
if (ts < tz->trans[0]) {
|
||||
*transition_time = INT64_MIN;
|
||||
return &(tz->type[0]);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2015-2017 Derick Rethans
|
||||
* Copyright (c) 2015-2019 Derick Rethans
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
/*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2015 Derick Rethans
|
||||
* Copyright (c) 2015-2019 Derick Rethans
|
||||
* Copyright (c) 2018 MongoDB, Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
@@ -321,9 +322,9 @@ typedef struct _timelib_tzdb {
|
||||
# define timelib_free free
|
||||
#endif
|
||||
|
||||
#define TIMELIB_VERSION 201801
|
||||
#define TIMELIB_EXTENDED_VERSION 20180105
|
||||
#define TIMELIB_ASCII_VERSION "2018.01RC3"
|
||||
#define TIMELIB_VERSION 201803
|
||||
#define TIMELIB_EXTENDED_VERSION 20180301
|
||||
#define TIMELIB_ASCII_VERSION "2018.03"
|
||||
|
||||
#define TIMELIB_NONE 0x00
|
||||
#define TIMELIB_OVERRIDE_TIME 0x01
|
||||
@@ -649,7 +650,7 @@ void timelib_set_timezone_from_abbr(timelib_time *t, timelib_abbr_info abbr_info
|
||||
* It fetches the right UTC offset that is currently stored in the time
|
||||
* stamp field in 't' ('sse'), and assigns that to the 'z' field and 'dst'
|
||||
* field (whether DST is in effect at the time). It also sets the current
|
||||
* abbrevation to the 'tz_addr' field, making sure that if a value was already
|
||||
* abbreviation to the 'tz_addr' field, making sure that if a value was already
|
||||
* set it was freed.
|
||||
*
|
||||
* The time zone information in 'tz' is *not* duplicated into the 't' field so
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2015 Derick Rethans
|
||||
* Copyright (c) 2015-2019 Derick Rethans
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
@@ -39,13 +39,7 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STRING_H
|
||||
# include <string.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STRINGS_H
|
||||
# include <strings.h>
|
||||
#endif
|
||||
#include <string.h>
|
||||
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
@@ -68,10 +62,7 @@
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#if HAVE_LIMITS_H
|
||||
#include <limits.h>
|
||||
#endif
|
||||
|
||||
#define TIMELIB_SECOND 1
|
||||
#define TIMELIB_MINUTE 2
|
||||
|
||||
+8087
-8558
File diff suppressed because it is too large.
Load diff
+19
-32
@@ -4,13 +4,7 @@
|
||||
{ "acdt", 1, 37800, "Australia/North" },
|
||||
{ "acdt", 1, 37800, "Australia/South" },
|
||||
{ "acdt", 1, 37800, "Australia/Yancowinna" },
|
||||
{ "acst", 0, 32400, "Australia/Adelaide" },
|
||||
{ "acst", 0, 34200, "Australia/Adelaide" },
|
||||
{ "acst", 0, 32400, "Australia/Broken_Hill" },
|
||||
{ "acst", 0, 32400, "Australia/Darwin" },
|
||||
{ "acst", 0, 32400, "Australia/North" },
|
||||
{ "acst", 0, 32400, "Australia/South" },
|
||||
{ "acst", 0, 32400, "Australia/Yancowinna" },
|
||||
{ "acst", 0, 34200, "Australia/Broken_Hill" },
|
||||
{ "acst", 0, 34200, "Australia/Darwin" },
|
||||
{ "acst", 0, 34200, "Australia/North" },
|
||||
@@ -144,20 +138,16 @@
|
||||
{ "bmt", 0, -14309, "America/Barbados" },
|
||||
{ "bmt", 0, 6264, "Europe/Tiraspol" },
|
||||
{ "bmt", 0, -17776, "America/Bogota" },
|
||||
{ "bmt", 0, 1050, "Europe/Brussels" },
|
||||
{ "bmt", 0, 10656, "Asia/Baghdad" },
|
||||
{ "bmt", 0, 1786, "Europe/Busingen" },
|
||||
{ "bmt", 0, 1786, "Europe/Vaduz" },
|
||||
{ "bmt", 0, 1786, "Europe/Zurich" },
|
||||
{ "bmt", 0, 24124, "Asia/Bangkok" },
|
||||
{ "bmt", 0, 24124, "Asia/Phnom_Penh" },
|
||||
{ "bmt", 0, 24124, "Asia/Vientiane" },
|
||||
{ "bmt", 0, 25632, "Asia/Jakarta" },
|
||||
{ "bmt", 0, 6264, "Europe/Bucharest" },
|
||||
{ "bmt", 0, 6264, "Europe/Chisinau" },
|
||||
{ "bost", 1, -12756, "America/La_Paz" },
|
||||
{ "bst", 1, 3600, "Europe/London" },
|
||||
{ "bst", 0, 3600, "Europe/London" },
|
||||
{ "bst", 1, -12756, "America/La_Paz" },
|
||||
{ "bst", 0, -39600, "America/Adak" },
|
||||
{ "bst", 0, -39600, "America/Atka" },
|
||||
{ "bst", 0, -39600, "America/Nome" },
|
||||
@@ -299,7 +289,6 @@
|
||||
{ "cet", 0, 3600, "Europe/Berlin" },
|
||||
{ "cet", 0, 7200, "Europe/Kaliningrad" },
|
||||
{ "cet", 0, 3600, "Africa/Algiers" },
|
||||
{ "cet", 0, 3600, "Africa/Casablanca" },
|
||||
{ "cet", 0, 3600, "Africa/Ceuta" },
|
||||
{ "cet", 0, 3600, "Africa/Tripoli" },
|
||||
{ "cet", 0, 3600, "Africa/Tunis" },
|
||||
@@ -372,7 +361,6 @@
|
||||
{ "cmt", 0, -16356, "America/La_Paz" },
|
||||
{ "cmt", 0, -19176, "America/Cayman" },
|
||||
{ "cmt", 0, -19176, "America/Panama" },
|
||||
{ "cmt", 0, 3020, "Europe/Copenhagen" },
|
||||
{ "cmt", 0, 6900, "Europe/Chisinau" },
|
||||
{ "cmt", 0, 6900, "Europe/Tiraspol" },
|
||||
{ "cpt", 1, -18000, "America/Chicago" },
|
||||
@@ -645,6 +633,8 @@
|
||||
{ "ewt", 1, -14400, "Canada/Eastern" },
|
||||
{ "ffmt", 0, -14660, "America/Martinique" },
|
||||
{ "fmt", 0, -4056, "Atlantic/Madeira" },
|
||||
{ "gdt", 1, 39600, "Pacific/Guam" },
|
||||
{ "gdt", 1, 39600, "Pacific/Saipan" },
|
||||
{ "gmt", 0, 0, "Africa/Abidjan" },
|
||||
{ "gmt", 0, 0, "Africa/Accra" },
|
||||
{ "gmt", 0, 0, "Africa/Bamako" },
|
||||
@@ -672,6 +662,9 @@
|
||||
{ "gmt", 0, 0, "Europe/Jersey" },
|
||||
{ "gmt", 0, 0, "Europe/London" },
|
||||
{ "gmt", 0, 0, "GB" },
|
||||
{ "gmt", 1, 0, "Europe/Bratislava" },
|
||||
{ "gmt", 1, 0, "Europe/Dublin" },
|
||||
{ "gmt", 1, 0, "Europe/Prague" },
|
||||
{ "gst", 0, 36000, "Pacific/Guam" },
|
||||
{ "gst", 0, 36000, "Pacific/Saipan" },
|
||||
{ "hdt", 1, -34200, "Pacific/Honolulu" },
|
||||
@@ -680,20 +673,23 @@
|
||||
{ "hdt", 1, -34200, "Pacific/Johnston" },
|
||||
{ "hkst", 1, 32400, "Asia/Hong_Kong" },
|
||||
{ "hkt", 0, 28800, "Asia/Hong_Kong" },
|
||||
{ "hkt", 0, 30600, "Asia/Hong_Kong" },
|
||||
{ "hmt", 0, -19776, "America/Havana" },
|
||||
{ "hmt", 0, -6872, "Atlantic/Azores" },
|
||||
{ "hmt", 0, 21200, "Asia/Calcutta" },
|
||||
{ "hmt", 0, 21200, "Asia/Dacca" },
|
||||
{ "hmt", 0, 21200, "Asia/Dhaka" },
|
||||
{ "hmt", 0, 21200, "Asia/Kolkata" },
|
||||
{ "hmt", 0, 5989, "Europe/Helsinki" },
|
||||
{ "hmt", 0, 5989, "Europe/Mariehamn" },
|
||||
{ "hpt", 1, -34200, "Pacific/Honolulu" },
|
||||
{ "hpt", 1, -34200, "Pacific/Johnston" },
|
||||
{ "hst", 0, -36000, "Pacific/Honolulu" },
|
||||
{ "hst", 0, -37800, "Pacific/Honolulu" },
|
||||
{ "hst", 0, -36000, "America/Adak" },
|
||||
{ "hst", 0, -36000, "America/Atka" },
|
||||
{ "hst", 0, -36000, "Pacific/Johnston" },
|
||||
{ "hst", 0, -37800, "Pacific/Johnston" },
|
||||
{ "hwt", 1, -34200, "Pacific/Honolulu" },
|
||||
{ "hwt", 1, -34200, "Pacific/Johnston" },
|
||||
{ "iddt", 1, 14400, "Asia/Jerusalem" },
|
||||
{ "iddt", 1, 14400, "Asia/Tel_Aviv" },
|
||||
{ "idt", 1, 10800, "Asia/Jerusalem" },
|
||||
@@ -703,7 +699,6 @@
|
||||
{ "imt", 0, 25025, "Asia/Irkutsk" },
|
||||
{ "imt", 0, 7016, "Asia/Istanbul" },
|
||||
{ "imt", 0, 7016, "Europe/Istanbul" },
|
||||
{ "imt", 0, 7016, "Europe/Sofia" },
|
||||
{ "ist", 0, 7200, "Asia/Jerusalem" },
|
||||
{ "ist", 0, 19800, "Asia/Calcutta" },
|
||||
{ "ist", 0, 19800, "Asia/Kolkata" },
|
||||
@@ -718,6 +713,7 @@
|
||||
{ "jmt", 0, 8440, "Asia/Tel_Aviv" },
|
||||
{ "jst", 0, 32400, "Asia/Tokyo" },
|
||||
{ "jst", 0, 32400, "Asia/Hong_Kong" },
|
||||
{ "jst", 0, 32400, "Asia/Manila" },
|
||||
{ "jst", 0, 32400, "Asia/Pyongyang" },
|
||||
{ "jst", 0, 32400, "Asia/Seoul" },
|
||||
{ "jst", 0, 32400, "Asia/Taipei" },
|
||||
@@ -728,8 +724,8 @@
|
||||
{ "kdt", 1, 34200, "ROK" },
|
||||
{ "kdt", 1, 36000, "ROK" },
|
||||
{ "kmt", 0, 5736, "Europe/Vilnius" },
|
||||
{ "kmt", 0, -18431, "America/Grand_Turk" },
|
||||
{ "kmt", 0, -18431, "America/Jamaica" },
|
||||
{ "kmt", 0, -18430, "America/Grand_Turk" },
|
||||
{ "kmt", 0, -18430, "America/Jamaica" },
|
||||
{ "kmt", 0, 7324, "Europe/Kiev" },
|
||||
{ "kst", 0, 30600, "Asia/Seoul" },
|
||||
{ "kst", 0, 32400, "Asia/Pyongyang" },
|
||||
@@ -766,7 +762,7 @@
|
||||
{ "met", 0, 3600, "MET" },
|
||||
{ "mmt", 0, 9017, "Europe/Moscow" },
|
||||
{ "mmt", 0, 9079, "Europe/Moscow" },
|
||||
{ "mmt", 0, -13484, "America/Montevideo" },
|
||||
{ "mmt", 0, -13491, "America/Montevideo" },
|
||||
{ "mmt", 0, -20712, "America/Managua" },
|
||||
{ "mmt", 0, -2588, "Africa/Monrovia" },
|
||||
{ "mmt", 0, -2670, "Africa/Monrovia" },
|
||||
@@ -928,18 +924,15 @@
|
||||
{ "pdt", 1, -25200, "Canada/Pacific" },
|
||||
{ "pdt", 1, -25200, "Canada/Yukon" },
|
||||
{ "pdt", 1, -25200, "Mexico/BajaNorte" },
|
||||
{ "pdt", 1, 32400, "Asia/Manila" },
|
||||
{ "pkst", 1, 21600, "Asia/Karachi" },
|
||||
{ "pkt", 0, 18000, "Asia/Karachi" },
|
||||
{ "plmt", 0, 25590, "Asia/Ho_Chi_Minh" },
|
||||
{ "plmt", 0, 25590, "Asia/Saigon" },
|
||||
{ "pmmt", 0, 35312, "Pacific/Bougainville" },
|
||||
{ "pmmt", 0, 35312, "Pacific/Port_Moresby" },
|
||||
{ "pmt", 0, -13236, "America/Paramaribo" },
|
||||
{ "pmt", 0, -13252, "America/Paramaribo" },
|
||||
{ "pmt", 0, 13505, "Asia/Yekaterinburg" },
|
||||
{ "pmt", 0, 26240, "Asia/Pontianak" },
|
||||
{ "pmt", 0, 3464, "Europe/Bratislava" },
|
||||
{ "pmt", 0, 3464, "Europe/Prague" },
|
||||
{ "pmt", 0, 561, "Africa/Algiers" },
|
||||
{ "pmt", 0, 561, "Africa/Tunis" },
|
||||
{ "pmt", 0, 561, "Europe/Monaco" },
|
||||
@@ -979,6 +972,7 @@
|
||||
{ "pst", 0, -28800, "Canada/Yukon" },
|
||||
{ "pst", 0, -28800, "Mexico/BajaNorte" },
|
||||
{ "pst", 0, -28800, "Mexico/BajaSur" },
|
||||
{ "pst", 0, 28800, "Asia/Manila" },
|
||||
{ "pwt", 1, -25200, "America/Los_Angeles" },
|
||||
{ "pwt", 1, -25200, "America/Dawson_Creek" },
|
||||
{ "pwt", 1, -25200, "America/Ensenada" },
|
||||
@@ -995,9 +989,6 @@
|
||||
{ "rmt", 0, 5794, "Europe/Riga" },
|
||||
{ "rmt", 0, 23087, "Asia/Rangoon" },
|
||||
{ "rmt", 0, 23087, "Asia/Yangon" },
|
||||
{ "rmt", 0, 2996, "Europe/Rome" },
|
||||
{ "rmt", 0, 2996, "Europe/San_Marino" },
|
||||
{ "rmt", 0, 2996, "Europe/Vatican" },
|
||||
{ "sast", 0, 7200, "Africa/Johannesburg" },
|
||||
{ "sast", 1, 10800, "Africa/Johannesburg" },
|
||||
{ "sast", 0, 5400, "Africa/Johannesburg" },
|
||||
@@ -1010,7 +1001,6 @@
|
||||
{ "sast", 0, 7200, "Africa/Mbabane" },
|
||||
{ "sast", 0, 7200, "Africa/Windhoek" },
|
||||
{ "sdmt", 0, -16800, "America/Santo_Domingo" },
|
||||
{ "set", 0, 3614, "Europe/Stockholm" },
|
||||
{ "sjmt", 0, -20173, "America/Costa_Rica" },
|
||||
{ "smt", 0, -13884, "Atlantic/Stanley" },
|
||||
{ "smt", 0, -16966, "America/Punta_Arenas" },
|
||||
@@ -1044,7 +1034,8 @@
|
||||
{ "wat", 0, 3600, "Africa/Ndjamena" },
|
||||
{ "wat", 0, 3600, "Africa/Niamey" },
|
||||
{ "wat", 0, 3600, "Africa/Porto-Novo" },
|
||||
{ "wat", 0, 3600, "Africa/Windhoek" },
|
||||
{ "wat", 0, 3600, "Africa/Sao_Tome" },
|
||||
{ "wat", 1, 3600, "Africa/Windhoek" },
|
||||
{ "wemt", 1, 7200, "Europe/Lisbon" },
|
||||
{ "wemt", 1, 7200, "Europe/Madrid" },
|
||||
{ "wemt", 1, 7200, "Europe/Monaco" },
|
||||
@@ -1052,9 +1043,7 @@
|
||||
{ "west", 1, 3600, "Europe/Paris" },
|
||||
{ "west", 1, 7200, "Europe/Luxembourg" },
|
||||
{ "west", 1, 3600, "Africa/Algiers" },
|
||||
{ "west", 1, 3600, "Africa/Casablanca" },
|
||||
{ "west", 1, 3600, "Africa/Ceuta" },
|
||||
{ "west", 1, 3600, "Africa/El_Aaiun" },
|
||||
{ "west", 1, 3600, "Atlantic/Canary" },
|
||||
{ "west", 1, 3600, "Atlantic/Faeroe" },
|
||||
{ "west", 1, 3600, "Atlantic/Faroe" },
|
||||
@@ -1067,9 +1056,7 @@
|
||||
{ "wet", 0, 0, "Europe/Paris" },
|
||||
{ "wet", 0, 3600, "Europe/Luxembourg" },
|
||||
{ "wet", 0, 0, "Africa/Algiers" },
|
||||
{ "wet", 0, 0, "Africa/Casablanca" },
|
||||
{ "wet", 0, 0, "Africa/Ceuta" },
|
||||
{ "wet", 0, 0, "Africa/El_Aaiun" },
|
||||
{ "wet", 0, 0, "Atlantic/Azores" },
|
||||
{ "wet", 0, 0, "Atlantic/Canary" },
|
||||
{ "wet", 0, 0, "Atlantic/Faeroe" },
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2015 Derick Rethans
|
||||
* Copyright (c) 2015-2019 Derick Rethans
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
@@ -33,18 +33,6 @@ static int month_tab[12] = { 0, 31, 59, 90, 120, 151, 181, 212, 24
|
||||
static int days_in_month_leap[13] = { 31, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
|
||||
static int days_in_month[13] = { 31, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
|
||||
|
||||
static void do_range_limit_fraction(timelib_sll *fraction, timelib_sll *seconds)
|
||||
{
|
||||
if (*fraction < 0) {
|
||||
*fraction += 1000000;
|
||||
*seconds -= 1;
|
||||
}
|
||||
if (*fraction >= 1000000) {
|
||||
*fraction -= 1000000;
|
||||
*seconds += 1;
|
||||
}
|
||||
}
|
||||
|
||||
static void do_range_limit(timelib_sll start, timelib_sll end, timelib_sll adj, timelib_sll *a, timelib_sll *b)
|
||||
{
|
||||
if (*a < start) {
|
||||
@@ -194,7 +182,7 @@ static void do_adjust_for_weekday(timelib_time* time)
|
||||
|
||||
void timelib_do_rel_normalize(timelib_time *base, timelib_rel_time *rt)
|
||||
{
|
||||
do_range_limit_fraction(&rt->us, &rt->s);
|
||||
do_range_limit(0, 1000000, 1000000, &rt->us, &rt->s);
|
||||
do_range_limit(0, 60, 60, &rt->s, &rt->i);
|
||||
do_range_limit(0, 60, 60, &rt->i, &rt->h);
|
||||
do_range_limit(0, 24, 24, &rt->h, &rt->d);
|
||||
@@ -234,7 +222,7 @@ static void magic_date_calc(timelib_time *time)
|
||||
|
||||
void timelib_do_normalize(timelib_time* time)
|
||||
{
|
||||
if (time->us != TIMELIB_UNSET) do_range_limit_fraction(&time->us, &time->s);
|
||||
if (time->us != TIMELIB_UNSET) do_range_limit(0, 1000000, 1000000, &time->us, &time->s);
|
||||
if (time->s != TIMELIB_UNSET) do_range_limit(0, 60, 60, &time->s, &time->i);
|
||||
if (time->s != TIMELIB_UNSET) do_range_limit(0, 60, 60, &time->i, &time->h);
|
||||
if (time->s != TIMELIB_UNSET) do_range_limit(0, 24, 24, &time->h, &time->d);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2015 Derick Rethans
|
||||
* Copyright (c) 2015-2019 Derick Rethans
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
+85
-20
@@ -60,6 +60,22 @@ static inline long long php_date_llabs( long long i ) { return i >= 0 ? i : -i;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
PHPAPI time_t php_time()
|
||||
{
|
||||
#ifdef HAVE_GETTIMEOFDAY
|
||||
struct timeval tm;
|
||||
|
||||
if (UNEXPECTED(gettimeofday(&tm, NULL) != SUCCESS)) {
|
||||
/* fallback, can't reasonably happen */
|
||||
return time(NULL);
|
||||
}
|
||||
|
||||
return tm.tv_sec;
|
||||
#else
|
||||
return time(NULL);
|
||||
#endif
|
||||
}
|
||||
|
||||
/* {{{ arginfo */
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_date, 0, 0, 1)
|
||||
ZEND_ARG_INFO(0, format)
|
||||
@@ -1283,7 +1299,7 @@ static void php_date(INTERNAL_FUNCTION_PARAMETERS, int localtime)
|
||||
ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
|
||||
|
||||
if (ZEND_NUM_ARGS() == 1) {
|
||||
ts = time(NULL);
|
||||
ts = php_time();
|
||||
}
|
||||
|
||||
RETURN_STR(php_format_date(ZSTR_VAL(format), ZSTR_LEN(format), ts, localtime));
|
||||
@@ -1448,7 +1464,7 @@ PHP_FUNCTION(idate)
|
||||
}
|
||||
|
||||
if (ZEND_NUM_ARGS() == 1) {
|
||||
ts = time(NULL);
|
||||
ts = php_time();
|
||||
}
|
||||
|
||||
ret = php_idate(ZSTR_VAL(format)[0], ts, 0);
|
||||
@@ -1520,7 +1536,7 @@ PHP_FUNCTION(strtotime)
|
||||
now->tz_info = tzi;
|
||||
now->zone_type = TIMELIB_ZONETYPE_ID;
|
||||
timelib_unixtime2local(now,
|
||||
(ZEND_NUM_ARGS() == 2) ? (timelib_sll) preset_ts : (timelib_sll) time(NULL));
|
||||
(ZEND_NUM_ARGS() == 2) ? (timelib_sll) preset_ts : (timelib_sll) php_time());
|
||||
|
||||
t = timelib_strtotime(ZSTR_VAL(times), ZSTR_LEN(times), &error,
|
||||
DATE_TIMEZONEDB, php_date_parse_tzfile_wrapper);
|
||||
@@ -1563,12 +1579,12 @@ PHPAPI void php_mktime(INTERNAL_FUNCTION_PARAMETERS, int gmt)
|
||||
/* Initialize structure with current time */
|
||||
now = timelib_time_ctor();
|
||||
if (gmt) {
|
||||
timelib_unixtime2gmt(now, (timelib_sll) time(NULL));
|
||||
timelib_unixtime2gmt(now, (timelib_sll) php_time());
|
||||
} else {
|
||||
tzi = get_timezone_info();
|
||||
now->tz_info = tzi;
|
||||
now->zone_type = TIMELIB_ZONETYPE_ID;
|
||||
timelib_unixtime2local(now, (timelib_sll) time(NULL));
|
||||
timelib_unixtime2local(now, (timelib_sll) php_time());
|
||||
}
|
||||
/* Fill in the new data */
|
||||
switch (ZEND_NUM_ARGS()) {
|
||||
@@ -1669,7 +1685,7 @@ PHPAPI void php_strftime(INTERNAL_FUNCTION_PARAMETERS, int gmt)
|
||||
timelib_time_offset *offset = NULL;
|
||||
zend_string *buf;
|
||||
|
||||
timestamp = (zend_long) time(NULL);
|
||||
timestamp = (zend_long) php_time();
|
||||
|
||||
ZEND_PARSE_PARAMETERS_START(1, 2)
|
||||
Z_PARAM_STR(format)
|
||||
@@ -1777,7 +1793,7 @@ PHP_FUNCTION(time)
|
||||
return;
|
||||
}
|
||||
|
||||
RETURN_LONG((zend_long)time(NULL));
|
||||
RETURN_LONG((zend_long)php_time(NULL));
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
@@ -1785,7 +1801,7 @@ PHP_FUNCTION(time)
|
||||
Returns the results of the C system call localtime as an associative array if the associative_array argument is set to 1 other wise it is a regular array */
|
||||
PHP_FUNCTION(localtime)
|
||||
{
|
||||
zend_long timestamp = (zend_long)time(NULL);
|
||||
zend_long timestamp = (zend_long)php_time();
|
||||
zend_bool associative = 0;
|
||||
timelib_tzinfo *tzi;
|
||||
timelib_time *ts;
|
||||
@@ -1834,7 +1850,7 @@ PHP_FUNCTION(localtime)
|
||||
Get date/time information */
|
||||
PHP_FUNCTION(getdate)
|
||||
{
|
||||
zend_long timestamp = (zend_long)time(NULL);
|
||||
zend_long timestamp = (zend_long)php_time();
|
||||
timelib_tzinfo *tzi;
|
||||
timelib_time *ts;
|
||||
|
||||
@@ -2907,7 +2923,7 @@ static int php_date_initialize_from_hash(php_date_obj **dateobj, HashTable *myht
|
||||
zval tmp_obj;
|
||||
timelib_tzinfo *tzi;
|
||||
|
||||
z_date = zend_hash_str_find(myht, "date", sizeof("data")-1);
|
||||
z_date = zend_hash_str_find(myht, "date", sizeof("date")-1);
|
||||
if (z_date && Z_TYPE_P(z_date) == IS_STRING) {
|
||||
zval *z_timezone_type = zend_hash_str_find(myht, "timezone_type", sizeof("timezone_type")-1);
|
||||
if (z_timezone_type && Z_TYPE_P(z_timezone_type) == IS_LONG) {
|
||||
@@ -4343,6 +4359,20 @@ static int php_date_interval_initialize_from_hash(zval **return_value, php_inter
|
||||
} \
|
||||
} while (0);
|
||||
|
||||
#define PHP_DATE_INTERVAL_READ_PROPERTY_DAYS(member) \
|
||||
do { \
|
||||
zval *z_arg = zend_hash_str_find(myht, "days", sizeof("days") - 1); \
|
||||
if (z_arg && Z_TYPE_P(z_arg) == IS_FALSE) { \
|
||||
(*intobj)->diff->member = -99999; \
|
||||
} else if (z_arg && Z_TYPE_P(z_arg) <= IS_STRING) { \
|
||||
zend_string *str = zval_get_string(z_arg); \
|
||||
DATE_A64I((*intobj)->diff->member, ZSTR_VAL(str)); \
|
||||
zend_string_release(str); \
|
||||
} else { \
|
||||
(*intobj)->diff->member = -1LL; \
|
||||
} \
|
||||
} while (0);
|
||||
|
||||
#define PHP_DATE_INTERVAL_READ_PROPERTY_DOUBLE(element, member, def) \
|
||||
do { \
|
||||
zval *z_arg = zend_hash_str_find(myht, element, sizeof(element) - 1); \
|
||||
@@ -4371,7 +4401,7 @@ static int php_date_interval_initialize_from_hash(zval **return_value, php_inter
|
||||
PHP_DATE_INTERVAL_READ_PROPERTY("weekday_behavior", weekday_behavior, int, -1)
|
||||
PHP_DATE_INTERVAL_READ_PROPERTY("first_last_day_of", first_last_day_of, int, -1)
|
||||
PHP_DATE_INTERVAL_READ_PROPERTY("invert", invert, int, 0);
|
||||
PHP_DATE_INTERVAL_READ_PROPERTY_I64("days", days);
|
||||
PHP_DATE_INTERVAL_READ_PROPERTY_DAYS(days);
|
||||
PHP_DATE_INTERVAL_READ_PROPERTY("special_type", special.type, unsigned int, 0);
|
||||
PHP_DATE_INTERVAL_READ_PROPERTY_I64("special_amount", special.amount);
|
||||
PHP_DATE_INTERVAL_READ_PROPERTY("have_weekday_relative", have_weekday_relative, unsigned int, 0);
|
||||
@@ -4639,6 +4669,10 @@ PHP_METHOD(DatePeriod, __construct)
|
||||
dpobj->end = clone;
|
||||
}
|
||||
}
|
||||
|
||||
if (dpobj->end == NULL && recurrences < 1) {
|
||||
php_error_docref(NULL, E_WARNING, "The recurrence count '%d' is invalid. Needs to be > 0", (int) recurrences);
|
||||
}
|
||||
|
||||
/* options */
|
||||
dpobj->include_start_date = !(options & PHP_DATE_PERIOD_EXCLUDE_START_DATE);
|
||||
@@ -5134,7 +5168,7 @@ static HashTable *date_object_get_properties_period(zval *object) /* {{{ */
|
||||
|
||||
if (period_obj->start) {
|
||||
php_date_obj *date_obj;
|
||||
object_init_ex(&zv, date_ce_date);
|
||||
object_init_ex(&zv, period_obj->start_ce);
|
||||
date_obj = Z_PHPDATE_P(&zv);
|
||||
date_obj->time = timelib_time_clone(period_obj->start);
|
||||
} else {
|
||||
@@ -5144,7 +5178,7 @@ static HashTable *date_object_get_properties_period(zval *object) /* {{{ */
|
||||
|
||||
if (period_obj->current) {
|
||||
php_date_obj *date_obj;
|
||||
object_init_ex(&zv, date_ce_date);
|
||||
object_init_ex(&zv, period_obj->start_ce);
|
||||
date_obj = Z_PHPDATE_P(&zv);
|
||||
date_obj->time = timelib_time_clone(period_obj->current);
|
||||
} else {
|
||||
@@ -5154,7 +5188,7 @@ static HashTable *date_object_get_properties_period(zval *object) /* {{{ */
|
||||
|
||||
if (period_obj->end) {
|
||||
php_date_obj *date_obj;
|
||||
object_init_ex(&zv, date_ce_date);
|
||||
object_init_ex(&zv, period_obj->start_ce);
|
||||
date_obj = Z_PHPDATE_P(&zv);
|
||||
date_obj->time = timelib_time_clone(period_obj->end);
|
||||
} else {
|
||||
@@ -5191,7 +5225,7 @@ static int php_date_period_initialize_from_hash(php_period_obj *period_obj, Hash
|
||||
|
||||
ht_entry = zend_hash_str_find(myht, "start", sizeof("start")-1);
|
||||
if (ht_entry) {
|
||||
if (Z_TYPE_P(ht_entry) == IS_OBJECT && Z_OBJCE_P(ht_entry) == date_ce_date) {
|
||||
if (Z_TYPE_P(ht_entry) == IS_OBJECT && instanceof_function(Z_OBJCE_P(ht_entry), date_ce_interface)) {
|
||||
php_date_obj *date_obj;
|
||||
date_obj = Z_PHPDATE_P(ht_entry);
|
||||
period_obj->start = timelib_time_clone(date_obj->time);
|
||||
@@ -5205,7 +5239,7 @@ static int php_date_period_initialize_from_hash(php_period_obj *period_obj, Hash
|
||||
|
||||
ht_entry = zend_hash_str_find(myht, "end", sizeof("end")-1);
|
||||
if (ht_entry) {
|
||||
if (Z_TYPE_P(ht_entry) == IS_OBJECT && Z_OBJCE_P(ht_entry) == date_ce_date) {
|
||||
if (Z_TYPE_P(ht_entry) == IS_OBJECT && instanceof_function(Z_OBJCE_P(ht_entry), date_ce_interface)) {
|
||||
php_date_obj *date_obj;
|
||||
date_obj = Z_PHPDATE_P(ht_entry);
|
||||
period_obj->end = timelib_time_clone(date_obj->time);
|
||||
@@ -5218,7 +5252,7 @@ static int php_date_period_initialize_from_hash(php_period_obj *period_obj, Hash
|
||||
|
||||
ht_entry = zend_hash_str_find(myht, "current", sizeof("current")-1);
|
||||
if (ht_entry) {
|
||||
if (Z_TYPE_P(ht_entry) == IS_OBJECT && Z_OBJCE_P(ht_entry) == date_ce_date) {
|
||||
if (Z_TYPE_P(ht_entry) == IS_OBJECT && instanceof_function(Z_OBJCE_P(ht_entry), date_ce_interface)) {
|
||||
php_date_obj *date_obj;
|
||||
date_obj = Z_PHPDATE_P(ht_entry);
|
||||
period_obj->current = timelib_time_clone(date_obj->time);
|
||||
@@ -5303,12 +5337,35 @@ PHP_METHOD(DatePeriod, __wakeup)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ date_period_is_magic_property
|
||||
* Common for date_period_read_property() and date_period_write_property() functions
|
||||
*/
|
||||
static int date_period_is_magic_property(zend_string *name)
|
||||
{
|
||||
if (zend_string_equals_literal(name, "recurrences")
|
||||
|| zend_string_equals_literal(name, "include_start_date")
|
||||
|| zend_string_equals_literal(name, "start")
|
||||
|| zend_string_equals_literal(name, "current")
|
||||
|| zend_string_equals_literal(name, "end")
|
||||
|| zend_string_equals_literal(name, "interval")
|
||||
) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ date_period_read_property */
|
||||
static zval *date_period_read_property(zval *object, zval *member, int type, void **cache_slot, zval *rv)
|
||||
{
|
||||
if (type != BP_VAR_IS && type != BP_VAR_R) {
|
||||
zend_throw_error(NULL, "Retrieval of DatePeriod properties for modification is unsupported");
|
||||
return &EG(uninitialized_zval);
|
||||
zend_string *name = zval_get_string(member);
|
||||
if (date_period_is_magic_property(name)) {
|
||||
zend_throw_error(NULL, "Retrieval of DatePeriod->%s for modification is unsupported", ZSTR_VAL(name));
|
||||
zend_string_release(name);
|
||||
return &EG(uninitialized_zval);
|
||||
}
|
||||
zend_string_release(name);
|
||||
}
|
||||
|
||||
Z_OBJPROP_P(object); /* build properties hash table */
|
||||
@@ -5320,7 +5377,15 @@ static zval *date_period_read_property(zval *object, zval *member, int type, voi
|
||||
/* {{{ date_period_write_property */
|
||||
static void date_period_write_property(zval *object, zval *member, zval *value, void **cache_slot)
|
||||
{
|
||||
zend_throw_error(NULL, "Writing to DatePeriod properties is unsupported");
|
||||
zend_string *name = zval_get_string(member);
|
||||
if (date_period_is_magic_property(name)) {
|
||||
zend_throw_error(NULL, "Writing to DatePeriod->%s is unsupported", ZSTR_VAL(name));
|
||||
zend_string_release(name);
|
||||
return;
|
||||
}
|
||||
zend_string_release(name);
|
||||
|
||||
std_object_handlers.write_property(object, member, value, cache_slot);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
@@ -204,6 +204,8 @@ ZEND_END_MODULE_GLOBALS(date)
|
||||
|
||||
#define DATEG(v) ZEND_MODULE_GLOBALS_ACCESSOR(date, v)
|
||||
|
||||
PHPAPI time_t php_time();
|
||||
|
||||
/* Backwards compatibility wrapper */
|
||||
PHPAPI zend_long php_parse_date(char *string, zend_long *now);
|
||||
PHPAPI void php_mktime(INTERNAL_FUNCTION_PARAMETERS, int gmt);
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
--TEST--
|
||||
DatePeriod: Test read only properties
|
||||
--INI--
|
||||
date.timezone=UTC
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$start = new DateTime;
|
||||
$interval = new DateInterval('P1D');
|
||||
$end = new DateTime;
|
||||
$period = new DatePeriod($start, $interval, $end);
|
||||
|
||||
echo "recurrences: ";
|
||||
var_dump($period->recurrences);
|
||||
|
||||
echo "include_start_date: ";
|
||||
var_dump($period->include_start_date);
|
||||
|
||||
echo "start: ";
|
||||
var_dump($period->start == $start);
|
||||
|
||||
echo "current: ";
|
||||
var_dump($period->current);
|
||||
|
||||
echo "end: ";
|
||||
var_dump($period->end == $end);
|
||||
|
||||
echo "interval: ";
|
||||
var_dump($period->interval->format("%R%d"));
|
||||
?>
|
||||
--EXPECT--
|
||||
recurrences: int(1)
|
||||
include_start_date: bool(true)
|
||||
start: bool(true)
|
||||
current: NULL
|
||||
end: bool(true)
|
||||
interval: string(2) "+1"
|
||||
@@ -0,0 +1,46 @@
|
||||
--TEST--
|
||||
DatePeriod: Test cannot modify read only properties
|
||||
--INI--
|
||||
date.timezone=UTC
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$period = new DatePeriod(new DateTime, new DateInterval('P1D'), new DateTime);
|
||||
|
||||
$properties = [
|
||||
"recurrences",
|
||||
"include_start_date",
|
||||
"start",
|
||||
"current",
|
||||
"end",
|
||||
"interval",
|
||||
];
|
||||
|
||||
foreach ($properties as $property) {
|
||||
try {
|
||||
$period->$property = "new";
|
||||
} catch (Error $e) {
|
||||
echo $e->getMessage() . "\n";
|
||||
}
|
||||
|
||||
try {
|
||||
$period->$property[] = "extra";
|
||||
} catch (Error $e) {
|
||||
echo $e->getMessage() . "\n";
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
Writing to DatePeriod->recurrences is unsupported
|
||||
Retrieval of DatePeriod->recurrences for modification is unsupported
|
||||
Writing to DatePeriod->include_start_date is unsupported
|
||||
Retrieval of DatePeriod->include_start_date for modification is unsupported
|
||||
Writing to DatePeriod->start is unsupported
|
||||
Retrieval of DatePeriod->start for modification is unsupported
|
||||
Writing to DatePeriod->current is unsupported
|
||||
Retrieval of DatePeriod->current for modification is unsupported
|
||||
Writing to DatePeriod->end is unsupported
|
||||
Retrieval of DatePeriod->end for modification is unsupported
|
||||
Writing to DatePeriod->interval is unsupported
|
||||
Retrieval of DatePeriod->interval for modification is unsupported
|
||||
@@ -0,0 +1,19 @@
|
||||
--TEST--
|
||||
DatePeriod: Test wrong recurrence parameter on __construct
|
||||
--FILE--
|
||||
<?php
|
||||
try {
|
||||
new DatePeriod(new DateTime('yesterday'), new DateInterval('P1D'), 0);
|
||||
} catch (Exception $exception) {
|
||||
echo $exception->getMessage(), "\n";
|
||||
}
|
||||
|
||||
try {
|
||||
new DatePeriod(new DateTime('yesterday'), new DateInterval('P1D'),-1);
|
||||
} catch (Exception $exception) {
|
||||
echo $exception->getMessage(), "\n";
|
||||
}
|
||||
?>
|
||||
--EXPECTF--
|
||||
DatePeriod::__construct(): The recurrence count '0' is invalid. Needs to be > 0
|
||||
DatePeriod::__construct(): The recurrence count '-1' is invalid. Needs to be > 0
|
||||
@@ -26,16 +26,16 @@ var_dump( $abbr["acst"] );
|
||||
--EXPECTF--
|
||||
*** Testing DateTimeZone::listAbbreviations() : basic functionality ***
|
||||
string(5) "array"
|
||||
int(%d)
|
||||
int(144)
|
||||
|
||||
-- Format a sample entry --
|
||||
array(12) {
|
||||
array(6) {
|
||||
[0]=>
|
||||
array(3) {
|
||||
["dst"]=>
|
||||
bool(false)
|
||||
["offset"]=>
|
||||
int(32400)
|
||||
int(34200)
|
||||
["timezone_id"]=>
|
||||
string(18) "Australia/Adelaide"
|
||||
}
|
||||
@@ -46,90 +46,36 @@ array(12) {
|
||||
["offset"]=>
|
||||
int(34200)
|
||||
["timezone_id"]=>
|
||||
string(18) "Australia/Adelaide"
|
||||
string(21) "Australia/Broken_Hill"
|
||||
}
|
||||
[2]=>
|
||||
array(3) {
|
||||
["dst"]=>
|
||||
bool(false)
|
||||
["offset"]=>
|
||||
int(32400)
|
||||
int(34200)
|
||||
["timezone_id"]=>
|
||||
string(21) "Australia/Broken_Hill"
|
||||
string(16) "Australia/Darwin"
|
||||
}
|
||||
[3]=>
|
||||
array(3) {
|
||||
["dst"]=>
|
||||
bool(false)
|
||||
["offset"]=>
|
||||
int(32400)
|
||||
int(34200)
|
||||
["timezone_id"]=>
|
||||
string(16) "Australia/Darwin"
|
||||
string(15) "Australia/North"
|
||||
}
|
||||
[4]=>
|
||||
array(3) {
|
||||
["dst"]=>
|
||||
bool(false)
|
||||
["offset"]=>
|
||||
int(32400)
|
||||
int(34200)
|
||||
["timezone_id"]=>
|
||||
string(15) "Australia/North"
|
||||
string(15) "Australia/South"
|
||||
}
|
||||
[5]=>
|
||||
array(3) {
|
||||
["dst"]=>
|
||||
bool(false)
|
||||
["offset"]=>
|
||||
int(32400)
|
||||
["timezone_id"]=>
|
||||
string(15) "Australia/South"
|
||||
}
|
||||
[6]=>
|
||||
array(3) {
|
||||
["dst"]=>
|
||||
bool(false)
|
||||
["offset"]=>
|
||||
int(32400)
|
||||
["timezone_id"]=>
|
||||
string(20) "Australia/Yancowinna"
|
||||
}
|
||||
[7]=>
|
||||
array(3) {
|
||||
["dst"]=>
|
||||
bool(false)
|
||||
["offset"]=>
|
||||
int(34200)
|
||||
["timezone_id"]=>
|
||||
string(21) "Australia/Broken_Hill"
|
||||
}
|
||||
[8]=>
|
||||
array(3) {
|
||||
["dst"]=>
|
||||
bool(false)
|
||||
["offset"]=>
|
||||
int(34200)
|
||||
["timezone_id"]=>
|
||||
string(16) "Australia/Darwin"
|
||||
}
|
||||
[9]=>
|
||||
array(3) {
|
||||
["dst"]=>
|
||||
bool(false)
|
||||
["offset"]=>
|
||||
int(34200)
|
||||
["timezone_id"]=>
|
||||
string(15) "Australia/North"
|
||||
}
|
||||
[10]=>
|
||||
array(3) {
|
||||
["dst"]=>
|
||||
bool(false)
|
||||
["offset"]=>
|
||||
int(34200)
|
||||
["timezone_id"]=>
|
||||
string(15) "Australia/South"
|
||||
}
|
||||
[11]=>
|
||||
array(3) {
|
||||
["dst"]=>
|
||||
bool(false)
|
||||
|
||||
@@ -39,7 +39,7 @@ DateInterval Object
|
||||
[weekday_behavior] => 0
|
||||
[first_last_day_of] => 0
|
||||
[invert] => 0
|
||||
[days] => 0
|
||||
[days] =>
|
||||
[special_type] => 0
|
||||
[special_amount] => 0
|
||||
[have_weekday_relative] => 0
|
||||
|
||||
@@ -136,7 +136,7 @@ object(DatePeriod)#%d (6) {
|
||||
["invert"]=>
|
||||
int(0)
|
||||
["days"]=>
|
||||
int(0)
|
||||
bool(false)
|
||||
["special_type"]=>
|
||||
int(0)
|
||||
["special_amount"]=>
|
||||
|
||||
@@ -71,7 +71,7 @@ object(DateInterval)#2 (16) {
|
||||
["invert"]=>
|
||||
int(0)
|
||||
["days"]=>
|
||||
int(0)
|
||||
bool(false)
|
||||
["special_type"]=>
|
||||
int(0)
|
||||
["special_amount"]=>
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
--TEST--
|
||||
Test for bug #65672: Broken classes inherited from DatePeriod
|
||||
--INI--
|
||||
date.timezone=UTC
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$interval = new DateInterval('P1D');
|
||||
$period = new class(new DateTime, $interval, new DateTime) extends DatePeriod {
|
||||
public $extra = "stuff";
|
||||
};
|
||||
|
||||
var_dump($period->extra);
|
||||
$period->extra = "modified";
|
||||
var_dump($period->extra);
|
||||
|
||||
# Ensure we can modify properties (retrieve for write)
|
||||
$period->extra = [];
|
||||
$period->extra[] = "array";
|
||||
var_dump($period->extra);
|
||||
|
||||
var_dump(isset($period->dynamic1));
|
||||
$period->dynamic1 = "dynamic";
|
||||
var_dump($period->dynamic1);
|
||||
|
||||
# Ensure we can modify properties (retrieve for write)
|
||||
$period->dynamic2 = [];
|
||||
$period->dynamic2[] = "array";
|
||||
var_dump($period->dynamic2);
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
string(5) "stuff"
|
||||
string(8) "modified"
|
||||
array(1) {
|
||||
[0]=>
|
||||
string(5) "array"
|
||||
}
|
||||
bool(false)
|
||||
string(7) "dynamic"
|
||||
array(1) {
|
||||
[0]=>
|
||||
string(5) "array"
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
--TEST--
|
||||
Bug #70153 (\DateInterval incorrectly unserialized)
|
||||
--FILE--
|
||||
<?php
|
||||
$i1 = \DateInterval::createFromDateString('+1 month');
|
||||
$i2 = unserialize(serialize($i1));
|
||||
var_dump($i1->days, $i2->days);
|
||||
var_dump($i2->special_amount, $i2->special_amount);
|
||||
?>
|
||||
--EXPECT--
|
||||
bool(false)
|
||||
bool(false)
|
||||
int(0)
|
||||
int(0)
|
||||
@@ -0,0 +1,16 @@
|
||||
--TEST--
|
||||
Bug #78751 (Serialising DatePeriod converts DateTimeImmutable)
|
||||
--FILE--
|
||||
<?php
|
||||
$oDay = new DateTimeImmutable('2019-10-25');
|
||||
$oDateInterval = DateInterval::createFromDateString('1 day');
|
||||
$oDays = new DatePeriod($oDay, $oDateInterval, $oDay->modify('+1 day'));
|
||||
$oDays = unserialize(serialize($oDays));
|
||||
var_dump(
|
||||
$oDays->start instanceof DateTimeImmutable,
|
||||
$oDays->end instanceof DateTimeImmutable
|
||||
);
|
||||
?>
|
||||
--EXPECT--
|
||||
bool(true)
|
||||
bool(true)
|
||||
@@ -26,16 +26,16 @@ var_dump( $abbr["acst"] );
|
||||
--EXPECTF--
|
||||
*** Testing timezone_abbreviations_list() : basic functionality ***
|
||||
string(5) "array"
|
||||
int(%d)
|
||||
int(144)
|
||||
|
||||
-- Format a sample entry --
|
||||
array(12) {
|
||||
array(6) {
|
||||
[0]=>
|
||||
array(3) {
|
||||
["dst"]=>
|
||||
bool(false)
|
||||
["offset"]=>
|
||||
int(32400)
|
||||
int(34200)
|
||||
["timezone_id"]=>
|
||||
string(18) "Australia/Adelaide"
|
||||
}
|
||||
@@ -46,90 +46,36 @@ array(12) {
|
||||
["offset"]=>
|
||||
int(34200)
|
||||
["timezone_id"]=>
|
||||
string(18) "Australia/Adelaide"
|
||||
string(21) "Australia/Broken_Hill"
|
||||
}
|
||||
[2]=>
|
||||
array(3) {
|
||||
["dst"]=>
|
||||
bool(false)
|
||||
["offset"]=>
|
||||
int(32400)
|
||||
int(34200)
|
||||
["timezone_id"]=>
|
||||
string(21) "Australia/Broken_Hill"
|
||||
string(16) "Australia/Darwin"
|
||||
}
|
||||
[3]=>
|
||||
array(3) {
|
||||
["dst"]=>
|
||||
bool(false)
|
||||
["offset"]=>
|
||||
int(32400)
|
||||
int(34200)
|
||||
["timezone_id"]=>
|
||||
string(16) "Australia/Darwin"
|
||||
string(15) "Australia/North"
|
||||
}
|
||||
[4]=>
|
||||
array(3) {
|
||||
["dst"]=>
|
||||
bool(false)
|
||||
["offset"]=>
|
||||
int(32400)
|
||||
int(34200)
|
||||
["timezone_id"]=>
|
||||
string(15) "Australia/North"
|
||||
string(15) "Australia/South"
|
||||
}
|
||||
[5]=>
|
||||
array(3) {
|
||||
["dst"]=>
|
||||
bool(false)
|
||||
["offset"]=>
|
||||
int(32400)
|
||||
["timezone_id"]=>
|
||||
string(15) "Australia/South"
|
||||
}
|
||||
[6]=>
|
||||
array(3) {
|
||||
["dst"]=>
|
||||
bool(false)
|
||||
["offset"]=>
|
||||
int(32400)
|
||||
["timezone_id"]=>
|
||||
string(20) "Australia/Yancowinna"
|
||||
}
|
||||
[7]=>
|
||||
array(3) {
|
||||
["dst"]=>
|
||||
bool(false)
|
||||
["offset"]=>
|
||||
int(34200)
|
||||
["timezone_id"]=>
|
||||
string(21) "Australia/Broken_Hill"
|
||||
}
|
||||
[8]=>
|
||||
array(3) {
|
||||
["dst"]=>
|
||||
bool(false)
|
||||
["offset"]=>
|
||||
int(34200)
|
||||
["timezone_id"]=>
|
||||
string(16) "Australia/Darwin"
|
||||
}
|
||||
[9]=>
|
||||
array(3) {
|
||||
["dst"]=>
|
||||
bool(false)
|
||||
["offset"]=>
|
||||
int(34200)
|
||||
["timezone_id"]=>
|
||||
string(15) "Australia/North"
|
||||
}
|
||||
[10]=>
|
||||
array(3) {
|
||||
["dst"]=>
|
||||
bool(false)
|
||||
["offset"]=>
|
||||
int(34200)
|
||||
["timezone_id"]=>
|
||||
string(15) "Australia/South"
|
||||
}
|
||||
[11]=>
|
||||
array(3) {
|
||||
["dst"]=>
|
||||
bool(false)
|
||||
|
||||
Loaded 100 of 547 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user