mirror of
https://github.com/bdnugget/php-src.git
synced 2026-11-10 02:30:50 +00:00
Compare commits
2516
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e7ee48ede1 | ||
|
|
f4d96cee48 | ||
|
|
afd5493707 | ||
|
|
7df5e203c6 | ||
|
|
36478058f4 | ||
|
|
fe871be5ca | ||
|
|
25679a60c7 | ||
|
|
afd9e80cb1 | ||
|
|
2361e1e342 | ||
|
|
e41125d052 | ||
|
|
5be79b203b | ||
|
|
9c4b602ee2 | ||
|
|
27879d0f0d | ||
|
|
800b1765ae | ||
|
|
0e93bfdbc3 | ||
|
|
7b7543afad | ||
|
|
4bd822a180 | ||
|
|
35e0567b62 | ||
|
|
4191d2bde1 | ||
|
|
ef14bdb691 | ||
|
|
69cfb62619 | ||
|
|
adfb56c304 | ||
|
|
f335d5447e | ||
|
|
ef89c82c02 | ||
|
|
4c28ca442f | ||
|
|
3a63f098bd | ||
|
|
c0ddfe89e2 | ||
|
|
da62e960e2 | ||
|
|
d0d3b02de7 | ||
|
|
2ce3e8cdec | ||
|
|
2a1bfae434 | ||
|
|
ac534dbf37 | ||
|
|
2aeb246874 | ||
|
|
18a2f7bab4 | ||
|
|
8b2def80d0 | ||
|
|
f0ae93e466 | ||
|
|
21616c7854 | ||
|
|
116956cc64 | ||
|
|
2dd02323c0 | ||
|
|
a85a72e29a | ||
|
|
7492d02cb2 | ||
|
|
52d5dd4da5 | ||
|
|
16ab834b5e | ||
|
|
1b60fa245e | ||
|
|
c057fc931a | ||
|
|
10243d019d | ||
|
|
a13710455c | ||
|
|
cfac03af3c | ||
|
|
39894c69cd | ||
|
|
59d28ed4df | ||
|
|
e2cf657294 | ||
|
|
d18b7a533a | ||
|
|
9308d262d0 | ||
|
|
ad791c135c | ||
|
|
48900111a8 | ||
|
|
61e4791abe | ||
|
|
9b708216d5 | ||
|
|
f692aeb36b | ||
|
|
3a867aad64 | ||
|
|
e4a63807a1 | ||
|
|
1a92434b06 | ||
|
|
2dfed48c99 | ||
|
|
1c2b48e0ca | ||
|
|
fea1d6c1fb | ||
|
|
a754abdc5f | ||
|
|
a56a817706 | ||
|
|
e547d66316 | ||
|
|
d6f18bd5f3 | ||
|
|
6d0d0172f3 | ||
|
|
e2e0cfb6fa | ||
|
|
ec1d763fd2 | ||
|
|
d88229acba | ||
|
|
eb00f1dd54 | ||
|
|
adec65bea6 | ||
|
|
a82bc1b50c | ||
|
|
7620efc274 | ||
|
|
45775e2029 | ||
|
|
46eecba03b | ||
|
|
6e6732ae6a | ||
|
|
9c33e3d3ce | ||
|
|
fff1d6a533 | ||
|
|
ab2ba0f49f | ||
|
|
bda27d167f | ||
|
|
edff9053e8 | ||
|
|
60d11d734c | ||
|
|
5e9a4ecc0e | ||
|
|
0d59c975a0 | ||
|
|
6db270f8fc | ||
|
|
a11f040979 | ||
|
|
e2a74cf344 | ||
|
|
89dde23f32 | ||
|
|
a07e4ef2ff | ||
|
|
a60b5db89e | ||
|
|
85bffe131e | ||
|
|
361aa7dd32 | ||
|
|
e5b50cede5 | ||
|
|
b5b29e267e | ||
|
|
d632dba1ef | ||
|
|
4704bb7186 | ||
|
|
b1eafc6a75 | ||
|
|
c2a66c59c6 | ||
|
|
cb9b99262e | ||
|
|
480e8dd7fc | ||
|
|
f1b478c291 | ||
|
|
a23dfb3b11 | ||
|
|
5646e5f747 | ||
|
|
ee9deb187a | ||
|
|
806c28b5c2 | ||
|
|
8103e07a23 | ||
|
|
de85bccf03 | ||
|
|
18557cba09 | ||
|
|
2fb568e65e | ||
|
|
94f05e60c2 | ||
|
|
2bf4ba798f | ||
|
|
0d6bac093d | ||
|
|
f17845f9bd | ||
|
|
40a1c4b4f4 | ||
|
|
283476972f | ||
|
|
8acd0a3835 | ||
|
|
925a3b6ba8 | ||
|
|
149d034a81 | ||
|
|
b485c4f26c | ||
|
|
db8d5a7fb0 | ||
|
|
ee3c85162f | ||
|
|
ccc0fb6122 | ||
|
|
d18b757655 | ||
|
|
08604e5d44 | ||
|
|
ce2f1ce4bc | ||
|
|
872948f21a | ||
|
|
491cf63bab | ||
|
|
675a41bee2 | ||
|
|
5714f48f4c | ||
|
|
05331829c6 | ||
|
|
258d90d101 | ||
|
|
8d28cb5737 | ||
|
|
c1a998a604 | ||
|
|
ca4d592e11 | ||
|
|
42d1578fb4 | ||
|
|
36e88551eb | ||
|
|
fea99094df | ||
|
|
5b3a654f07 | ||
|
|
0e09bbae14 | ||
|
|
3fcd022dc5 | ||
|
|
66ac209938 | ||
|
|
bbbf1df01d | ||
|
|
3857aa4f7d | ||
|
|
b4bed3fd88 | ||
|
|
776587fdac | ||
|
|
d0d8c4a6a3 | ||
|
|
353dd2444a | ||
|
|
472aaf3f50 | ||
|
|
186e6dc1ba | ||
|
|
46afe5a792 | ||
|
|
99ab17375d | ||
|
|
6d36221995 | ||
|
|
2dadbe3855 | ||
|
|
a11e7affc8 | ||
|
|
fbed1b901c | ||
|
|
75d44d8c07 | ||
|
|
491347fba6 | ||
|
|
b2a44d9327 | ||
|
|
3e59eb2be9 | ||
|
|
32f67e7664 | ||
|
|
010213e4ca | ||
|
|
6afa7b45ef | ||
|
|
6e1032c30d | ||
|
|
70c3e3e95f | ||
|
|
c290f39e3b | ||
|
|
b0fe9422e4 | ||
|
|
2f695ba37d | ||
|
|
72e5f9d395 | ||
|
|
1ba3c62c8b | ||
|
|
e56b9397d9 | ||
|
|
4aacd42826 | ||
|
|
ac848809b5 | ||
|
|
3f585ac923 | ||
|
|
f7972bc8be | ||
|
|
cd8ba5af5b | ||
|
|
fc787ac20f | ||
|
|
72cafaaabf | ||
|
|
968eb65b01 | ||
|
|
c872775134 | ||
|
|
55ec6edbfb | ||
|
|
7a06046d74 | ||
|
|
9761587fc6 | ||
|
|
65b33edeee | ||
|
|
62b4710d9e | ||
|
|
e60d220d5c | ||
|
|
e8d32e9779 | ||
|
|
32505ff927 | ||
|
|
5bda30d1bb | ||
|
|
40bc834210 | ||
|
|
24f458a004 | ||
|
|
aa405f4114 | ||
|
|
13e0c93f0c | ||
|
|
9ec1245550 | ||
|
|
aa1c8bdee5 | ||
|
|
0934056575 | ||
|
|
f59a6aceea | ||
|
|
28dabfb7a6 | ||
|
|
bd5f18bdf7 | ||
|
|
95c6f3e8a0 | ||
|
|
1f2cc89995 | ||
|
|
d20b3d0ed5 | ||
|
|
94e8d2ec62 | ||
|
|
d5bb4753c8 | ||
|
|
8ab1c72867 | ||
|
|
bfb188eff5 | ||
|
|
cbb59ee1b0 | ||
|
|
b02ce8bdc7 | ||
|
|
4d98201217 | ||
|
|
189fe6e665 | ||
|
|
20a35aa472 | ||
|
|
889eb2234e | ||
|
|
b4a6c9fe75 | ||
|
|
b1e3eaacaf | ||
|
|
2457ddb3ba | ||
|
|
e225eee248 | ||
|
|
1c65d69485 | ||
|
|
1eb9a119af | ||
|
|
7651ed0925 | ||
|
|
901af0e106 | ||
|
|
b485be88da | ||
|
|
7c728e6b9e | ||
|
|
049eaa886a | ||
|
|
a2f21f3e8c | ||
|
|
4ac705885e | ||
|
|
5f003af4d4 | ||
|
|
6ce26891e8 | ||
|
|
3d9aed8039 | ||
|
|
c298c075f4 | ||
|
|
84c5c7da97 | ||
|
|
17d5386bb3 | ||
|
|
5fdef05cb0 | ||
|
|
ce4fbe580d | ||
|
|
9f8be37c4e | ||
|
|
bf26b9a7e1 | ||
|
|
c23ec177d5 | ||
|
|
1a283a6c42 | ||
|
|
ca64fae35d | ||
|
|
485cba185b | ||
|
|
43eddf7a58 | ||
|
|
5896ff7e80 | ||
|
|
0767e6f1e2 | ||
|
|
4f2153fd14 | ||
|
|
8edac7234d | ||
|
|
b767129303 | ||
|
|
6d57013b3e | ||
|
|
f137ee87f7 | ||
|
|
fa55a5a826 | ||
|
|
0be182e1ba | ||
|
|
c3757b1f05 | ||
|
|
21af3e8c4e | ||
|
|
4df567fe9d | ||
|
|
1c662bee50 | ||
|
|
e7f085d84b | ||
|
|
fc12da950c | ||
|
|
1f27563128 | ||
|
|
e2782d9e1d | ||
|
|
3782f21222 | ||
|
|
bc24daedc3 | ||
|
|
41c1ea1b05 | ||
|
|
415df9168f | ||
|
|
e98926be3f | ||
|
|
488f26359a | ||
|
|
e5cc26627a | ||
|
|
619d34b7f8 | ||
|
|
58fa31451a | ||
|
|
4942844edb | ||
|
|
f4d7971b7f | ||
|
|
ab9ceb9526 | ||
|
|
9e07fed96e | ||
|
|
0ea4d57d56 | ||
|
|
77005be687 | ||
|
|
aef886e34c | ||
|
|
b21f1582dd | ||
|
|
f8f72bd52e | ||
|
|
7cd06f5088 | ||
|
|
db7baa737f | ||
|
|
bb83f93954 | ||
|
|
008b424ee9 | ||
|
|
720d3804fc | ||
|
|
9d61de0ec9 | ||
|
|
16f3c4b7fb | ||
|
|
65c28b0cc6 | ||
|
|
c0edbc5eee | ||
|
|
a170be820e | ||
|
|
652147def5 | ||
|
|
343a1f081c | ||
|
|
c82c3a41b4 | ||
|
|
e2ee8d0edb | ||
|
|
d702e37902 | ||
|
|
e0d22f195b | ||
|
|
88004a6208 | ||
|
|
a2a30ca7d3 | ||
|
|
d7264e744d | ||
|
|
7f04983ed3 | ||
|
|
ac99c5ab03 | ||
|
|
60097c2661 | ||
|
|
72f98037f4 | ||
|
|
6465017e05 | ||
|
|
f75ae95c8f | ||
|
|
26ff74d670 | ||
|
|
b34666a014 | ||
|
|
d8bbff45c1 | ||
|
|
39a8fc274a | ||
|
|
b6006ed2fc | ||
|
|
4ceecd3e5e | ||
|
|
ab74b63ff2 | ||
|
|
3214d963ec | ||
|
|
6bacb29c98 | ||
|
|
339427de12 | ||
|
|
f1dd5c2406 | ||
|
|
bb4ea41589 | ||
|
|
c5a669caa6 | ||
|
|
cee27dd710 | ||
|
|
879fb489f3 | ||
|
|
1ab01b470b | ||
|
|
e25d006476 | ||
|
|
2732fbadbe | ||
|
|
418cada107 | ||
|
|
850a158531 | ||
|
|
4282e55dfe | ||
|
|
05a0c36072 | ||
|
|
05ae3f22ab | ||
|
|
903275e887 | ||
|
|
88b48b5376 | ||
|
|
88e0b419f2 | ||
|
|
33d7423950 | ||
|
|
30c26df348 | ||
|
|
cadd668aac | ||
|
|
b2c85181d0 | ||
|
|
7da8651511 | ||
|
|
22aab1e328 | ||
|
|
919f53ee51 | ||
|
|
3b2cf9ddef | ||
|
|
3f11a2a6a8 | ||
|
|
2725d3534f | ||
|
|
48c975a333 | ||
|
|
fe042a90b9 | ||
|
|
fab70dea69 | ||
|
|
7b1548e798 | ||
|
|
e084903eab | ||
|
|
3f71921c58 | ||
|
|
806f9145de | ||
|
|
bd3cb846c0 | ||
|
|
9356017daa | ||
|
|
351a686a7c | ||
|
|
61c05dfc9f | ||
|
|
553fb5a3be | ||
|
|
35f457c92e | ||
|
|
b855ab0dd4 | ||
|
|
238aa7baee | ||
|
|
46174f8ac8 | ||
|
|
379040771d | ||
|
|
37a02a3984 | ||
|
|
575b38ee2f | ||
|
|
977ec5eb4a | ||
|
|
064cab8ac8 | ||
|
|
d5fe19eb92 | ||
|
|
c2eb068c8a | ||
|
|
efc550eea3 | ||
|
|
3f54dd40b6 | ||
|
|
7c0dd1251c | ||
|
|
0d8beb77f6 | ||
|
|
1cab24458b | ||
|
|
cfc97c7d71 | ||
|
|
30f1001553 | ||
|
|
92d3c2a08e | ||
|
|
9cfcbd137b | ||
|
|
b74daafbcd | ||
|
|
af01cf787d | ||
|
|
6da25bdae8 | ||
|
|
6ffa3e1780 | ||
|
|
ff35f925b7 | ||
|
|
6b0aaabc98 | ||
|
|
e60da236ae | ||
|
|
d58f597885 | ||
|
|
a25742e18f | ||
|
|
b75c57e521 | ||
|
|
77a22a2835 | ||
|
|
0690aff6b5 | ||
|
|
f877a76a0e | ||
|
|
605563c0a8 | ||
|
|
b2a7d2ed4e | ||
|
|
b2bd6e465c | ||
|
|
ceb065f9eb | ||
|
|
c2302046dd | ||
|
|
bd6bd53646 | ||
|
|
c95bd4ad87 | ||
|
|
1167e85cf3 | ||
|
|
77225b912f | ||
|
|
aa3a1426e8 | ||
|
|
0072a36646 | ||
|
|
cecfd0ace4 | ||
|
|
d7409a9797 | ||
|
|
1560aabbaf | ||
|
|
6ff7c1cedf | ||
|
|
6c7394101b | ||
|
|
c4845a8b65 | ||
|
|
728ca44dff | ||
|
|
1af7f512bc | ||
|
|
07ff7f16c7 | ||
|
|
bfcbf4bc19 | ||
|
|
69322ae43b | ||
|
|
2dea730e08 | ||
|
|
84cc58d013 | ||
|
|
165a1d62c8 | ||
|
|
d5fba05f61 | ||
|
|
9868377fa0 | ||
|
|
c25ed56914 | ||
|
|
a6aef8844f | ||
|
|
7d96d95a5e | ||
|
|
79ff9f2fa3 | ||
|
|
79f338488e | ||
|
|
7c70a8f8c2 | ||
|
|
1e76a63719 | ||
|
|
29c92b6d91 | ||
|
|
7ec8b0bcba | ||
|
|
370eecd336 | ||
|
|
f89eae47f2 | ||
|
|
3d598476ec | ||
|
|
b7d673db52 | ||
|
|
e3d9b17e53 | ||
|
|
dfba9a0ab0 | ||
|
|
47e16d8ad6 | ||
|
|
f3618527a6 | ||
|
|
ad2fa621bd | ||
|
|
f2565109ea | ||
|
|
b1a7a8d572 | ||
|
|
519c152527 | ||
|
|
2e783c4dac | ||
|
|
e95fbd1f2c | ||
|
|
fa40ecfec1 | ||
|
|
be27697628 | ||
|
|
86842904be | ||
|
|
2556aa7b2a | ||
|
|
9f7f4f5bb8 | ||
|
|
85f4e2b191 | ||
|
|
e945608fa4 | ||
|
|
d892bf5333 | ||
|
|
d3b271d04f | ||
|
|
498c4ce19d | ||
|
|
6f53bb90e4 | ||
|
|
e57d86daef | ||
|
|
b050f6e430 | ||
|
|
8caea61bd3 | ||
|
|
8b2dc6853a | ||
|
|
02a1624d22 | ||
|
|
c09cdb4a07 | ||
|
|
2e870b76c6 | ||
|
|
687e73c7af | ||
|
|
71be643056 | ||
|
|
e975382a82 | ||
|
|
35a8ad18a9 | ||
|
|
349a98d388 | ||
|
|
c65fd57a24 | ||
|
|
b459ec5cdb | ||
|
|
e187fad2d1 | ||
|
|
8182575647 | ||
|
|
f9938a3e9a | ||
|
|
ca50da933e | ||
|
|
f43b7faec5 | ||
|
|
ba533a91c4 | ||
|
|
ae171ce2d2 | ||
|
|
97662dc30e | ||
|
|
fc8b10cf71 | ||
|
|
a6901dc7ba | ||
|
|
7297a2b02e | ||
|
|
a4d484b478 | ||
|
|
d3399f8f25 | ||
|
|
5b1dd1818c | ||
|
|
04e9bdd516 | ||
|
|
f5c49771df | ||
|
|
7759a36327 | ||
|
|
fb51a889f4 | ||
|
|
facd6c20c8 | ||
|
|
5e0da82b7f | ||
|
|
9dbbc057c5 | ||
|
|
886184c38e | ||
|
|
3da82597bb | ||
|
|
c2de8f4282 | ||
|
|
0ea41bf2b1 | ||
|
|
7e3fa7bd59 | ||
|
|
cf9cec3562 | ||
|
|
e680c28694 | ||
|
|
8db0c60f58 | ||
|
|
fba6b0da53 | ||
|
|
916627208c | ||
|
|
8da6929e93 | ||
|
|
385db5abbd | ||
|
|
fd4d2df3e6 | ||
|
|
7076a84b83 | ||
|
|
957fcfac4b | ||
|
|
77ec263329 | ||
|
|
d496c5f4a5 | ||
|
|
372fe3128c | ||
|
|
ff8670e601 | ||
|
|
451deb0101 | ||
|
|
b278b99605 | ||
|
|
1d5ca2f45e | ||
|
|
fc0799f0ca | ||
|
|
3a43c4124f | ||
|
|
d197a131db | ||
|
|
7be9dcd263 | ||
|
|
117395ed23 | ||
|
|
7d40544703 | ||
|
|
064e743014 | ||
|
|
701da1fa4d | ||
|
|
224e070c74 | ||
|
|
c1dc317791 | ||
|
|
add133a4c6 | ||
|
|
383d813dd9 | ||
|
|
9a53d1b4fe | ||
|
|
2fe43e8af8 | ||
|
|
f55e1330d5 | ||
|
|
9e09a7c02b | ||
|
|
07b9f0c1d5 | ||
|
|
61fc0ba6b2 | ||
|
|
10bb058051 | ||
|
|
7ba06d0145 | ||
|
|
1b48b07ee4 | ||
|
|
e941298e55 | ||
|
|
be2763d13d | ||
|
|
ef440f1b4e | ||
|
|
d990e2881b | ||
|
|
0c4cf5aff2 | ||
|
|
38b3ef790b | ||
|
|
fd7bb0b3da | ||
|
|
2298aaef75 | ||
|
|
123a5c20d8 | ||
|
|
d60fc0981b | ||
|
|
70491a7ea0 | ||
|
|
0b49f0bea0 | ||
|
|
33108da1d0 | ||
|
|
1674a79e11 | ||
|
|
6f581e803c | ||
|
|
9c7d125108 | ||
|
|
5fc1090dbe | ||
|
|
2057041621 | ||
|
|
3cadadee34 | ||
|
|
660d1fe292 | ||
|
|
d3cc1a3186 | ||
|
|
274237f4d2 | ||
|
|
602241f936 | ||
|
|
7880b84ba7 | ||
|
|
e9c4ca1b61 | ||
|
|
c0bc7b6c80 | ||
|
|
0934f19c69 | ||
|
|
41441e017a | ||
|
|
1277a79544 | ||
|
|
ce527f42cd | ||
|
|
edb801394b | ||
|
|
c40e1cbbfc | ||
|
|
faff0dbd45 | ||
|
|
dff2f35098 | ||
|
|
261429dc52 | ||
|
|
2db6b7e8f1 | ||
|
|
9aa1cce146 | ||
|
|
8c766b9670 | ||
|
|
0777e6062c | ||
|
|
8d4a2eabb8 | ||
|
|
2a836845c8 | ||
|
|
5c4f19b7c5 | ||
|
|
63a8f46dda | ||
|
|
3d972fcc0e | ||
|
|
d69e7b6d04 | ||
|
|
f0623f78eb | ||
|
|
2891206718 | ||
|
|
c4ab6c2cad | ||
|
|
56b4205f38 | ||
|
|
35b40bdb2a | ||
|
|
63289837ae | ||
|
|
439596bce5 | ||
|
|
f725d7b180 | ||
|
|
933ef3298a | ||
|
|
16b3e1e406 | ||
|
|
d560e58711 | ||
|
|
29a8e606f3 | ||
|
|
b4f086b52a | ||
|
|
cf33623715 | ||
|
|
894e2f15f0 | ||
|
|
e7175cbecf | ||
|
|
241945e11f | ||
|
|
1aecd0f1ff | ||
|
|
9cb84b6351 | ||
|
|
cc68ee790e | ||
|
|
e786476701 | ||
|
|
a48ac52a7d | ||
|
|
9e33cdb499 | ||
|
|
5de9ca91cb | ||
|
|
f2d8bb4c38 | ||
|
|
bd719279db | ||
|
|
4f16113988 | ||
|
|
fb79cfb853 | ||
|
|
1a0e3b62e2 | ||
|
|
af30033599 | ||
|
|
b6c6a8db3a | ||
|
|
07b70c743c | ||
|
|
ca7ad2ff2c | ||
|
|
79e4f5a47f | ||
|
|
2be22abf64 | ||
|
|
2fafe59ed2 | ||
|
|
3687e5e953 | ||
|
|
4c1c759343 | ||
|
|
ef32b131ce | ||
|
|
792645aa6f | ||
|
|
8055bab946 | ||
|
|
19928d2509 | ||
|
|
c0f72d9fac | ||
|
|
77b6cdb7dd | ||
|
|
f71e66e50d | ||
|
|
71461f74b2 | ||
|
|
dfbeb6b786 | ||
|
|
3e1affd647 | ||
|
|
1ba9226cb5 | ||
|
|
7f2c03ed0e | ||
|
|
251b1ad96b | ||
|
|
c8e7bc0542 | ||
|
|
ab3957bda7 | ||
|
|
5320379dc0 | ||
|
|
f6b36353a6 | ||
|
|
e5523b4954 | ||
|
|
de9f401877 | ||
|
|
46fd530566 | ||
|
|
b6b4369972 | ||
|
|
3aeaad418f | ||
|
|
b2bedbf40e | ||
|
|
62ef1e2857 | ||
|
|
0d03073c89 | ||
|
|
1ebbe4d551 | ||
|
|
1d14341231 | ||
|
|
b4c03fb0a9 | ||
|
|
9eeb62c4a3 | ||
|
|
116f2fa00a | ||
|
|
d6fbae0c27 | ||
|
|
6c37499531 | ||
|
|
7a92fe4c4c | ||
|
|
986b654098 | ||
|
|
ef7c1af78d | ||
|
|
2a8c1bb255 | ||
|
|
ef2d599f45 | ||
|
|
627c9515b1 | ||
|
|
fc846109ba | ||
|
|
5775569f18 | ||
|
|
55b41157cf | ||
|
|
5ba98ed5d3 | ||
|
|
69e0f3bf48 | ||
|
|
97422095ed | ||
|
|
40acbc1ea5 | ||
|
|
94a9447396 | ||
|
|
8229beefa4 | ||
|
|
6a62b9d5b7 | ||
|
|
bf6c5ff7c1 | ||
|
|
e6177356ec | ||
|
|
53b384c01d | ||
|
|
b66f3b08bb | ||
|
|
92e30ad3df | ||
|
|
17e89935c4 | ||
|
|
04ced9d63d | ||
|
|
555173a263 | ||
|
|
54391bb2ca | ||
|
|
ea0f710586 | ||
|
|
5a2899b78e | ||
|
|
f26cc7bcd4 | ||
|
|
08bc2cde18 | ||
|
|
a5d361d9c4 | ||
|
|
96d4171df7 | ||
|
|
fd2aaa768a | ||
|
|
24f73838f2 | ||
|
|
2b97f7ce7b | ||
|
|
e7e577e05d | ||
|
|
52bdfd3dca | ||
|
|
0e29833fc7 | ||
|
|
92c07fbccc | ||
|
|
bc3d6e90fa | ||
|
|
056e268cb3 | ||
|
|
50eb9f576a | ||
|
|
0db5048d6a | ||
|
|
eed604dce5 | ||
|
|
97b55a966d | ||
|
|
8d5a034c9d | ||
|
|
de6e5e315d | ||
|
|
8a44b6f251 | ||
|
|
e6770d6361 | ||
|
|
e5d8e11306 | ||
|
|
821b603ec2 | ||
|
|
34363d77db | ||
|
|
7a8260d5e0 | ||
|
|
1f1d49bbd6 | ||
|
|
0e82616ea6 | ||
|
|
9a68a887f0 | ||
|
|
f2b405924d | ||
|
|
eee7417f1f | ||
|
|
db48c076a6 | ||
|
|
5a15aee0e0 | ||
|
|
d67afcc9c1 | ||
|
|
b09f475602 | ||
|
|
c4e6c0aa83 | ||
|
|
e459214613 | ||
|
|
3dbe3deb64 | ||
|
|
701c81c7d1 | ||
|
|
557fd9b7a3 | ||
|
|
ae3de7f0c0 | ||
|
|
43b0c8adea | ||
|
|
c70f036024 | ||
|
|
d74a72d580 | ||
|
|
40d758b019 | ||
|
|
b390e0ebf1 | ||
|
|
ab2ea18cb5 | ||
|
|
ea33b2824e | ||
|
|
140e562446 | ||
|
|
9209328fd3 | ||
|
|
35938e4d90 | ||
|
|
316d124ec4 | ||
|
|
b1f59b4703 | ||
|
|
08ce3d0ed5 | ||
|
|
e39472c606 | ||
|
|
3924c1eabf | ||
|
|
929ab8b529 | ||
|
|
da55120b84 | ||
|
|
b1c0e42d00 | ||
|
|
b694edc23d | ||
|
|
0fe951a702 | ||
|
|
4cf62ff62c | ||
|
|
c6647fc0bf | ||
|
|
50b17c0f7d | ||
|
|
a0853a17ed | ||
|
|
35888b62f4 | ||
|
|
6b74250915 | ||
|
|
1269ac0661 | ||
|
|
a2f0a9c380 | ||
|
|
434926a39e | ||
|
|
4ccbb1b867 | ||
|
|
02af1ac144 | ||
|
|
1b747da374 | ||
|
|
f82e06d4f8 | ||
|
|
7812b45b36 | ||
|
|
09c034c096 | ||
|
|
7473ff4698 | ||
|
|
03468f3079 | ||
|
|
138a1157ee | ||
|
|
a63c981d70 | ||
|
|
9888224208 | ||
|
|
33ba2503c6 | ||
|
|
a9eea29b84 | ||
|
|
c21de1dbe5 | ||
|
|
6b8d3f6b01 | ||
|
|
e2ff71d2dd | ||
|
|
36097f68a0 | ||
|
|
20088e34b5 | ||
|
|
ad24ef01de | ||
|
|
304a39c793 | ||
|
|
338ad09a44 | ||
|
|
015712b9f1 | ||
|
|
11cb016d39 | ||
|
|
327e5834d5 | ||
|
|
c984c80a7d | ||
|
|
fe43729707 | ||
|
|
54cee9cd1f | ||
|
|
ad98994e4a | ||
|
|
87c57062c4 | ||
|
|
180e604534 | ||
|
|
47f2fb1832 | ||
|
|
96d9102630 | ||
|
|
f6f08969d1 | ||
|
|
676b4c0362 | ||
|
|
a789f6bb85 | ||
|
|
1e71ec7613 | ||
|
|
b3af6c9da5 | ||
|
|
0ce220d77a | ||
|
|
dc1f25d6fb | ||
|
|
e8c057e33f | ||
|
|
80c568bb30 | ||
|
|
e6b637cd72 | ||
|
|
10228f3bb8 | ||
|
|
e783c0b5a1 | ||
|
|
626f3de608 | ||
|
|
4cc45a7ba9 | ||
|
|
1c7f16c742 | ||
|
|
60211ee3b3 | ||
|
|
68accfe5c1 | ||
|
|
3f824c7e1e | ||
|
|
ab037ed242 | ||
|
|
4aec010451 | ||
|
|
9f97891939 | ||
|
|
9c9b10f047 | ||
|
|
5f4e664e8b | ||
|
|
220a5cb89f | ||
|
|
2cf200c493 | ||
|
|
d042cecbd9 | ||
|
|
cfc8c7a95e | ||
|
|
6c7e5d9c18 | ||
|
|
3fdf998703 | ||
|
|
babbbb048b | ||
|
|
36c9f3116e | ||
|
|
451f0b2d07 | ||
|
|
da10d61faa | ||
|
|
b4aeccba6d | ||
|
|
c60c1258e2 | ||
|
|
cef32b1e2f | ||
|
|
06d67f822b | ||
|
|
97da8ca6bb | ||
|
|
11a765e77d | ||
|
|
52dbb39ecd | ||
|
|
92b1fecc92 | ||
|
|
18c269209d | ||
|
|
808fc0a0bf | ||
|
|
5e852417dd | ||
|
|
677375c0d1 | ||
|
|
33a47baa0f | ||
|
|
a788378ce2 | ||
|
|
d3728b5fff | ||
|
|
79dc4f7a0c | ||
|
|
a32672c1c5 | ||
|
|
a384966f76 | ||
|
|
fd5d1094d3 | ||
|
|
a4ff44794c | ||
|
|
e2d057bd2c | ||
|
|
90eb73bb9d | ||
|
|
d6245c9e69 | ||
|
|
e99d47a3aa | ||
|
|
89e4c87e57 | ||
|
|
8f50a67b87 | ||
|
|
269a3ad5ad | ||
|
|
533c499b44 | ||
|
|
39f801b957 | ||
|
|
17d28abb62 | ||
|
|
9fbee0b347 | ||
|
|
e83404fea2 | ||
|
|
1a65bf61a8 | ||
|
|
6443fb2581 | ||
|
|
2112f46885 | ||
|
|
074aa05880 | ||
|
|
9afa0f3249 | ||
|
|
3b8f0741cb | ||
|
|
4f75f3bef1 | ||
|
|
28f4501f0a | ||
|
|
47acdced4c | ||
|
|
b2cf9fe953 | ||
|
|
1505f6af03 | ||
|
|
35659b625f | ||
|
|
5482637876 | ||
|
|
24e91108ba | ||
|
|
b130f77b94 | ||
|
|
84ebb3ae39 | ||
|
|
aa9d7d766e | ||
|
|
0718a54934 | ||
|
|
b0884491ae | ||
|
|
2da81fefb8 | ||
|
|
651d262d43 | ||
|
|
22a9c4d448 | ||
|
|
b44ea85296 | ||
|
|
951e64a4bc | ||
|
|
19081305e1 | ||
|
|
f189957991 | ||
|
|
fb7f9eb420 | ||
|
|
9085f883ad | ||
|
|
fe95410380 | ||
|
|
7ccfa69750 | ||
|
|
0b0a331e63 | ||
|
|
5a28c6dd94 | ||
|
|
8506ee1bfe | ||
|
|
7cd254b070 | ||
|
|
931f3abe4e | ||
|
|
873f321cf7 | ||
|
|
24a42bb761 | ||
|
|
4168763049 | ||
|
|
84707a7504 | ||
|
|
881414e0af | ||
|
|
d1cbbf62c9 | ||
|
|
59b59d2651 | ||
|
|
1447af9522 | ||
|
|
376c94c239 | ||
|
|
b617f54d34 | ||
|
|
4e38d42183 | ||
|
|
5966ec08a9 | ||
|
|
f7f36b4f37 | ||
|
|
05e3f11ac5 | ||
|
|
be18fcec6b | ||
|
|
0bf1fb6f19 | ||
|
|
7bef1c1f2a | ||
|
|
77763cee25 | ||
|
|
01d848075a | ||
|
|
f9f0c83b30 | ||
|
|
90952aae2d | ||
|
|
fab2534381 | ||
|
|
ea8eefdf72 | ||
|
|
ae7fadf900 | ||
|
|
c97e3bac2a | ||
|
|
63130ca782 | ||
|
|
b653dfe7ba | ||
|
|
33d844496f | ||
|
|
39267c2bf9 | ||
|
|
5430f7efa9 | ||
|
|
f01b062a06 | ||
|
|
db81c3d979 | ||
|
|
092b805de5 | ||
|
|
2ab7673bb0 | ||
|
|
ee11982bcb | ||
|
|
e0c3093711 | ||
|
|
7de28bdc6a | ||
|
|
c5ec799b2d | ||
|
|
3ae99689f7 | ||
|
|
210ce6796f | ||
|
|
9a9b55e60b | ||
|
|
2dc7873362 | ||
|
|
1ebb0b0785 | ||
|
|
01fa930e6b | ||
|
|
28ce738ce7 | ||
|
|
c49dfb1007 | ||
|
|
96559baede | ||
|
|
858c75805f | ||
|
|
f5b3d65f07 | ||
|
|
b5c6ea479d | ||
|
|
9990a0a301 | ||
|
|
43eda262be | ||
|
|
9bc15253ad | ||
|
|
5303587494 | ||
|
|
33bed67b99 | ||
|
|
3d3416d10e | ||
|
|
02c184dce8 | ||
|
|
89f2c54773 | ||
|
|
36e9a1582f | ||
|
|
bd955dcb81 | ||
|
|
653717b72c | ||
|
|
67ebb942b6 | ||
|
|
d9cf9e37fb | ||
|
|
976f0d8303 | ||
|
|
7b514da372 | ||
|
|
a0a3b47001 | ||
|
|
97dd56a974 | ||
|
|
14fc7fa96c | ||
|
|
1a7e7165a7 | ||
|
|
bdcd417ad6 | ||
|
|
b3171064fd | ||
|
|
31fe8c5c16 | ||
|
|
1c0ff3c97e | ||
|
|
2e48996c64 | ||
|
|
0ae1d743e6 | ||
|
|
befce57664 | ||
|
|
db082e4215 | ||
|
|
a7290240a2 | ||
|
|
6fee33722d | ||
|
|
cb87994fcd | ||
|
|
961b1151c0 | ||
|
|
a335bb813d | ||
|
|
0840b0ccf0 | ||
|
|
237bf7a69c | ||
|
|
022d058ce1 | ||
|
|
5aaa0bcf64 | ||
|
|
f41f376213 | ||
|
|
cbd712e8c9 | ||
|
|
b831413ba7 | ||
|
|
2127840893 | ||
|
|
2e34a6a9a6 | ||
|
|
f851db2531 | ||
|
|
5d900b5171 | ||
|
|
25fcdb4304 | ||
|
|
b92cc3d806 | ||
|
|
09ddabb35e | ||
|
|
4cb2b8e1fe | ||
|
|
8eb3233f82 | ||
|
|
8b4ff89345 | ||
|
|
abd2b78275 | ||
|
|
67631ea57c | ||
|
|
12ce650f03 | ||
|
|
549625a4c7 | ||
|
|
5ce5b396f7 | ||
|
|
bddbce404f | ||
|
|
4557989eff | ||
|
|
0f4b4c82de | ||
|
|
a9a7057448 | ||
|
|
5defe2dd7c | ||
|
|
1a6d970f7e | ||
|
|
75144252c0 | ||
|
|
cedd7ef4bf | ||
|
|
9efa05b7c7 | ||
|
|
c00b313bee | ||
|
|
8725a3147d | ||
|
|
d66fa199b4 | ||
|
|
b3251de43f | ||
|
|
2cab62fdc4 | ||
|
|
596b08b9a1 | ||
|
|
52c6a66274 | ||
|
|
ebfb3cb678 | ||
|
|
60434f91bd | ||
|
|
396e830e72 | ||
|
|
331f905e8a | ||
|
|
3987509ac3 | ||
|
|
818412a4a9 | ||
|
|
45a703d3f1 | ||
|
|
55a52eb920 | ||
|
|
e53ca2b5dd | ||
|
|
86ce37ce21 | ||
|
|
68eef6b9f4 | ||
|
|
dd866fdd82 | ||
|
|
f53160138e | ||
|
|
9719a22ff8 | ||
|
|
6a966b79d7 | ||
|
|
8dfb69ebca | ||
|
|
ae30c7f4ab | ||
|
|
eeb43eb1eb | ||
|
|
c2660ef64a | ||
|
|
41278da02f | ||
|
|
d76c684cef | ||
|
|
cf43cddba9 | ||
|
|
ac88c9cabd | ||
|
|
444959cd81 | ||
|
|
0ee4b1dd48 | ||
|
|
8053881211 | ||
|
|
0c376684c7 | ||
|
|
bab2866e21 | ||
|
|
f026645177 | ||
|
|
d36a62dd0e | ||
|
|
a9930145fe | ||
|
|
98e4c9aef4 | ||
|
|
eaeff2e939 | ||
|
|
67391df6f0 | ||
|
|
b484bc253a | ||
|
|
54c83ce7a3 | ||
|
|
37142b284f | ||
|
|
217a213a5d | ||
|
|
9233c937ae | ||
|
|
c4690101a3 | ||
|
|
129d6e940f | ||
|
|
c8c6b2141e | ||
|
|
97a0b51739 | ||
|
|
ee135e463c | ||
|
|
a5c040170c | ||
|
|
8e2ddfb9df | ||
|
|
2c84b8acb8 | ||
|
|
1fdb920299 | ||
|
|
c1a6b4530b | ||
|
|
daacfa367b | ||
|
|
73d041e231 | ||
|
|
5faf455502 | ||
|
|
35fb4f2c20 | ||
|
|
6c3f316db8 | ||
|
|
3837327f43 | ||
|
|
d568d3877a | ||
|
|
99515d905c | ||
|
|
e06424afc7 | ||
|
|
1a5e210004 | ||
|
|
e1818aae0a | ||
|
|
01aef58899 | ||
|
|
670d72a64b | ||
|
|
0a837f8064 | ||
|
|
8307e2c329 | ||
|
|
5c48a21bcc | ||
|
|
39d03d8ab6 | ||
|
|
e674b5c6a4 | ||
|
|
395123dcc8 | ||
|
|
b484523d7f | ||
|
|
22e9844842 | ||
|
|
6dfca30ec9 | ||
|
|
fd0b71760e | ||
|
|
862edc6aae | ||
|
|
fcffe5b582 | ||
|
|
32131681f7 | ||
|
|
2cd08683c8 | ||
|
|
0e47b9242d | ||
|
|
4066bd0a17 | ||
|
|
bbf39825e1 | ||
|
|
7017cc588c | ||
|
|
057d36b789 | ||
|
|
b811d30a74 | ||
|
|
8530516f40 | ||
|
|
987d9aff6c | ||
|
|
1a241fc6f6 | ||
|
|
a0a0ff10a4 | ||
|
|
ecf62dc44e | ||
|
|
cfeebdf8c5 | ||
|
|
cd1def8074 | ||
|
|
99af37d2c8 | ||
|
|
10f2defb04 | ||
|
|
d80e0fc48c | ||
|
|
a159c212c4 | ||
|
|
3b2f0b8ac4 | ||
|
|
6c0ee68f07 | ||
|
|
46756f8caa | ||
|
|
38beab8a1e | ||
|
|
c53c056477 | ||
|
|
6db735215a | ||
|
|
52c52c1c3d | ||
|
|
7d4a198992 | ||
|
|
794994bfb5 | ||
|
|
1df318632d | ||
|
|
b8af95533a | ||
|
|
f695e50683 | ||
|
|
4b3a23efa9 | ||
|
|
ad07d32fc7 | ||
|
|
48ef3a2f55 | ||
|
|
eafad14638 | ||
|
|
6503178113 | ||
|
|
a678dd0832 | ||
|
|
f601dff0c2 | ||
|
|
9acdb6b6c8 | ||
|
|
e29c2b0872 | ||
|
|
96d9074817 | ||
|
|
c959028440 | ||
|
|
8902f7fc3f | ||
|
|
b0fdf62d3c | ||
|
|
c03591bbc0 | ||
|
|
2b2187ea33 | ||
|
|
ee1f22f64e | ||
|
|
b790692180 | ||
|
|
62f0ea7954 | ||
|
|
648355a4cb | ||
|
|
cf6352e82f | ||
|
|
b70f5ce50c | ||
|
|
09d0f92e05 | ||
|
|
4e340d5e6c | ||
|
|
5696b0327f | ||
|
|
ea7f0f7314 | ||
|
|
97807d68e9 | ||
|
|
908f56d375 | ||
|
|
decda2cb0e | ||
|
|
83dbc17647 | ||
|
|
70369b3888 | ||
|
|
314d0c288f | ||
|
|
246300a60c | ||
|
|
98baae88df | ||
|
|
1e6865b38e | ||
|
|
42e19bdbd7 | ||
|
|
44049a7e62 | ||
|
|
cbab7fcfea | ||
|
|
727d97a95e | ||
|
|
ae6840dc31 | ||
|
|
eef36a86dc | ||
|
|
8eac6854f5 | ||
|
|
2645704e4d | ||
|
|
de8c0e5070 | ||
|
|
c52b97c89f | ||
|
|
f63177b075 | ||
|
|
d1ae16818e | ||
|
|
50e6fc68f4 | ||
|
|
ef2bc94ac4 | ||
|
|
7a80b64960 | ||
|
|
825c107f2b | ||
|
|
89cd013bd6 | ||
|
|
9d0951f2d7 | ||
|
|
8a5297e61c | ||
|
|
631112ec2f | ||
|
|
c0b58291d2 | ||
|
|
6d9c0036b7 | ||
|
|
f4a30e483c | ||
|
|
19e8346959 | ||
|
|
c3d353867a | ||
|
|
8062aa164a | ||
|
|
79577fadf9 | ||
|
|
458bcdc77e | ||
|
|
d99e16a9be | ||
|
|
2c1983f352 | ||
|
|
f183abfd6a | ||
|
|
c3a1a51f83 | ||
|
|
c4e23fff2b | ||
|
|
6454f5c3f2 | ||
|
|
08a657f8fa | ||
|
|
fb950ce0d5 | ||
|
|
034d61dbaa | ||
|
|
5edbe423b7 | ||
|
|
3220d2d769 | ||
|
|
2bc6223a5f | ||
|
|
63693db502 | ||
|
|
a2c87335ea | ||
|
|
87eaeb5363 | ||
|
|
c7ae114bdf | ||
|
|
968ed87454 | ||
|
|
886f9faaf3 | ||
|
|
f15b229e55 | ||
|
|
2878b23b14 | ||
|
|
d6302ef69d | ||
|
|
1823f4748c | ||
|
|
7c495e9250 | ||
|
|
fcc7633bd0 | ||
|
|
77d490c8fa | ||
|
|
3005a78fbf | ||
|
|
7be8abe541 | ||
|
|
427e27cc74 | ||
|
|
f007536147 | ||
|
|
cf0b1ab2e3 | ||
|
|
302dc219c1 | ||
|
|
7aef25bc38 | ||
|
|
12e61e2ac4 | ||
|
|
0371773312 | ||
|
|
fd913127ab | ||
|
|
bb56953b8d | ||
|
|
5762d24683 | ||
|
|
71a63bc126 | ||
|
|
582c2462ad | ||
|
|
fd55fc78f4 | ||
|
|
0fe880b867 | ||
|
|
95c2ba883a | ||
|
|
fb743a3e27 | ||
|
|
56fa94a6c0 | ||
|
|
7756f1b7f2 | ||
|
|
be525968af | ||
|
|
2e3222d165 | ||
|
|
973651ae3b | ||
|
|
071b885744 | ||
|
|
bedd024310 | ||
|
|
dd14eb51d4 | ||
|
|
caf1b545b8 | ||
|
|
bf0d23f985 | ||
|
|
1f433956b0 | ||
|
|
d949f9d912 | ||
|
|
8f7009f7f2 | ||
|
|
2e4f176a6d | ||
|
|
694f5ed4de | ||
|
|
b882dbf5b9 | ||
|
|
982458f908 | ||
|
|
48e938368e | ||
|
|
9a57fc8cab | ||
|
|
0117c206d6 | ||
|
|
0be78cd2b4 | ||
|
|
304409e520 | ||
|
|
545b4cff3b | ||
|
|
1719d0062c | ||
|
|
1dafae56b9 | ||
|
|
720d8fdddc | ||
|
|
2fa3048632 | ||
|
|
8b02b1eb7e | ||
|
|
c34c7433eb | ||
|
|
2eb11eae36 | ||
|
|
c629ac4600 | ||
|
|
a743a6dee6 | ||
|
|
460aba89f8 | ||
|
|
c465c5a3eb | ||
|
|
18144dffe9 | ||
|
|
f896c7eeae | ||
|
|
74348caba2 | ||
|
|
bd62bcf18b | ||
|
|
42c98ab6c8 | ||
|
|
0ec69ef808 | ||
|
|
59a1c7dcf5 | ||
|
|
c8e2b9ebfe | ||
|
|
aac21de8ae | ||
|
|
db59a7414e | ||
|
|
dd6c7bb240 | ||
|
|
e486cb60bc | ||
|
|
9500c0c776 | ||
|
|
68cde46c9f | ||
|
|
4c37bb0be8 | ||
|
|
3859a66d14 | ||
|
|
486af716be | ||
|
|
c0bffe6dcf | ||
|
|
b4b0bd3a69 | ||
|
|
ae8c6a816a | ||
|
|
e8713cc150 | ||
|
|
e533fe138b | ||
|
|
aa6e7433bc | ||
|
|
90bb834ed1 | ||
|
|
86f292bc00 | ||
|
|
f251532caa | ||
|
|
72a2ec5d85 | ||
|
|
9ba9ff7b17 | ||
|
|
856b482bab | ||
|
|
38cb520533 | ||
|
|
8e9b151720 | ||
|
|
d720b0c631 | ||
|
|
ee957ac447 | ||
|
|
b6972e5890 | ||
|
|
e25f73df9c | ||
|
|
e28bc16c5b | ||
|
|
f95c4cb8bb | ||
|
|
1ee0cac2d9 | ||
|
|
5c19a5499b | ||
|
|
fb9e0bb965 | ||
|
|
1a97d39a61 | ||
|
|
9e37e7adfb | ||
|
|
5c4dca7424 | ||
|
|
5e0efd3caa | ||
|
|
d346b4ba9b | ||
|
|
31071bdd6c | ||
|
|
12e8ae3adb | ||
|
|
49f3b54810 | ||
|
|
e2fdfb6c19 | ||
|
|
dcdaf1e9a0 | ||
|
|
7f5ff80c86 | ||
|
|
171aaf4e8d | ||
|
|
9cc234e979 | ||
|
|
500cf0a542 | ||
|
|
b724a873e9 | ||
|
|
c77c03b751 | ||
|
|
bbd9c931b0 | ||
|
|
7bfabbae52 | ||
|
|
c6db0221c4 | ||
|
|
e1a54c8d10 | ||
|
|
3cba4261fa | ||
|
|
39c03bc2c5 | ||
|
|
22e0811f2c | ||
|
|
d7a3529ead | ||
|
|
7241d18de1 | ||
|
|
bf5d11b44e | ||
|
|
9ee32440ad | ||
|
|
729d43f733 | ||
|
|
0c0482d59c | ||
|
|
00366c63fc | ||
|
|
d8d9e16711 | ||
|
|
a86c9bbd24 | ||
|
|
cb9a33bc14 | ||
|
|
9b0239178c | ||
|
|
1a3e5a816b | ||
|
|
ff21c392f3 | ||
|
|
99637508f9 | ||
|
|
c48e8e5116 | ||
|
|
9b9ec7ad1e | ||
|
|
d7f0682135 | ||
|
|
aa6810479e | ||
|
|
84e44e9759 | ||
|
|
e49440bb73 | ||
|
|
4f45925b23 | ||
|
|
be8da1111e | ||
|
|
2527cce052 | ||
|
|
18939dd676 | ||
|
|
1a645aa637 | ||
|
|
8b67ff4348 | ||
|
|
3a9322c32a | ||
|
|
c8ff4f2262 | ||
|
|
d9fe90785e | ||
|
|
a4fe7b11ee | ||
|
|
863a441fba | ||
|
|
edea55ecd7 | ||
|
|
bdd3fbf67a | ||
|
|
55c86cbdb9 | ||
|
|
4bfdbfb167 | ||
|
|
6ccaefd48d | ||
|
|
fdee9fe213 | ||
|
|
8e6f5fe353 | ||
|
|
aa00851aa4 | ||
|
|
2b85acd861 | ||
|
|
004746d842 | ||
|
|
216784bcc3 | ||
|
|
1cdedb63bd | ||
|
|
49f0382490 | ||
|
|
50f76f501c | ||
|
|
1525ff177f | ||
|
|
2ea7d06455 | ||
|
|
f5ea07ce61 | ||
|
|
ce99003ae1 | ||
|
|
0200c77d7e | ||
|
|
4033fe903d | ||
|
|
4849145b66 | ||
|
|
bfaf2a8f36 | ||
|
|
f8b07fbbac | ||
|
|
08abb7213c | ||
|
|
f31d157ce7 | ||
|
|
868602b5ab | ||
|
|
5d420d7bb7 | ||
|
|
50d2474660 | ||
|
|
92cc078907 | ||
|
|
fe93cf1b9a | ||
|
|
7333bc8f82 | ||
|
|
9f8701ac58 | ||
|
|
55c5c4b362 | ||
|
|
51f2ad15f4 | ||
|
|
f4dd99e8b8 | ||
|
|
485c71abf7 | ||
|
|
c8948bf677 | ||
|
|
77102efc79 | ||
|
|
e64002e9ef | ||
|
|
043a1f5b36 | ||
|
|
bb0637213f | ||
|
|
b3ac7b808d | ||
|
|
ae3616fba8 | ||
|
|
50c22695cd | ||
|
|
7a5badecbf | ||
|
|
21390b3bf6 | ||
|
|
95ee73b7bf | ||
|
|
086a4fda17 | ||
|
|
e131b99b2a | ||
|
|
7dab648426 | ||
|
|
cd2968d0db | ||
|
|
930347763b | ||
|
|
1548b1ebf4 | ||
|
|
7e8039ef0d | ||
|
|
d1c0cc7f47 | ||
|
|
d484c0ebf8 | ||
|
|
8ff4b67307 | ||
|
|
14aa0e7495 | ||
|
|
bf0c1962d9 | ||
|
|
724429c759 | ||
|
|
00d6a6d8c2 | ||
|
|
5d5755af7c | ||
|
|
f373bcafd3 | ||
|
|
91fb452012 | ||
|
|
6e84cdacd1 | ||
|
|
b5da4730a3 | ||
|
|
2726272b68 | ||
|
|
9b8fbc368c | ||
|
|
ac125fa07f | ||
|
|
1f4e9b8eb7 | ||
|
|
5e0a6b43fc | ||
|
|
640dc6721c | ||
|
|
086c418737 | ||
|
|
21a600c569 | ||
|
|
5555498304 | ||
|
|
dd426eb391 | ||
|
|
6ec674deb7 | ||
|
|
8e15876ed5 | ||
|
|
ec0b8b8639 | ||
|
|
e98163546d | ||
|
|
666d9dea2c | ||
|
|
c334a7fe0b | ||
|
|
1f0a9a2c0c | ||
|
|
42f35b8783 | ||
|
|
334da52d65 | ||
|
|
9daf234fef | ||
|
|
a6072a2b76 | ||
|
|
bb4a3f979b | ||
|
|
651808e3dd | ||
|
|
ecc0759032 | ||
|
|
e9a6358d8d | ||
|
|
80ba3f416f | ||
|
|
c4521dfb2f | ||
|
|
b7875715ce | ||
|
|
ff65578160 | ||
|
|
ce2edd18c7 | ||
|
|
f85ea33a98 | ||
|
|
9ff0a9f23e | ||
|
|
d9e4d36c48 | ||
|
|
15d4bfd607 | ||
|
|
b7cfe4b5a6 | ||
|
|
f461ad12fb | ||
|
|
db230015b8 | ||
|
|
1ce0aca43e | ||
|
|
1c0de7be96 | ||
|
|
ec127efd14 | ||
|
|
64e2082f39 | ||
|
|
86306178c5 | ||
|
|
a5274daf1f | ||
|
|
f8ff0d2cb4 | ||
|
|
5f0e06e89c | ||
|
|
e120dab4f2 | ||
|
|
1d71c7b86e | ||
|
|
88bbfc9975 | ||
|
|
9c617f52f6 | ||
|
|
5945ba1c6d | ||
|
|
c89afb6539 | ||
|
|
b544c99344 | ||
|
|
bb0a9b3208 | ||
|
|
718d337c64 | ||
|
|
25dc000e41 | ||
|
|
1f77ab10fc | ||
|
|
ceed7b9d77 | ||
|
|
7ebc888513 | ||
|
|
06b796783c | ||
|
|
cecc66d17b | ||
|
|
c479e904dd | ||
|
|
893c567e35 | ||
|
|
6aecc88543 | ||
|
|
7480c6ac91 | ||
|
|
b5930ec988 | ||
|
|
2f47425d71 | ||
|
|
a0b0182016 | ||
|
|
ea59c6262d | ||
|
|
4a8de5c704 | ||
|
|
8c86b7e323 | ||
|
|
c51569c3b6 | ||
|
|
aef81e78a0 | ||
|
|
ca552c2618 | ||
|
|
55b4052887 | ||
|
|
217d3e39c6 | ||
|
|
a6c9ed61a6 | ||
|
|
fdc6b229a6 | ||
|
|
0b4182d8ad | ||
|
|
afa7fa58d7 | ||
|
|
de93525d7d | ||
|
|
c2c3eaf5a7 | ||
|
|
768f515afc | ||
|
|
7ae1572b39 | ||
|
|
af3950d196 | ||
|
|
03777d2784 | ||
|
|
25e8d3215d | ||
|
|
ba7b405913 | ||
|
|
183f99038a | ||
|
|
388607dc2d | ||
|
|
273d7623a6 | ||
|
|
15703e7fb8 | ||
|
|
37aafafc7d | ||
|
|
c4db6427f4 | ||
|
|
03188dfd50 | ||
|
|
bac7bb82b0 | ||
|
|
d4a01a8524 | ||
|
|
2fdf127a6f | ||
|
|
9f2cd8d5f2 | ||
|
|
f7c7e4cadb | ||
|
|
ff9fc7aa3f | ||
|
|
688f6d1b9d | ||
|
|
7cd06114f1 | ||
|
|
6659396dc6 | ||
|
|
5dc55d66fc | ||
|
|
156ab40baa | ||
|
|
05afcba8e7 | ||
|
|
f38526321b | ||
|
|
288d19ae0a | ||
|
|
779cc0f8d4 | ||
|
|
0af96031de | ||
|
|
84dcdc880f | ||
|
|
57a32b2825 | ||
|
|
690439a295 | ||
|
|
d03df22d4c | ||
|
|
4730528a95 | ||
|
|
1ab395eed3 | ||
|
|
9ea0fff51d | ||
|
|
60963ffe6c | ||
|
|
22e1885d29 | ||
|
|
900584ec7f | ||
|
|
b1d3a4d6cd | ||
|
|
bdaed8f51a | ||
|
|
367c917d80 | ||
|
|
062a5863c0 | ||
|
|
0a2f05f09b | ||
|
|
16106bd1f7 | ||
|
|
2185951cbb | ||
|
|
06c9c4d205 | ||
|
|
8a3bd41416 | ||
|
|
3aced8a7d4 | ||
|
|
e21f147cb9 | ||
|
|
ff33d897d5 | ||
|
|
bb30c3ad73 | ||
|
|
9f34a5beca | ||
|
|
05ce493547 | ||
|
|
bfa3967c70 | ||
|
|
a9cf0f46fc | ||
|
|
cddddbe04c | ||
|
|
9ec2c33e9d | ||
|
|
4648e756a9 | ||
|
|
9dfd6c8779 | ||
|
|
95987aedb2 | ||
|
|
4f7a06cf66 | ||
|
|
8c92d6574c | ||
|
|
d1c5e9706f | ||
|
|
4fc121ad7f | ||
|
|
58c67323da | ||
|
|
f27049afb6 | ||
|
|
da7b2d970d | ||
|
|
a758078ce5 | ||
|
|
20c9225f64 | ||
|
|
2492aba147 | ||
|
|
cc44d7c3d6 | ||
|
|
c138b63720 | ||
|
|
e34d5dd3e8 | ||
|
|
52967f54b9 | ||
|
|
45a1a3037a | ||
|
|
f760f7b6b3 | ||
|
|
67b6b9781f | ||
|
|
5f142e88fb | ||
|
|
011ea824da | ||
|
|
94e6ceec58 | ||
|
|
d391faffe6 | ||
|
|
41ab6de3aa | ||
|
|
7559d17ec1 | ||
|
|
2cc9d8537f | ||
|
|
98c17e6cee | ||
|
|
9b8cdd7fe9 | ||
|
|
66736faf95 | ||
|
|
d63aa79f79 | ||
|
|
52e84a5f0b | ||
|
|
68679a9d0e | ||
|
|
81b97d6f8e | ||
|
|
f42ff6e563 | ||
|
|
3c0d44c580 | ||
|
|
c106213d5c | ||
|
|
e46f133a2b | ||
|
|
668d8f88c1 | ||
|
|
3dece9cd5c | ||
|
|
26cb6a8d20 | ||
|
|
a8b620a91f | ||
|
|
802a410834 | ||
|
|
ed2ea558a8 | ||
|
|
e32ebf58c7 | ||
|
|
276a43792c | ||
|
|
114afad93d | ||
|
|
47ea35f85b | ||
|
|
161db1b519 | ||
|
|
8d2773e188 | ||
|
|
03ab5315d5 | ||
|
|
17479b8a0f | ||
|
|
9c4f6365b8 | ||
|
|
fc25077468 | ||
|
|
3e983d2bc6 | ||
|
|
3daa76dd25 | ||
|
|
5ae27dbe85 | ||
|
|
095595dd61 | ||
|
|
d33ceff2a5 | ||
|
|
61dd954da2 | ||
|
|
70432e3bef | ||
|
|
18e06aefee | ||
|
|
659a5ca923 | ||
|
|
dcb20d8fd6 | ||
|
|
488f38424e | ||
|
|
7323b80041 | ||
|
|
a14adbcafe | ||
|
|
0570451948 | ||
|
|
c1170b27fc | ||
|
|
01ad5f9b94 | ||
|
|
97301cbc36 | ||
|
|
92600eeb76 | ||
|
|
a731bd9f44 | ||
|
|
af2589e943 | ||
|
|
6b0adb932b | ||
|
|
4308ba9e42 | ||
|
|
87b3063593 | ||
|
|
6d4e490ae1 | ||
|
|
2fa25b8799 | ||
|
|
35839a5f96 | ||
|
|
0f88e33c05 | ||
|
|
ee5fe8f38d | ||
|
|
2c486990c6 | ||
|
|
cf2fe4d2da | ||
|
|
c3b452be51 | ||
|
|
1a920b4b19 | ||
|
|
e964bb3779 | ||
|
|
fd5f2b33a9 | ||
|
|
3d8e6218ef | ||
|
|
f713b0d8b0 | ||
|
|
c0eb65d6be | ||
|
|
71d140e992 | ||
|
|
1cabc773e4 | ||
|
|
6708c4d24d | ||
|
|
c663066261 | ||
|
|
f19bd6bf3f | ||
|
|
033bea7a29 | ||
|
|
5112f925df | ||
|
|
152bcb4e6d | ||
|
|
c6a8a1bf04 | ||
|
|
ea23f45b36 | ||
|
|
e0217033e4 | ||
|
|
1e8876bdad | ||
|
|
f49b5760eb | ||
|
|
f89ebf69bf | ||
|
|
c96af79b53 | ||
|
|
3df90156fd | ||
|
|
0c52aed751 | ||
|
|
a9a4668b92 | ||
|
|
bb2f10122c | ||
|
|
1544debc9f | ||
|
|
240b4d18e3 | ||
|
|
49664eb29a | ||
|
|
e7155c5f3d | ||
|
|
fc069fb51b | ||
|
|
18843133b8 | ||
|
|
ef667d12e1 | ||
|
|
b8547bbff0 | ||
|
|
51eac9d194 | ||
|
|
a4ef92e0ec | ||
|
|
ca2cd45607 | ||
|
|
b79c07099f | ||
|
|
a9b5596a02 | ||
|
|
935a58c3a2 | ||
|
|
753e0cf3dd | ||
|
|
bd55197721 | ||
|
|
1abd496ccf | ||
|
|
a3ad6e8426 | ||
|
|
193021f8f6 | ||
|
|
fd2483fe83 | ||
|
|
040839d34b | ||
|
|
3f67551437 | ||
|
|
80aadb9e77 | ||
|
|
395e90b16b | ||
|
|
be563c3140 | ||
|
|
41f25857bb | ||
|
|
f63d9b778f | ||
|
|
8ea1d52d7a | ||
|
|
c511afe310 | ||
|
|
77e48a2801 | ||
|
|
9220edbf14 | ||
|
|
8d9da24365 | ||
|
|
fdc6323b34 | ||
|
|
92d2462660 | ||
|
|
c61f4fe7b3 | ||
|
|
7de39b3377 | ||
|
|
3d67565aed | ||
|
|
accaef402b | ||
|
|
e7b71d3932 | ||
|
|
157ab1fd10 | ||
|
|
5a6bacea03 | ||
|
|
d39c73dba2 | ||
|
|
614a83e555 | ||
|
|
fd631013d9 | ||
|
|
fe2506a5ff | ||
|
|
5f2c98c566 | ||
|
|
c2176e0843 | ||
|
|
eb4e27f356 | ||
|
|
25eff603b1 | ||
|
|
2c09220992 | ||
|
|
c85abb1789 | ||
|
|
42bf45cee1 | ||
|
|
e2c593c928 | ||
|
|
d3f8b43799 | ||
|
|
9c6c9f8fcd | ||
|
|
5f607a11a9 | ||
|
|
3a2a0b1c4c | ||
|
|
f6cf0fce5c | ||
|
|
6809236f2b | ||
|
|
5c988b679e | ||
|
|
ad54620a27 | ||
|
|
4382065fad | ||
|
|
b298ce0dd0 | ||
|
|
af1432d9a8 | ||
|
|
68b0858da6 | ||
|
|
e572e41cff | ||
|
|
f133f366e2 | ||
|
|
37a4fa83fb | ||
|
|
ac73fa6482 | ||
|
|
f695a4c3b6 | ||
|
|
9c90d59fc0 | ||
|
|
dd15de6bda | ||
|
|
d98f4b5a6a | ||
|
|
ba0a3f5673 | ||
|
|
7ad4a8f0b5 | ||
|
|
e62a2145bb | ||
|
|
6d47746e5a | ||
|
|
c81a6322c1 | ||
|
|
36bc1fb617 | ||
|
|
fdd1cf4772 | ||
|
|
20156b84eb | ||
|
|
261860cfec | ||
|
|
c6fa04834c | ||
|
|
9b4f865e5d | ||
|
|
b3140b0218 | ||
|
|
4a27c8a032 | ||
|
|
faaaabb640 | ||
|
|
8b9c2fbc66 | ||
|
|
bed6a98112 | ||
|
|
5d0e8a70bb | ||
|
|
40e365b239 | ||
|
|
45894683e9 | ||
|
|
26d4841366 | ||
|
|
7fd1152dea | ||
|
|
c2187f4f17 | ||
|
|
10198da7d0 | ||
|
|
66aa7f76d8 | ||
|
|
4fb6c33182 | ||
|
|
6f8da6f3b3 | ||
|
|
398b912ca5 | ||
|
|
ffb1961064 | ||
|
|
991af2d2f0 | ||
|
|
7c5adc1bb8 | ||
|
|
2413a30578 | ||
|
|
840d327139 | ||
|
|
8ea2a50279 | ||
|
|
69a24f699d | ||
|
|
ac9dd33e9a | ||
|
|
9ebca1715b | ||
|
|
fa0e1a6363 | ||
|
|
c6b71544a4 | ||
|
|
7e94fe102c | ||
|
|
8879087461 | ||
|
|
11260dc9d7 | ||
|
|
4a7e9488dd | ||
|
|
53532f9ec2 | ||
|
|
263c27f1ea | ||
|
|
b1593177fd | ||
|
|
983479603c | ||
|
|
cbd263dafe | ||
|
|
75efe4efbb | ||
|
|
fcace76909 | ||
|
|
4fc8d5412d | ||
|
|
7a7c43c72b | ||
|
|
9c7635228f | ||
|
|
0aa95a722a | ||
|
|
35ae0bfaa2 | ||
|
|
552da2b7f2 | ||
|
|
10c80a1344 | ||
|
|
948c33ba88 | ||
|
|
ed36254fcc | ||
|
|
4b541216e3 | ||
|
|
532ec10636 | ||
|
|
01f0478750 | ||
|
|
c8d4018067 | ||
|
|
04e25c59f7 | ||
|
|
b99ce6c644 | ||
|
|
eb09c03ae1 | ||
|
|
55d7aa9142 | ||
|
|
9d20219f73 | ||
|
|
5173670675 | ||
|
|
d4a0d6f6a5 | ||
|
|
8aa0debb6e | ||
|
|
4b5fb9c99b | ||
|
|
d631657862 | ||
|
|
385729ef2a | ||
|
|
984380543e | ||
|
|
e9d17fba59 | ||
|
|
e7609d54be | ||
|
|
af8557850b | ||
|
|
3df73b303e | ||
|
|
b7e4606a73 | ||
|
|
8fc9bfc66e | ||
|
|
4b2f06a0fa | ||
|
|
77e3df17cc | ||
|
|
6cfa5ae855 | ||
|
|
7ec507dec2 | ||
|
|
fd66d44562 | ||
|
|
50ac9e5aef | ||
|
|
ac4554b8c8 | ||
|
|
2cd330b733 | ||
|
|
33db0681c8 | ||
|
|
ddd2ce19ec | ||
|
|
f1f5996447 | ||
|
|
215e66b8d6 | ||
|
|
d956ec06f2 | ||
|
|
24bbf22171 | ||
|
|
9675190c46 | ||
|
|
eef3cdf70b | ||
|
|
bdde9d0aa2 | ||
|
|
2108d66d2b | ||
|
|
1306b02625 | ||
|
|
7cb5be80be | ||
|
|
bcf2e083cc | ||
|
|
ed7d034849 | ||
|
|
f834ec6410 | ||
|
|
7ce83ed0ca | ||
|
|
f9712217d8 | ||
|
|
e54ec4b8d2 | ||
|
|
7145b24e59 | ||
|
|
2b51649f74 | ||
|
|
a0a0428b34 | ||
|
|
1ae32f0c2d | ||
|
|
afaecf4140 | ||
|
|
16add2cb7a | ||
|
|
2475dbc759 | ||
|
|
bc517aaa2a | ||
|
|
9547f33a8e | ||
|
|
8d1923852a | ||
|
|
90175ea1d8 | ||
|
|
c6f204ab79 | ||
|
|
55090ad3f8 | ||
|
|
2e9cafa7e5 | ||
|
|
c9d1212cf2 | ||
|
|
be72d3fe1b | ||
|
|
f3627d1d8d | ||
|
|
6cd12c25ee | ||
|
|
3d913d6143 | ||
|
|
f757c17b2f | ||
|
|
bf496a03cf | ||
|
|
d558e94c93 | ||
|
|
a6a0ae3e74 | ||
|
|
16f626702d | ||
|
|
bdfee70cec | ||
|
|
b6813a0898 | ||
|
|
aa55dcf8f5 | ||
|
|
d92f023f4d | ||
|
|
a51420ddc8 | ||
|
|
90dce5bec5 | ||
|
|
ef6658864a | ||
|
|
af4be723b2 | ||
|
|
d4223acfed | ||
|
|
e7a663d137 | ||
|
|
01ef5c86f1 | ||
|
|
34c712bae0 | ||
|
|
93ca6a350e | ||
|
|
008dc0c248 | ||
|
|
bfd4ad90ed | ||
|
|
06049c7753 | ||
|
|
98f4eed1d4 | ||
|
|
1baeaf9201 | ||
|
|
e2b1618571 | ||
|
|
f70be2a9a7 | ||
|
|
c1e7c349c5 | ||
|
|
692fc9d24a | ||
|
|
6b0b91474a | ||
|
|
43e6623c3d | ||
|
|
13e162eb04 | ||
|
|
05e397b330 | ||
|
|
283efd226d | ||
|
|
4be86f6c14 | ||
|
|
56107bb783 | ||
|
|
49ad4ad943 | ||
|
|
3744c31519 | ||
|
|
34c7b71a89 | ||
|
|
fcb3b7d6b9 | ||
|
|
a7851234a7 | ||
|
|
79dcd3c4cf | ||
|
|
e7605bb420 | ||
|
|
6eb3a0ff12 | ||
|
|
856dafbe36 | ||
|
|
c4ba0d56d2 | ||
|
|
998c64cc5d | ||
|
|
81586fed7d | ||
|
|
d2549b91aa | ||
|
|
5e63f36507 | ||
|
|
9f2275ec67 | ||
|
|
c23bb9ce4f | ||
|
|
339702a044 | ||
|
|
bd731f1ed3 | ||
|
|
309e5aacc1 | ||
|
|
67acb0fa9e | ||
|
|
6d7d365d3c | ||
|
|
63610854d5 | ||
|
|
827b79d6c1 | ||
|
|
b7010976f0 | ||
|
|
6faa5e5bc4 | ||
|
|
03caef107a | ||
|
|
8650dda505 | ||
|
|
35876e07b3 | ||
|
|
0cb305a4f8 | ||
|
|
17c7216ee0 | ||
|
|
5a0738d82d | ||
|
|
beed320140 | ||
|
|
97ab5eb4d4 | ||
|
|
694406816b | ||
|
|
96f815aa74 | ||
|
|
12e5f25ced | ||
|
|
3835ea2241 | ||
|
|
b5b59b7ee6 | ||
|
|
169ce6948d | ||
|
|
ed8ccb2911 | ||
|
|
b36e230373 | ||
|
|
956681d54a | ||
|
|
736588313d | ||
|
|
f660a474af | ||
|
|
c8ee823db0 | ||
|
|
39d29d68b2 | ||
|
|
842fa7a716 | ||
|
|
839512558f | ||
|
|
f142761ab8 | ||
|
|
375f71522b | ||
|
|
2fb7ff2f43 | ||
|
|
d5b75a2768 | ||
|
|
2a4f59ce8f | ||
|
|
0d29b1ef72 | ||
|
|
306918850b | ||
|
|
6695acbd23 | ||
|
|
3871b272fd | ||
|
|
a630f7cf1d | ||
|
|
98536a9d8b | ||
|
|
eb15881a94 | ||
|
|
9aea9970bb | ||
|
|
7ce609a045 | ||
|
|
8d5ade4cef | ||
|
|
8e5d7f67ef | ||
|
|
1c3f186c11 | ||
|
|
cea7bd34ca | ||
|
|
6cd646e939 | ||
|
|
e506353517 | ||
|
|
c7c6ddf6e1 | ||
|
|
0eb7973e96 | ||
|
|
1d6714eea4 | ||
|
|
5849307944 | ||
|
|
e2dd22e13f | ||
|
|
4bbff1f82d | ||
|
|
ba1e0fbf46 | ||
|
|
d78df15074 | ||
|
|
77821ecb75 | ||
|
|
8fdf6abb81 | ||
|
|
2070287f64 | ||
|
|
35382136b4 | ||
|
|
875814b68b | ||
|
|
591b6e7d59 | ||
|
|
d3a2e6852c | ||
|
|
65b0cbbfeb | ||
|
|
95122f3209 | ||
|
|
16670b2d42 | ||
|
|
6c7c785e9d | ||
|
|
14b549692e | ||
|
|
4affc10629 | ||
|
|
6b398307a3 | ||
|
|
eb8f7ccead | ||
|
|
2ed8d327b8 | ||
|
|
f7b9d75e18 | ||
|
|
5295f6e657 | ||
|
|
eaa9026f2d | ||
|
|
5360b2e876 | ||
|
|
55f12ed0bb | ||
|
|
18d55a08b3 | ||
|
|
29db4eaa2c | ||
|
|
9c9d4b2177 | ||
|
|
0c51c2b3dc | ||
|
|
6a547ff74b | ||
|
|
a21aa4991d | ||
|
|
a97cbb59e2 | ||
|
|
3ae6ab890d | ||
|
|
7bd89a17dd | ||
|
|
18a5dc440f | ||
|
|
c7050f9f93 | ||
|
|
093b043bca | ||
|
|
57a3edd204 | ||
|
|
a712b3f5f4 | ||
|
|
0ec6f5f3e9 | ||
|
|
debdc829df | ||
|
|
4214d95e6f | ||
|
|
5eaeb31845 | ||
|
|
2c92e3f983 | ||
|
|
e566262369 | ||
|
|
6ea06ad338 | ||
|
|
8fb3f4a199 | ||
|
|
e1c35b0f16 | ||
|
|
0faa05d744 | ||
|
|
82e8134fc6 | ||
|
|
70e5f19ff8 | ||
|
|
5cd68e4606 | ||
|
|
7917d26b57 | ||
|
|
0cc6d8fccf | ||
|
|
ab84d192be | ||
|
|
73bf754530 | ||
|
|
d20ee838f0 | ||
|
|
c687f71c5a | ||
|
|
8994f31b03 | ||
|
|
7a16fdbd27 | ||
|
|
4978b31363 | ||
|
|
20a2136350 | ||
|
|
2dfed948a1 | ||
|
|
8b5cb40c24 | ||
|
|
1d819f780c | ||
|
|
296bc367dc | ||
|
|
794f365e4e | ||
|
|
d9afe5c129 | ||
|
|
6c44faecfd | ||
|
|
544be4d557 | ||
|
|
9a2babf4b6 | ||
|
|
b89acbbc31 | ||
|
|
b37cbba31d | ||
|
|
562fa5b78f | ||
|
|
1fcbd36e6d | ||
|
|
7be4d4640a | ||
|
|
7802d1e61c | ||
|
|
65029af613 | ||
|
|
f600d3e481 | ||
|
|
ada8f84019 | ||
|
|
73cac507ad | ||
|
|
063c192a12 | ||
|
|
b2576fd44f | ||
|
|
48c8f7c55b | ||
|
|
b05115978c | ||
|
|
bb74381c49 | ||
|
|
dc8e2ab453 | ||
|
|
c71f17295c | ||
|
|
4033a44b95 | ||
|
|
6f533a3d8a | ||
|
|
1bfe97474f | ||
|
|
ae6d79eae3 | ||
|
|
71a5313fc5 | ||
|
|
7daca337be | ||
|
|
da497ecb88 | ||
|
|
655a3126a2 | ||
|
|
ae0519643e | ||
|
|
f01f0ff5e0 | ||
|
|
8e64a1c73f | ||
|
|
c4fc154089 | ||
|
|
de38a0eca4 | ||
|
|
da85b57c61 | ||
|
|
514996363e | ||
|
|
4e4a4036cf | ||
|
|
680e256d17 | ||
|
|
a50d3f2029 | ||
|
|
8c761c73ad | ||
|
|
f8721992dd | ||
|
|
525bb0ed7e | ||
|
|
fe18a0e9b1 | ||
|
|
ec46829b38 | ||
|
|
03d440e1c0 | ||
|
|
a412c510d4 | ||
|
|
ac07cbb0ca | ||
|
|
ce2ae19703 | ||
|
|
ca8772a059 | ||
|
|
23a44e86ce | ||
|
|
5c5c577359 | ||
|
|
15675d6f49 | ||
|
|
4cb293e5a1 | ||
|
|
c3e88c6d59 | ||
|
|
d39471b761 | ||
|
|
ddcf71c483 | ||
|
|
28624bb7f6 | ||
|
|
d74b967c9e | ||
|
|
cdb8029c39 | ||
|
|
8ef253d9dc | ||
|
|
d91ac3b7b8 | ||
|
|
08f7cfae71 | ||
|
|
dd734b5a5d | ||
|
|
d8b14bd700 | ||
|
|
4e395f36af | ||
|
|
b9ad07ca0b | ||
|
|
6497cc956c | ||
|
|
ee3e6f12ae | ||
|
|
4f7f46d0b8 | ||
|
|
991ca2274f | ||
|
|
b72ea915ab | ||
|
|
055f1f483e | ||
|
|
a493c51949 | ||
|
|
45cb9dc7b1 | ||
|
|
45f5605f38 | ||
|
|
6c3558c2ac | ||
|
|
0dd36fd9f5 | ||
|
|
d07f529652 | ||
|
|
cb6d34ee25 | ||
|
|
00cc762934 | ||
|
|
409f64d09d | ||
|
|
5367710045 | ||
|
|
e5343487ac | ||
|
|
f0e94729bf | ||
|
|
673dee58ad | ||
|
|
9b16b3d7b8 | ||
|
|
51a711b609 | ||
|
|
022e5db8ec | ||
|
|
a29eb8c1d2 | ||
|
|
c16bb3d7c9 | ||
|
|
aaba243f41 | ||
|
|
41226129d7 | ||
|
|
17384705d3 | ||
|
|
5e489050e1 | ||
|
|
4100b87e38 | ||
|
|
5f6f1ab107 | ||
|
|
de713235ed | ||
|
|
6e2cd3fcfe | ||
|
|
b686c05f3b | ||
|
|
174f00fe03 | ||
|
|
4f1947c729 | ||
|
|
50c811c210 | ||
|
|
614614c89e | ||
|
|
4de8da30d0 | ||
|
|
2e23a75ff4 | ||
|
|
02a5c36cb9 | ||
|
|
f380b6b5da | ||
|
|
641bf4653a | ||
|
|
fd7b8ff912 | ||
|
|
4dd722e870 | ||
|
|
25e38548cb | ||
|
|
d8f5916a72 | ||
|
|
b27ae49ada | ||
|
|
7c9dd72b76 | ||
|
|
95b4b3ea3e | ||
|
|
2615ec3dee | ||
|
|
e4871a4a2c | ||
|
|
0dbe08cba2 | ||
|
|
f81e612976 | ||
|
|
2e828c812c | ||
|
|
3748fb07e8 | ||
|
|
251c2a2383 | ||
|
|
6cf87a7740 | ||
|
|
83638d2232 | ||
|
|
af69bece5b | ||
|
|
58637340e8 | ||
|
|
a3d0b7e43f | ||
|
|
07391c8f28 | ||
|
|
90741703de | ||
|
|
a962c4e340 | ||
|
|
20da71fb75 | ||
|
|
e8295e70af | ||
|
|
8954a0486c | ||
|
|
c36139bd55 | ||
|
|
41335dc90f | ||
|
|
33ccce8047 | ||
|
|
5b71dbb4e2 | ||
|
|
375cf41b62 | ||
|
|
f142b06770 | ||
|
|
e88e587c30 | ||
|
|
15c23426d8 | ||
|
|
bd59a23e0a | ||
|
|
ddc78bc5c0 | ||
|
|
8cd8c85017 | ||
|
|
d88973feba | ||
|
|
5410ce07eb | ||
|
|
4e855de5ae | ||
|
|
9053c5eadd | ||
|
|
016d0be3e0 | ||
|
|
97b8a7cd4d | ||
|
|
37f5e2f175 | ||
|
|
40ebc2a27b | ||
|
|
80f831e167 | ||
|
|
7e85b2bdde | ||
|
|
6cd84e1a15 | ||
|
|
f65be7ff50 | ||
|
|
7095c25d75 | ||
|
|
7df75cd38f | ||
|
|
58613036fb | ||
|
|
27cdd59feb | ||
|
|
9baa62f093 | ||
|
|
e651db5cf1 | ||
|
|
0314da12d0 | ||
|
|
4789b8eb3b | ||
|
|
e549631cee | ||
|
|
5d0ac38b24 | ||
|
|
a50bd94a0e | ||
|
|
fc410b16fc | ||
|
|
e730be9eec | ||
|
|
a55180af39 | ||
|
|
21f011822d | ||
|
|
9e7b94e7c1 | ||
|
|
16eac635ae | ||
|
|
41ffdb4fc4 | ||
|
|
508a9c3ebd | ||
|
|
a840f429e7 | ||
|
|
359a28fc69 | ||
|
|
ebb708b068 | ||
|
|
d6fed23482 | ||
|
|
27c7538eb2 | ||
|
|
9aee6dce1a | ||
|
|
9147eae986 | ||
|
|
be0abad331 | ||
|
|
47fa22b5cf | ||
|
|
b85d1443b7 | ||
|
|
afae8d98c5 | ||
|
|
373784fb86 | ||
|
|
51b63d6b5a | ||
|
|
6003d9ad36 | ||
|
|
120f6a9bf2 | ||
|
|
9ba824a27a | ||
|
|
ccde6eef9c | ||
|
|
93f50df68d | ||
|
|
4cc3aa052d | ||
|
|
b9c7ee9733 | ||
|
|
0b3d1b1e47 | ||
|
|
bd77e7d0f8 | ||
|
|
5d9bc065f5 | ||
|
|
147e4bc66f | ||
|
|
d71fc18027 | ||
|
|
065b04628f | ||
|
|
b2131fd973 | ||
|
|
507b8cd4ba | ||
|
|
3fbd4431f9 | ||
|
|
12cbd70562 | ||
|
|
c69e47414c | ||
|
|
e085d9bccb | ||
|
|
a7047d2243 | ||
|
|
a984c1329f | ||
|
|
db403663f7 | ||
|
|
75a30c7233 | ||
|
|
fdc3a171dc | ||
|
|
f57ac2fa05 | ||
|
|
b2a98beaee | ||
|
|
753450e21e | ||
|
|
c81b7d7156 | ||
|
|
f116d23398 | ||
|
|
0d9704fa7b | ||
|
|
5650d9fdd1 | ||
|
|
da3e324e7f | ||
|
|
7cf0a8601a | ||
|
|
e2e2111b1c | ||
|
|
55320820ba | ||
|
|
9af1962986 | ||
|
|
675d254b15 | ||
|
|
9901a6f0cd | ||
|
|
3a70279b7d | ||
|
|
ae635f837b | ||
|
|
e8fe75a589 | ||
|
|
14dbf42db8 | ||
|
|
5c29f19331 | ||
|
|
c185f97956 | ||
|
|
1652d1f3b4 | ||
|
|
02f9791e19 | ||
|
|
a27d6d90ec | ||
|
|
89d758c378 | ||
|
|
335786915a | ||
|
|
c8ac633540 | ||
|
|
81b7c2abc1 | ||
|
|
a2aed8eff2 | ||
|
|
e931611837 | ||
|
|
898b8673ed | ||
|
|
58d49c3af9 | ||
|
|
dcfe521fce | ||
|
|
434d35cf62 | ||
|
|
6cf9a9015d | ||
|
|
11eb34e8ee | ||
|
|
4eccd8094e | ||
|
|
f3fba1ee12 | ||
|
|
802968443e | ||
|
|
d50bdd0a16 | ||
|
|
80960e148b | ||
|
|
fcbde2dad4 | ||
|
|
9f85f6d66a | ||
|
|
5ed73ea30b | ||
|
|
2cf6676651 | ||
|
|
2e2e65b576 | ||
|
|
ebcfd99797 | ||
|
|
3d4145a7e3 | ||
|
|
fb93430ba6 | ||
|
|
ba122bc645 | ||
|
|
6e8529a62b | ||
|
|
680d2326a6 | ||
|
|
a6673450df | ||
|
|
af51b8fd42 | ||
|
|
4c1ca75177 | ||
|
|
d58428d3bd | ||
|
|
03a87edd97 | ||
|
|
5454f01e04 | ||
|
|
d88510d0b9 | ||
|
|
bfd27eda54 | ||
|
|
fd65c1661b | ||
|
|
bdf7cdd073 | ||
|
|
e0018cc874 | ||
|
|
314c4c6874 | ||
|
|
9ea095c41c | ||
|
|
3da7a2c23e | ||
|
|
f4e68f2504 | ||
|
|
dab83e9889 | ||
|
|
e1b7458984 | ||
|
|
c16d330371 | ||
|
|
8963c524d7 | ||
|
|
77b9675c4b | ||
|
|
bd45fa6a8f | ||
|
|
31ee5eca0d | ||
|
|
c5bcca7bab | ||
|
|
1ec334a99f | ||
|
|
073788340b | ||
|
|
0d90cd59dc | ||
|
|
fd52bf2bd8 | ||
|
|
61463cbc2a | ||
|
|
f902cf4675 | ||
|
|
9f83137631 | ||
|
|
7c811718a7 | ||
|
|
5d51f8ee55 | ||
|
|
fe3200ed07 | ||
|
|
8c16118248 | ||
|
|
b2e297ed27 | ||
|
|
2ebb360d0e | ||
|
|
cc2abd5275 | ||
|
|
4ec67e7df3 | ||
|
|
3033a27023 | ||
|
|
ed264ac576 | ||
|
|
0394a52b81 | ||
|
|
5301c168e4 | ||
|
|
5ec97e6b22 | ||
|
|
3bd2828386 | ||
|
|
3cc7a5f2a8 | ||
|
|
b71f73322a | ||
|
|
8f73c27ca6 | ||
|
|
1fc6e75705 | ||
|
|
974e2188cc | ||
|
|
aae2d28e7f | ||
|
|
106c57d48f | ||
|
|
7801f96096 | ||
|
|
a5d3a242d1 | ||
|
|
1800daed83 | ||
|
|
1fc9449e0d | ||
|
|
9ebf68f5f8 | ||
|
|
33b0617d99 | ||
|
|
e9b28977a5 | ||
|
|
c15ae34535 | ||
|
|
529bfcae52 | ||
|
|
d70ac295c4 | ||
|
|
d15c493713 | ||
|
|
07bec98624 | ||
|
|
f389c07436 | ||
|
|
fb90dd014c | ||
|
|
3a90b70eac | ||
|
|
d4cfbfd310 | ||
|
|
cd8d0410fd | ||
|
|
2c95d3c427 | ||
|
|
4c85a6c5ba | ||
|
|
a623b65a98 | ||
|
|
5bc9ba45bf | ||
|
|
b4664a5796 | ||
|
|
e7a0f547f8 | ||
|
|
2ec9fdbe8d | ||
|
|
293086db3f | ||
|
|
435d875a02 | ||
|
|
14d6306385 | ||
|
|
8ae87f8762 | ||
|
|
9e7f020233 | ||
|
|
45bf902713 | ||
|
|
837d371f50 | ||
|
|
0debfe1163 | ||
|
|
3652c75a5d | ||
|
|
8d9de08fc9 | ||
|
|
78d474a58e | ||
|
|
07b7ac10b6 | ||
|
|
08fa24dd93 | ||
|
|
47d920fd66 | ||
|
|
af153a37f0 | ||
|
|
e6c6bdc2d9 | ||
|
|
594e183737 | ||
|
|
2832208fc5 | ||
|
|
769be40253 | ||
|
|
c31d9b7850 | ||
|
|
6e9a4ec6e6 | ||
|
|
179effddf3 | ||
|
|
6c0b8b370b | ||
|
|
7f6afc578c | ||
|
|
82ac093b6b | ||
|
|
20c0cd2a88 | ||
|
|
caa461e493 | ||
|
|
558795b066 | ||
|
|
755958ac16 | ||
|
|
00beb9dbce | ||
|
|
5302361ece | ||
|
|
f96922968f | ||
|
|
26a1202ee0 | ||
|
|
915c446634 | ||
|
|
be66394313 | ||
|
|
6eee55fde4 | ||
|
|
8a86509e4b | ||
|
|
610e0c36ec | ||
|
|
dbaedcda20 | ||
|
|
7c79b7026b | ||
|
|
248fcb16be | ||
|
|
cda63e432c | ||
|
|
bc6120892a | ||
|
|
5eae9a11dd | ||
|
|
89f833b5d0 | ||
|
|
8ab3132acb | ||
|
|
b35690c4b9 | ||
|
|
d1245e43e4 | ||
|
|
98bd51e9ad | ||
|
|
8455b5b0c1 | ||
|
|
29ec528c42 | ||
|
|
abe964d237 | ||
|
|
7a974d0ef1 | ||
|
|
33b6f2a71a | ||
|
|
4b6f7554c0 | ||
|
|
bfaac17306 | ||
|
|
4f0b31cf5d | ||
|
|
d7ded80028 | ||
|
|
2c11564d0a | ||
|
|
d6ee6ce580 | ||
|
|
941047121f | ||
|
|
72b7ea5d77 | ||
|
|
59a18f6a83 | ||
|
|
d708e20b12 | ||
|
|
81bf1d581d | ||
|
|
463ccd8283 | ||
|
|
d9e33dbaec | ||
|
|
9831d1492d | ||
|
|
cb228e9002 | ||
|
|
48099d9569 | ||
|
|
0b717a898b | ||
|
|
8a19278ac8 | ||
|
|
241a5e6798 | ||
|
|
21c8c2ba44 | ||
|
|
b59c0d1274 | ||
|
|
3d4fe01bb6 | ||
|
|
da110d3f59 | ||
|
|
01a12a109a | ||
|
|
f201adbbdb | ||
|
|
416fb87dff | ||
|
|
8d2075dd85 | ||
|
|
03851bac05 | ||
|
|
4ef373153a | ||
|
|
854c4614e9 | ||
|
|
a5f2931544 | ||
|
|
b17bfef199 | ||
|
|
f06e6a7802 | ||
|
|
32733912f1 | ||
|
|
c52b6d3fc0 | ||
|
|
f6534cb075 | ||
|
|
1574ad43b2 | ||
|
|
6e05f972a1 | ||
|
|
af3aa7d9fc | ||
|
|
037483602a | ||
|
|
9ba6732230 | ||
|
|
d190f54321 | ||
|
|
608a52b9b9 | ||
|
|
8a185f8107 | ||
|
|
f6fec8adf1 | ||
|
|
d7ac826f89 | ||
|
|
d88ac3a972 | ||
|
|
aaf5c39690 | ||
|
|
07e278c9d4 | ||
|
|
f48a7e5f78 | ||
|
|
16ea198a13 | ||
|
|
1e219b65bf | ||
|
|
ec36147dbf | ||
|
|
e31196d184 | ||
|
|
cea50a67e1 | ||
|
|
41a0f1c59b | ||
|
|
9c5c168394 | ||
|
|
0f5232c5d2 | ||
|
|
a920cec9aa | ||
|
|
dd68136bd9 | ||
|
|
174c207381 | ||
|
|
f16e2e6650 | ||
|
|
bbcb203900 | ||
|
|
40e65a119d | ||
|
|
e58c52ae7e | ||
|
|
bd49c212c3 | ||
|
|
03222e4d82 | ||
|
|
54e893af56 | ||
|
|
07075670c3 | ||
|
|
a6df543348 | ||
|
|
857e1a6b30 | ||
|
|
05eadd933c | ||
|
|
4c5cf3125f | ||
|
|
1fe950b9a6 | ||
|
|
54a2a9dd13 | ||
|
|
6df2d4c33c | ||
|
|
5555b1c3a8 | ||
|
|
fcc8f8fbd0 | ||
|
|
2827407d43 | ||
|
|
d9d34ae282 | ||
|
|
e3718c88b2 | ||
|
|
4bab2c1afd | ||
|
|
7ad332abf8 | ||
|
|
4b7ea20437 | ||
|
|
ea17af230a | ||
|
|
ab37eae5cb | ||
|
|
1019c662a5 | ||
|
|
f16941595a | ||
|
|
46d3edd8c1 | ||
|
|
81cd0ebfa0 | ||
|
|
516eacd03f | ||
|
|
df34134534 | ||
|
|
a022fb30d0 | ||
|
|
ded0b2efba | ||
|
|
f3ba6741ec | ||
|
|
ed84676c15 | ||
|
|
bcaf766768 | ||
|
|
5386b85b15 | ||
|
|
d32b02e1ca | ||
|
|
dde44ae7b2 | ||
|
|
b12880ce40 | ||
|
|
c60242c944 | ||
|
|
65995b5c4f | ||
|
|
a8bb6a9eca | ||
|
|
b391a7a372 | ||
|
|
4a15ca11e7 | ||
|
|
cb8e121ca9 | ||
|
|
6caa25e9f6 | ||
|
|
6c46b47b75 | ||
|
|
c03f73a3b3 | ||
|
|
d483bd4ecc | ||
|
|
57c012b007 | ||
|
|
2eced40646 | ||
|
|
1102505d22 | ||
|
|
e6659bd69f |
No files matched your search
@@ -1,156 +1,9 @@
|
||||
define ____executor_globals
|
||||
if basic_functions_module.zts
|
||||
set $tsrm_ls = ts_resource_ex(0, 0)
|
||||
set $eg = ((zend_executor_globals) (*((void ***) $tsrm_ls))[executor_globals_id-1])
|
||||
set $cg = ((zend_compiler_globals) (*((void ***) $tsrm_ls))[compiler_globals_id-1])
|
||||
else
|
||||
set $eg = executor_globals
|
||||
set $cg = compiler_globals
|
||||
end
|
||||
end
|
||||
|
||||
document ____executor_globals
|
||||
portable way of accessing executor_globals, set $eg
|
||||
this also sets compiler_globals to $cg
|
||||
ZTS detection is automatically based on ext/standard module struct
|
||||
end
|
||||
|
||||
define printztype
|
||||
____printz_type $arg0
|
||||
printf "\n"
|
||||
end
|
||||
|
||||
document printztype
|
||||
prints the type name of a zval type
|
||||
end
|
||||
|
||||
define ____printz_type
|
||||
set $type = $arg0
|
||||
if $type == 0
|
||||
printf "NULL"
|
||||
end
|
||||
if $type == 1
|
||||
printf "long"
|
||||
end
|
||||
if $type == 2
|
||||
printf "double"
|
||||
end
|
||||
if $type == 3
|
||||
printf "bool"
|
||||
end
|
||||
if $type == 4
|
||||
printf "array"
|
||||
end
|
||||
if $type == 5
|
||||
printf "object"
|
||||
end
|
||||
if $type == 6
|
||||
printf "string"
|
||||
end
|
||||
if $type == 7
|
||||
printf "resource"
|
||||
end
|
||||
if $type == 8
|
||||
printf "constant"
|
||||
end
|
||||
if $type == 9
|
||||
printf "const_array"
|
||||
end
|
||||
if $type == 10
|
||||
printf "unicode string"
|
||||
end
|
||||
if $type > 10
|
||||
printf "unknown type %d", $type
|
||||
end
|
||||
end
|
||||
|
||||
define printzv
|
||||
set $ind = 1
|
||||
____printzv $arg0 0
|
||||
end
|
||||
|
||||
document printzv
|
||||
prints zval contents
|
||||
end
|
||||
|
||||
define printu
|
||||
set $str = (UChar*)$arg0
|
||||
if $arg1 > 0
|
||||
set $max = $arg1
|
||||
else
|
||||
set $max = 1024
|
||||
end
|
||||
set $pos = 0
|
||||
while $pos < $max && *(char*)(($str+$pos))
|
||||
if $str[$pos] < 256
|
||||
printf "%c", $str[$pos]
|
||||
else
|
||||
printf "\\u%04X", $str[$pos]
|
||||
end
|
||||
set $pos = $pos + 1
|
||||
end
|
||||
if $pos < $max && *((char*)($str+$pos))
|
||||
printf "[...]"
|
||||
end
|
||||
end
|
||||
|
||||
document printu
|
||||
prints a unicode string, optionally with given length
|
||||
usage: printu str [len]
|
||||
The function stops at the first zero byte (not char) or when len is reached.
|
||||
If len is less than or equal to one then a maximum of 1024 characters are
|
||||
printed.
|
||||
end
|
||||
|
||||
define printt
|
||||
if $arg0
|
||||
printu $arg1 $arg2
|
||||
else
|
||||
set $len = strlen($arg1)
|
||||
if $arg2 > 0 && $len > $arg2
|
||||
set $copy = strdup($arg1)
|
||||
printf "%p: %s\n", $copy, $copy
|
||||
set ((char*)$copy)[$arg2] = 0
|
||||
printf "%s[...]", $copy
|
||||
call free($copy)
|
||||
else
|
||||
printf "%s", $arg1
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
document printt
|
||||
prints a binary or unicode string, optionally with given length
|
||||
usage: printt unicode str [len]
|
||||
If unicode is 1 the function calls printu, else it uses printf.
|
||||
end
|
||||
|
||||
define print_cvs
|
||||
____executor_globals
|
||||
set $p = $eg.current_execute_data.CVs
|
||||
set $c = $eg.current_execute_data.op_array.last_var
|
||||
set $v = $eg.current_execute_data.op_array.vars
|
||||
set $i = 0
|
||||
|
||||
printf "Compiled variables count: %d\n", $c
|
||||
while $i < $c
|
||||
printf "%d = %s\n", $i, $v[$i].name
|
||||
if $p[$i] != 0
|
||||
printzv *$p[$i]
|
||||
else
|
||||
printf "*uninitialized*\n"
|
||||
end
|
||||
set $i = $i + 1
|
||||
end
|
||||
end
|
||||
|
||||
define dump_bt
|
||||
set $t = $arg0
|
||||
while $t
|
||||
set $t = $arg0
|
||||
while $t
|
||||
printf "[0x%08x] ", $t
|
||||
if $t->function_state.function->common.function_name
|
||||
printu $t->function_state.function->common.function_name.u 50
|
||||
printf "() "
|
||||
printf "%s() ", $t->function_state.function->common.function_name
|
||||
else
|
||||
printf "??? "
|
||||
end
|
||||
@@ -159,46 +12,76 @@ define dump_bt
|
||||
end
|
||||
set $t = $t->prev_execute_data
|
||||
printf "\n"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
document dump_bt
|
||||
dumps the current execution stack. usage: dump_bt executor_globals.current_execute_data
|
||||
end
|
||||
|
||||
define ____printzv_contents
|
||||
set $zvalue = $arg0
|
||||
set $type = $zvalue->type
|
||||
define printzv
|
||||
set $ind = 0
|
||||
____printzv $arg0 0
|
||||
end
|
||||
|
||||
printf "(refcount=%d", $zvalue->refcount__gc
|
||||
if $zvalue->is_ref__gc
|
||||
printf ",is_ref"
|
||||
document printzv
|
||||
prints content of zval
|
||||
end
|
||||
|
||||
define ____printzv
|
||||
set $zvalue = $arg0
|
||||
|
||||
if $zvalue->type == 0
|
||||
set $typename = "NULL"
|
||||
end
|
||||
printf ") "
|
||||
if $type == 0
|
||||
printf "NULL"
|
||||
else
|
||||
____printz_type $type
|
||||
if $zvalue->type == 1
|
||||
set $typename = "long"
|
||||
end
|
||||
if $type == 1
|
||||
printf ": %ld", $zvalue->value.lval
|
||||
if $zvalue->type == 2
|
||||
set $typename = "double"
|
||||
end
|
||||
if $type == 2
|
||||
printf ": %lf", $zvalue->value.dval
|
||||
if $zvalue->type == 3
|
||||
set $typename = "string"
|
||||
end
|
||||
if $type == 3
|
||||
if $zvalue->value.lval
|
||||
printf ": true"
|
||||
else
|
||||
printf ": false"
|
||||
end
|
||||
if $zvalue->type == 4
|
||||
set $typename = "array"
|
||||
end
|
||||
if $type == 4
|
||||
printf "(%d): ", $zvalue->value.ht->nNumOfElements
|
||||
if $zvalue->type == 5
|
||||
set $typename = "object"
|
||||
end
|
||||
if $zvalue->type == 6
|
||||
set $typename = "bool"
|
||||
end
|
||||
if $zvalue->type == 7
|
||||
set $typename = "resource"
|
||||
end
|
||||
if $zvalue->type == 8
|
||||
set $typename = "constant"
|
||||
end
|
||||
if $zvalue->type == 9
|
||||
set $typename = "const_array"
|
||||
end
|
||||
|
||||
printf "[0x%08x] ", $zvalue
|
||||
|
||||
if $zvalue == executor_globals.uninitialized_zval_ptr
|
||||
printf "*uninitialized* "
|
||||
end
|
||||
printf "(refcount=%d) %s: ", $zvalue->refcount, $typename
|
||||
if $zvalue->type == 1
|
||||
printf "%ld", $zvalue->value.lval
|
||||
end
|
||||
if $zvalue->type == 2
|
||||
printf "%lf", $zvalue->value.dval
|
||||
end
|
||||
if $zvalue->type == 3
|
||||
printf "\"%s\"(%d)", $zvalue->value.str.val, $zvalue->value.str.len
|
||||
end
|
||||
if $zvalue->type == 4
|
||||
if ! $arg1
|
||||
printf "{\n"
|
||||
set $ind = $ind + 1
|
||||
____print_ht $zvalue->value.ht 0 1
|
||||
____print_ht $zvalue->value.ht
|
||||
set $ind = $ind - 1
|
||||
set $i = $ind
|
||||
while $i > 0
|
||||
@@ -207,89 +90,42 @@ define ____printzv_contents
|
||||
end
|
||||
printf "}"
|
||||
end
|
||||
set $type = 0
|
||||
end
|
||||
if $type == 5
|
||||
____executor_globals
|
||||
set $handle = $zvalue->value.obj.handle
|
||||
set $handlers = $zvalue->value.obj.handlers
|
||||
if basic_functions_module.zts
|
||||
set $zobj = zend_objects_get_address($zvalue, $tsrm_ls)
|
||||
else
|
||||
set $zobj = zend_objects_get_address($zvalue)
|
||||
end
|
||||
if $handlers->get_class_entry == &zend_std_object_get_class
|
||||
set $cname = $zobj->ce.name.s
|
||||
else
|
||||
set $cname = "Unknown"
|
||||
end
|
||||
printf "(%s) #%d", $cname, $handle
|
||||
if $zvalue->type == 5
|
||||
if ! $arg1
|
||||
if $handlers->get_properties == &zend_std_get_properties
|
||||
set $ht = $zobj->properties
|
||||
if $ht
|
||||
printf "(%d): ", $ht->nNumOfElements
|
||||
printf "{\n"
|
||||
set $ind = $ind + 1
|
||||
____print_ht $ht 1 1
|
||||
set $ind = $ind - 1
|
||||
set $i = $ind
|
||||
while $i > 0
|
||||
printf " "
|
||||
set $i = $i - 1
|
||||
end
|
||||
printf "}"
|
||||
else
|
||||
echo "no properties found"
|
||||
end
|
||||
end
|
||||
printf "(prop examination disabled due to a gdb bug)"
|
||||
# set $ht = $zvalue->value.obj.handlers->get_properties($zvalue)
|
||||
# printf "{\n"
|
||||
# set $ind = $ind + 1
|
||||
# ____print_ht $ht
|
||||
# set $ind = $ind - 1
|
||||
# set $i = $ind
|
||||
# while $i > 0
|
||||
# printf " "
|
||||
# set $i = $i - 1
|
||||
# end
|
||||
# printf "}"
|
||||
end
|
||||
set $type = 0
|
||||
end
|
||||
if $type == 6
|
||||
printf "(%d): \"%s\"", $zvalue->value.str.len, $zvalue->value.str.val
|
||||
if $zvalue->type == 6
|
||||
if $zvalue->lval
|
||||
printf "true"
|
||||
else
|
||||
printf "false"
|
||||
end
|
||||
end
|
||||
if $type == 7
|
||||
printf ": #%d", $zvalue->value.lval
|
||||
end
|
||||
if $type == 8
|
||||
end
|
||||
if $type == 9
|
||||
end
|
||||
if $type == 10
|
||||
printf "(%d): [%p]: \"", $zvalue->value.str.len, $zvalue->value.str.val
|
||||
printu $zvalue->value.ustr.val $zvalue->value.str.len
|
||||
printf "\""
|
||||
end
|
||||
if $type > 10
|
||||
if $zvalue->type == 7
|
||||
printf "#%d", $zvalue->value.lval
|
||||
end
|
||||
printf "\n"
|
||||
end
|
||||
|
||||
define ____printzv
|
||||
____executor_globals
|
||||
set $zvalue = $arg0
|
||||
|
||||
printf "[0x%08x] ", $zvalue
|
||||
|
||||
if $zvalue == $eg.uninitialized_zval_ptr
|
||||
printf "*uninitialized* "
|
||||
end
|
||||
|
||||
set $zcontents = (zval*) $zvalue
|
||||
if $arg1
|
||||
____printzv_contents $zcontents $arg1
|
||||
else
|
||||
____printzv_contents $zcontents 0
|
||||
end
|
||||
end
|
||||
|
||||
define ____print_const_table
|
||||
define ____print_ht
|
||||
set $ht = $arg0
|
||||
set $p = $ht->pListHead
|
||||
|
||||
while $p != 0
|
||||
set $const = (zend_constant *) $p->pData
|
||||
set $zval = *(struct _zval_struct **)$p->pData
|
||||
|
||||
set $i = $ind
|
||||
while $i > 0
|
||||
@@ -298,75 +134,20 @@ define ____print_const_table
|
||||
end
|
||||
|
||||
if $p->nKeyLength > 0
|
||||
printf "\"%s\" => ", $p->key.arKey.s
|
||||
printf "\"%s\" => ", $p->arKey
|
||||
else
|
||||
printf "%d => ", $p->h
|
||||
end
|
||||
|
||||
____printzv_contents &$const->value 0
|
||||
set $p = $p->pListNext
|
||||
end
|
||||
end
|
||||
|
||||
define print_const_table
|
||||
set $ind = 1
|
||||
printf "[0x%08x] {\n", $arg0
|
||||
____print_const_table $arg0
|
||||
printf "}\n"
|
||||
end
|
||||
|
||||
define ____print_ht
|
||||
set $ht = $arg0
|
||||
set $obj = $arg1
|
||||
set $p = $ht->pListHead
|
||||
set $unicode = $ht->unicode
|
||||
|
||||
while $p != 0
|
||||
set $i = $ind
|
||||
while $i > 0
|
||||
printf " "
|
||||
set $i = $i - 1
|
||||
end
|
||||
|
||||
if $p->nKeyLength > 0
|
||||
if $obj && $p->key.arKey.s[0] == 0
|
||||
if $p->key.arKey.s[1] == '*'
|
||||
printf "\"protected %s\" => ", $p->key.arKey.s+3
|
||||
else
|
||||
set $n = 1
|
||||
while $n < $p->nKeyLength && $p->key.arKey.s[$n] != 0
|
||||
set $n = $n + 1
|
||||
end
|
||||
printf "\"private %s::%s\" => ", $p->key.arKey.s+1, $p->key.arKey.s+$n+1
|
||||
end
|
||||
else
|
||||
printf "\""
|
||||
printt $p->key.type $p->key.arKey.s $p->nKeyLength
|
||||
printf "\" => "
|
||||
end
|
||||
else
|
||||
printf "%d => ", $p->h
|
||||
end
|
||||
|
||||
if $arg1 == 0
|
||||
printf "%p\n", (void*)$p->pData
|
||||
end
|
||||
if $arg1 == 1
|
||||
set $zval = *(zval **)$p->pData
|
||||
____printzv $zval 1
|
||||
end
|
||||
if $arg1 == 2
|
||||
printf "%s\n", (char*)$p->pData
|
||||
end
|
||||
|
||||
____printzv $zval 1
|
||||
set $p = $p->pListNext
|
||||
end
|
||||
end
|
||||
|
||||
define print_ht
|
||||
set $ind = 1
|
||||
printf "[0x%08x] (%d) {\n", $arg0, $arg0->nNumOfElements
|
||||
____print_ht $arg0 1
|
||||
printf "[0x%08x] {\n", $arg0
|
||||
____print_ht $arg0
|
||||
printf "}\n"
|
||||
end
|
||||
|
||||
@@ -374,91 +155,7 @@ document print_ht
|
||||
dumps elements of HashTable made of zval
|
||||
end
|
||||
|
||||
define print_htptr
|
||||
set $ind = 1
|
||||
printf "[0x%08x] (%d) {\n", $arg0, $arg0->nNumOfElements
|
||||
____print_ht $arg0 0
|
||||
printf "}\n"
|
||||
end
|
||||
|
||||
document print_htptr
|
||||
dumps elements of HashTable made of pointers
|
||||
end
|
||||
|
||||
define print_htstr
|
||||
set $ind = 1
|
||||
printf "[0x%08x] (%d) {\n", $arg0, $arg0->nNumOfElements
|
||||
____print_ht $arg0 2
|
||||
printf "}\n"
|
||||
end
|
||||
|
||||
document print_htstr
|
||||
dumps elements of HashTable made of strings
|
||||
end
|
||||
|
||||
define ____print_ft
|
||||
set $ht = $arg0
|
||||
set $p = $ht->pListHead
|
||||
set $unicode = $ht->unicode
|
||||
|
||||
while $p != 0
|
||||
set $func = (zend_function*)$p->pData
|
||||
|
||||
set $i = $ind
|
||||
while $i > 0
|
||||
printf " "
|
||||
set $i = $i - 1
|
||||
end
|
||||
|
||||
if $p->nKeyLength > 0
|
||||
printf "\""
|
||||
if $p->key.arKey.u.s[1] == '\0'
|
||||
printu $p->key.arKey.u $p->nKeyLength
|
||||
else
|
||||
printt $unicode $p->key.arKey.u $p->nKeyLength
|
||||
end
|
||||
printf "\" => "
|
||||
else
|
||||
printf "%d => ", $p->h
|
||||
end
|
||||
printf "[%p]: ", $func
|
||||
if $func->common.fn_flags & 0x01
|
||||
printf "static "
|
||||
end
|
||||
if $func->common.fn_flags & 0x02
|
||||
printf "abstract "
|
||||
end
|
||||
if $func->common.fn_flags & 0x04
|
||||
printf "final "
|
||||
end
|
||||
set $visibility = zend_visibility_string($func->common.fn_flags)
|
||||
printf "%s", $visibility
|
||||
if *$visibility
|
||||
printf " "
|
||||
end
|
||||
if $func->common.return_reference
|
||||
printf "& "
|
||||
end
|
||||
printt $unicode $func->common.function_name.s 0
|
||||
|
||||
printf "()\n"
|
||||
set $p = $p->pListNext
|
||||
end
|
||||
end
|
||||
|
||||
define print_ft
|
||||
set $ind = 1
|
||||
printf "[0x%08x] (%d) {\n", $arg0, $arg0->nNumOfElements
|
||||
____print_ft $arg0
|
||||
printf "}\n"
|
||||
end
|
||||
|
||||
document print_ft
|
||||
dumps a function table (HashTable)
|
||||
end
|
||||
|
||||
define printzn
|
||||
____executor_globals
|
||||
set $ind = 0
|
||||
set $znode = $arg0
|
||||
if $znode->op_type == 1
|
||||
@@ -473,32 +170,26 @@ define printzn
|
||||
if $znode->op_type == 8
|
||||
set $optype = "IS_UNUSED"
|
||||
end
|
||||
if $znode->op_type == 16
|
||||
set $optype = "IS_CV"
|
||||
end
|
||||
|
||||
printf "[0x%08x] %s", $znode, $optype
|
||||
|
||||
if $znode->op_type == 1
|
||||
printf ": "
|
||||
____printzv &$znode->u.constant 0
|
||||
____printzv &$znode->u.constant
|
||||
end
|
||||
if $znode->op_type == 2
|
||||
printf ": "
|
||||
set $tvar = (union _temp_variable *)((char *)$eg.current_execute_data->Ts + $znode->u.var)
|
||||
____printzv ((union _temp_variable *)$tvar)->tmp_var 0
|
||||
set $tvar = (union _temp_variable *)((char *)executor_globals.current_execute_data->Ts + $znode->u.var)
|
||||
____printzv ((union _temp_variable *)$tvar)->tmp_var
|
||||
end
|
||||
if $znode->op_type == 4
|
||||
printf ": "
|
||||
set $tvar = (union _temp_variable *)((char *)$eg.current_execute_data->Ts + $znode->u.var)
|
||||
____printzv *$tvar->var.ptr_ptr 0
|
||||
set $tvar = (union _temp_variable *)((char *)executor_globals.current_execute_data->Ts + $znode->u.var)
|
||||
____printzv *$tvar->var.ptr_ptr
|
||||
end
|
||||
if $znode->op_type == 8
|
||||
printf "\n"
|
||||
end
|
||||
if $znode->op_type == 16
|
||||
printf "\n"
|
||||
end
|
||||
end
|
||||
|
||||
document printzn
|
||||
@@ -519,18 +210,6 @@ document printzops
|
||||
dump operands of the current opline
|
||||
end
|
||||
|
||||
define zbacktrace
|
||||
____executor_globals
|
||||
dump_bt $eg.current_execute_data
|
||||
end
|
||||
|
||||
document zbacktrace
|
||||
prints backtrace.
|
||||
This command is almost a short cut for
|
||||
> (gdb) ____executor_globals
|
||||
> (gdb) dump_bt $eg.current_execute_data
|
||||
end
|
||||
|
||||
define zmemcheck
|
||||
set $p = alloc_globals.head
|
||||
set $stat = "?"
|
||||
@@ -603,3 +282,4 @@ document zmemcheck
|
||||
usage: zmemcheck [ptr].
|
||||
if ptr is 0, all blocks will be listed.
|
||||
end
|
||||
|
||||
+137
-120
@@ -1,6 +1,6 @@
|
||||
========================
|
||||
PHP Coding Standards
|
||||
========================
|
||||
PHP Coding Standards
|
||||
====================
|
||||
|
||||
|
||||
This file lists several standards that any programmer, adding or changing
|
||||
code in PHP, should follow. Since this file was added at a very late
|
||||
@@ -9,38 +9,37 @@ follow it, but it's going in that general direction. Since we are now
|
||||
well into the version 4 releases, many sections have been recoded to use
|
||||
these rules.
|
||||
|
||||
|
||||
Code Implementation
|
||||
-------------------
|
||||
|
||||
0. Document your code in source files and the manual. [tm]
|
||||
[0] Document your code in source files and the manual. [tm]
|
||||
|
||||
1. Functions that are given pointers to resources should not free them
|
||||
[1] Functions that are given pointers to resources should not free them
|
||||
|
||||
For instance, ``function int mail(char *to, char *from)`` should NOT free
|
||||
For instance, function int mail(char *to, char *from) should NOT free
|
||||
to and/or from.
|
||||
Exceptions:
|
||||
|
||||
- The function's designated behavior is freeing that resource. E.g. efree()
|
||||
|
||||
- The function is given a boolean argument, that controls whether or not
|
||||
the function may free its arguments (if true - the function must free its
|
||||
arguments, if false - it must not)
|
||||
|
||||
- Low-level parser routines, that are tightly integrated with the token
|
||||
cache and the bison code for minimum memory copying overhead.
|
||||
|
||||
2. Functions that are tightly integrated with other functions within the
|
||||
- The function's designated behavior is freeing that resource. E.g. efree()
|
||||
- The function is given a boolean argument, that controls whether or not
|
||||
the function may free its arguments (if true - the function must free its
|
||||
arguments, if false - it must not)
|
||||
- Low-level parser routines, that are tightly integrated with the token
|
||||
cache and the bison code for minimum memory copying overhead.
|
||||
|
||||
[2] Functions that are tightly integrated with other functions within the
|
||||
same module, and rely on each other non-trivial behavior, should be
|
||||
documented as such and declared 'static'. They should be avoided if
|
||||
possible.
|
||||
|
||||
3. Use definitions and macros whenever possible, so that constants have
|
||||
[3] Use definitions and macros whenever possible, so that constants have
|
||||
meaningful names and can be easily manipulated. The only exceptions
|
||||
to this rule are 0 and 1, when used as false and true (respectively).
|
||||
Any other use of a numeric constant to specify different behavior
|
||||
or actions should be done through a #define.
|
||||
|
||||
4. When writing functions that deal with strings, be sure to remember
|
||||
[4] When writing functions that deal with strings, be sure to remember
|
||||
that PHP holds the length property of each string, and that it
|
||||
shouldn't be calculated with strlen(). Write your functions in a such
|
||||
a way so that they'll take advantage of the length property, both
|
||||
@@ -49,47 +48,101 @@ Exceptions:
|
||||
doing so, should return that new length, so it doesn't have to be
|
||||
recalculated with strlen() (e.g. php_addslashes())
|
||||
|
||||
5. NEVER USE strncat(). If you're absolutely sure you know what you're doing,
|
||||
[5] Use php_error_docref() group of functions to report any errors/warnings
|
||||
during code execution. Use descriptive error messages, and try to avoid
|
||||
using identical error strings for different stages of an error. For
|
||||
example, if in order to obtain a URL you have to parse the URL, connect,
|
||||
and retreive the text, assuming something can go wrong at each of these
|
||||
stages, don't report an error "Unable to get URL" on all of them, but
|
||||
instead, write something like "Unable to parse URL", "Unable to connect
|
||||
to URL server" and "Unable to fetch URL text", respectively.
|
||||
|
||||
It has been silently agreed to prefix every php_error() message with the
|
||||
name of the current function if applicable:
|
||||
|
||||
php_error(E_WHATEVER, "%s(): Desc.", get_active_function_name(TSRMLS_C));
|
||||
|
||||
This can be done automatically using php_error_docref(). The first
|
||||
parameter, docref, is either NULL or the URL of a page describing the
|
||||
error in detail. In most cases you will pass NULL, to generate the URL
|
||||
from the name of the function being executed:
|
||||
|
||||
php_error_docref(NULL TSRMLS_CC, E_WHATEVER, "Desc.");
|
||||
|
||||
If you pass a URL, it can either be a full URL beginning with "http://":
|
||||
|
||||
php_error_docref("http://externalsite.tld/page.ext#error"
|
||||
TSRMLS_CC, E_WHATEVER, "Desc.");
|
||||
|
||||
Or the name of a manual page without file extension, but with an optional
|
||||
target anchor. Or simply the anchor within the manual page of the current
|
||||
function. When using function names you must replace '_' by '-':
|
||||
|
||||
php_error_docref("function.ext-func#error" TSRMLS_CC, E_WHATEVER, "Desc.");
|
||||
|
||||
To display one or two important parameters after the function name, use
|
||||
php_error_docref1() or php_error_docref2(). For example, file functions
|
||||
should display the name of the file opened:
|
||||
|
||||
php_error_docref1("function.fopen" TSRMLS_CC, filename,
|
||||
E_WHATEVER, "Desc.");
|
||||
|
||||
php_error_docref2("function.fopen" TSRMLS_CC, filename, openmode,
|
||||
E_WHATEVER, "Desc.");
|
||||
|
||||
Fixing ("unifying") existing php_error() message is a good thing [tm].
|
||||
|
||||
[6] NEVER USE strncat(). If you're absolutely sure you know what you're doing,
|
||||
check its man page again, and only then, consider using it, and even then,
|
||||
try avoiding it.
|
||||
|
||||
6. Use ``PHP_*`` macros in the PHP source, and ``ZEND_*`` macros in the Zend
|
||||
part of the source. Although the ``PHP_*`` macro's are mostly aliased to the
|
||||
``ZEND_*`` macros it gives a better understanding on what kind of macro
|
||||
you're calling.
|
||||
[7] Use PHP_* macros in the PHP source, and ZEND_* macros in the Zend
|
||||
part of the source. Although the PHP_* macro's are mostly aliased to the
|
||||
ZEND_* macros it gives a better understanding on what kind of macro you're
|
||||
calling.
|
||||
|
||||
7. When commenting out code using a #if statement, do NOT use 0 only. Instead
|
||||
use "<svn username here>_0". For example, #if FOO_0, where FOO is your
|
||||
svn user foo. This allows easier tracking of why code was commented out,
|
||||
especially in bundled libraries.
|
||||
[8] Use assert(). assert.h is included in php.h if it is available. Not only
|
||||
does good assertion catch bugs, but it also helps with code readability.
|
||||
- Do not use assert for error handling. Use assert only for the
|
||||
condition that must be always true.
|
||||
- Do not use assignments in assert conditions. If you assign inside an
|
||||
assert condition, you risk an elusive bug that would be very difficult
|
||||
to spot in a debug build, due to the side effect of the assignment.
|
||||
Function calls in assert conditions may also cause this problem, if
|
||||
they modify one of their arguments or global variables.
|
||||
|
||||
8. Do not define functions that are not available. For instance, if a
|
||||
library is missing a function, do not define the PHP version of the
|
||||
function, and do not raise a run-time error about the function not
|
||||
existing. End users should use function_exists() to test for the
|
||||
existence of a function
|
||||
[9] When commenting out code using a #if statement, do NOT use 0 only. Instead
|
||||
use "<cvs username here>_0". For example, #if FOO_0, where FOO is your
|
||||
cvs user foo. This allows easier tracking of why code was commented out,
|
||||
especially in bundled libraries.
|
||||
|
||||
9. Prefer emalloc(), efree(), estrdup(), etc. to their standard C library
|
||||
counterparts. These functions implement an internal "safety-net"
|
||||
mechanism that ensures the deallocation of any unfreed memory at the
|
||||
end of a request. They also provide useful allocation and overflow
|
||||
information while running in debug mode.
|
||||
[10] Do not define functions that are not available. For instance, if a
|
||||
library is missing a function, do not define the PHP version of the
|
||||
function, and do not raise a run-time error about the function not
|
||||
existing. End users should use function_exists() to test for the
|
||||
existence of a function
|
||||
|
||||
In almost all cases, memory returned to the engine must be allocated
|
||||
using emalloc().
|
||||
[11] Prefer emalloc(), efree(), estrdup(), etc. to their standard C library
|
||||
counterparts. These functions implement an internal "safety-net"
|
||||
mechanism that ensures the deallocation of any unfreed memory at the
|
||||
end of a request. They also provide useful allocation and overflow
|
||||
information while running in debug mode.
|
||||
|
||||
The use of malloc() should be limited to cases where a third-party
|
||||
library may need to control or free the memory, or when the memory in
|
||||
question needs to survive between multiple requests.
|
||||
In almost all cases, memory returned to the engine must be allocated
|
||||
using emalloc().
|
||||
|
||||
The use of malloc() should be limited to cases where a third-party
|
||||
library may need to control or free the memory, or when the memory in
|
||||
question needs to survive between multiple requests.
|
||||
|
||||
Naming Conventions
|
||||
------------------
|
||||
|
||||
1. Function names for user-level functions should be enclosed with in
|
||||
[1] Function names for user-level functions should be enclosed with in
|
||||
the PHP_FUNCTION() macro. They should be in lowercase, with words
|
||||
underscore delimited, with care taken to minimize the letter count.
|
||||
Abbreviations should not be used when they greatly decrease the
|
||||
readability of the function name itself::
|
||||
readability of the function name itself.
|
||||
|
||||
Good:
|
||||
'mcrypt_enc_self_test'
|
||||
@@ -99,18 +152,19 @@ Naming Conventions
|
||||
'mcrypt_module_get_algo_supported_key_sizes'
|
||||
(could be 'mcrypt_mod_get_algo_sup_key_sizes'?)
|
||||
'get_html_translation_table'
|
||||
(could be 'html_get_trans_table'?)
|
||||
(could be 'html_get_trans_table'?)
|
||||
|
||||
Bad:
|
||||
'hw_GetObjectByQueryCollObj'
|
||||
'pg_setclientencoding'
|
||||
'jf_n_s_i'
|
||||
|
||||
2. If they are part of a "parent set" of functions, that parent should
|
||||
|
||||
|
||||
[2] If they are part of a "parent set" of functions, that parent should
|
||||
be included in the user function name, and should be clearly related
|
||||
to the parent program or function family. This should be in the form
|
||||
of ``parent_*``::
|
||||
|
||||
of parent_*.
|
||||
|
||||
A family of 'foo' functions, for example:
|
||||
Good:
|
||||
'foo_select_bar'
|
||||
@@ -122,51 +176,23 @@ Naming Conventions
|
||||
'fooinsertbaz'
|
||||
'delete_foo_baz'
|
||||
|
||||
3. Function names used by user functions should be prefixed
|
||||
with ``_php_``, and followed by a word or an underscore-delimited list of
|
||||
[3] Function names used by user functions should be prefixed
|
||||
with "_php_", and followed by a word or an underscore-delimited list of
|
||||
words, in lowercase letters, that describes the function. If applicable,
|
||||
they should be declared 'static'.
|
||||
|
||||
4. Variable names must be meaningful. One letter variable names must be
|
||||
|
||||
[4] Variable names must be meaningful. One letter variable names must be
|
||||
avoided, except for places where the variable has no real meaning or
|
||||
a trivial meaning (e.g. for (i=0; i<100; i++) ...).
|
||||
|
||||
5. Variable names should be in lowercase. Use underscores to separate
|
||||
[5] Variable names should be in lowercase. Use underscores to separate
|
||||
between words.
|
||||
|
||||
6. Method names follow the 'studlyCaps' (also referred to as 'bumpy case'
|
||||
or 'camel caps') naming convention, with care taken to minimize the
|
||||
letter count. The initial letter of the name is lowercase, and each
|
||||
letter that starts a new 'word' is capitalized::
|
||||
|
||||
Good:
|
||||
'connect()'
|
||||
'getData()'
|
||||
'buildSomeWidget()'
|
||||
|
||||
Bad:
|
||||
'get_Data()'
|
||||
'buildsomewidget'
|
||||
'getI()'
|
||||
|
||||
7. Classes should be given descriptive names. Avoid using abbreviations where
|
||||
possible. Each word in the class name should start with a capital letter,
|
||||
without underscore delimiters (CampelCaps starting with a capital letter).
|
||||
The class name should be prefixed with the name of the 'parent set' (e.g.
|
||||
the name of the extension)::
|
||||
|
||||
Good:
|
||||
'Curl'
|
||||
'FooBar'
|
||||
|
||||
Bad:
|
||||
'foobar'
|
||||
'foo_bar'
|
||||
|
||||
Syntax and indentation
|
||||
----------------------
|
||||
|
||||
1. Never use C++ style comments (i.e. // comment). Always use C-style
|
||||
[1] Never use C++ style comments (i.e. // comment). Always use C-style
|
||||
comments instead. PHP is written in C, and is aimed at compiling
|
||||
under any ANSI-C compliant compiler. Even though many compilers
|
||||
accept C++-style comments in C code, you have to ensure that your
|
||||
@@ -175,20 +201,17 @@ Syntax and indentation
|
||||
because the Win32 port is MS-Visual C++ specific, and this compiler
|
||||
is known to accept C++-style comments in C code.
|
||||
|
||||
2. Use K&R-style. Of course, we can't and don't want to
|
||||
[2] Use K&R-style. Of course, we can't and don't want to
|
||||
force anybody to use a style he or she is not used to, but,
|
||||
at the very least, when you write code that goes into the core
|
||||
of PHP or one of its standard modules, please maintain the K&R
|
||||
style. This applies to just about everything, starting with
|
||||
indentation and comment styles and up to function declaration
|
||||
syntax. Also see Indentstyle_.
|
||||
syntax.
|
||||
|
||||
.. _Indentstyle: http://www.catb.org/~esr/jargon/html/I/indent-style.html
|
||||
|
||||
3. Be generous with whitespace and braces. Keep one empty line between the
|
||||
variable declaration section and the statements in a block, as well as
|
||||
between logical statement groups in a block. Maintain at least one empty
|
||||
line between two functions, preferably two. Always prefer::
|
||||
(see also http://www.tuxedo.org/~esr/jargon/html/entry/indent-style.html)
|
||||
|
||||
[3] Be generous with whitespace and braces. Always prefer:
|
||||
|
||||
if (foo) {
|
||||
bar;
|
||||
@@ -198,40 +221,35 @@ Syntax and indentation
|
||||
|
||||
if(foo)bar;
|
||||
|
||||
4. When indenting, use the tab character. A tab is expected to represent
|
||||
Keep one empty line between the variable declaration section and
|
||||
the statements in a block, as well as between logical statement
|
||||
groups in a block. Maintain at least one empty line between
|
||||
two functions, preferably two.
|
||||
|
||||
[4] When indenting, use the tab character. A tab is expected to represent
|
||||
four spaces. It is important to maintain consistency in indenture so
|
||||
that definitions, comments, and control structures line up correctly.
|
||||
|
||||
5. Preprocessor statements (#if and such) MUST start at column one. To
|
||||
indent preprocessor directives you should put the # at the beginning
|
||||
of a line, followed by any number of whitespace.
|
||||
|
||||
Testing
|
||||
-------
|
||||
|
||||
1. Extensions should be well tested using *.phpt tests. Read about that
|
||||
in README.TESTING.
|
||||
|
||||
Documentation and Folding Hooks
|
||||
-------------------------------
|
||||
|
||||
In order to make sure that the online documentation stays in line with
|
||||
the code, each user-level function should have its user-level function
|
||||
prototype before it along with a brief one-line description of what the
|
||||
function does. It would look like this::
|
||||
function does. It would look like this:
|
||||
|
||||
/* {{{ proto int abs(int number)
|
||||
Returns the absolute value of the number */
|
||||
PHP_FUNCTION(abs)
|
||||
{
|
||||
...
|
||||
}
|
||||
/* }}} */
|
||||
/* {{{ proto int abs(int number)
|
||||
Returns the absolute value of the number */
|
||||
PHP_FUNCTION(abs)
|
||||
{
|
||||
...
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
The {{{ symbols are the default folding symbols for the folding mode in
|
||||
Emacs and vim (set fdm=marker). Folding is very useful when dealing with
|
||||
large files because you can scroll through the file quickly and just unfold
|
||||
the function you wish to work on. The }}} at the end of each function marks
|
||||
Emacs and vim (set fdm=marker). Folding is very useful when dealing with
|
||||
large files because you can scroll through the file quickly and just unfold
|
||||
the function you wish to work on. The }}} at the end of each function marks
|
||||
the end of the fold, and should be on a separate line.
|
||||
|
||||
The "proto" keyword there is just a helper for the doc/genfuncsummary script
|
||||
@@ -239,10 +257,10 @@ which generates a full function summary. Having this keyword in front of the
|
||||
function prototypes allows us to put folds elsewhere in the code without
|
||||
messing up the function summary.
|
||||
|
||||
Optional arguments are written like this::
|
||||
Optional arguments are written like this:
|
||||
|
||||
/* {{{ proto object imap_header(int stream_id, int msg_no [, int from_length [, int subject_length [, string default_host]]])
|
||||
Returns a header object with the defined parameters */
|
||||
/* {{{ proto object imap_header(int stream_id, int msg_no [, int from_length [, int subject_length [, string default_host]]])
|
||||
Returns a header object with the defined parameters */
|
||||
|
||||
And yes, please keep the prototype on a single line, even if that line
|
||||
is massive.
|
||||
@@ -256,10 +274,9 @@ in the function directory, and that the functions follow the
|
||||
standard prefixing conventions during their initial implementation.
|
||||
|
||||
The file labelled 'EXPERIMENTAL' should include the following
|
||||
information::
|
||||
|
||||
Any authoring information (known bugs, future directions of the module).
|
||||
Ongoing status notes which may not be appropriate for SVN comments.
|
||||
information:
|
||||
Any authoring information (known bugs, future directions of the module).
|
||||
Ongoing status notes which may not be appropriate for CVS comments.
|
||||
|
||||
Aliases & Legacy Documentation
|
||||
-----------------------------------
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+230
-263
@@ -31,62 +31,37 @@ EXTENSION: aolserver
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: activescript
|
||||
PRIMARY MAINTAINER: Wez Furlong <wez@php.net>
|
||||
MAINTENANCE: Odd Fixes
|
||||
STATUS: Experimental
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: apache
|
||||
PRIMARY MAINTAINER: Rasmus Lerdorf <rasmus@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: apache_hooks
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: apache2filter
|
||||
EXTENSION: apache2
|
||||
PRIMARY MAINTAINER: Aaron Bannert <aaron@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Experimental
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: apache2handler
|
||||
PRIMARY MAINTAINER: Aaron Bannert <aaron@php.net>, Ilia Alshanetsky <iliaa@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: caudium
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: cgi
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: cli
|
||||
MAINTENANCE: Marcus Boerger <helly@php.net>, Edin Kadribasic <edink@php.net>
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Working
|
||||
SINCE: 4.3.0
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: continuity
|
||||
PRIMARY MAINTAINER: Alex Leigh <aleigh@php.net>
|
||||
EXTENSION: fhttpd
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: embed
|
||||
PRIMARY MAINTAINER: Edin Kadribasic <edink@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: isapi
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: litespeed
|
||||
PRIMARY MAINTAINER: George Wang <gwang@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
SINCE: 5.3
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: milter
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: nsapi
|
||||
PRIMARY MAINTAINER: Uwe Schindler <thetaphi@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
@@ -104,12 +79,12 @@ EXTENSION: roxen
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: thttpd
|
||||
PRIMARY MAINTAINER: Sascha Schumann <sascha@schumann.cx>
|
||||
MAINTENANCE: Odd fixes
|
||||
EXTENSION: servlet
|
||||
PRIMARY MAINTAINER: Sam Ruby <rubys@us.ibm.com>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: tux
|
||||
EXTENSION: thttpd
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
@@ -124,16 +99,57 @@ STATUS: Experimental
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: dba
|
||||
PRIMARY MAINTAINER: Marcus Börger <helly@php.net>,Christopher Jones <sixd@php.net>, Pierre-Alain Joye <pajoye@php.net>
|
||||
PRIMARY MAINTAINER: Marcus Börger <helly@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
COMMENT: DBM abstraction for db2, db3, db4, dbm, ndbm, gdbm, ini
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: dbase
|
||||
PRIMARY MAINTAINER: Jim Winstead <jimw@php.net>
|
||||
MAINTENANCE: Odd Fixes
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: dbx
|
||||
PRIMARY MAINTAINER: Marc Boeren <M.Boeren@guidance.nl>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
SINCE: 4.0.6
|
||||
COMMENT: DB abstraction for odbc, mysql, pgsql, mssql, fbsql and more, see documentation
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: filepro
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: hyperwave
|
||||
PRIMARY MAINTAINER: Uwe Steinmann <steinm@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: informix
|
||||
PRIMARY MAINTAINER: Danny Heijl <Danny.Heijl@cevi.be>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: ingres_ii
|
||||
PRIMARY MAINTAINER: David Hénot <henot@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Experimental
|
||||
SINCE: 4.0.2
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: interbase
|
||||
PRIMARY MAINTAINER: Ard Biesheuvel <ard@ard.nu>, Jouni Ahto <jouni.ahto@exdec.fi>
|
||||
MAINTENANCE: Odd fixes
|
||||
PRIMARY MAINTAINER: Jouni Ahto <jouni.ahto@exdec.fi>, Ard Biesheuvel <ard@ard.nu>
|
||||
MAINTENANCE: Odd Fixes
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: msql
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: msession
|
||||
PRIMARY MAINTAINER Mark L. Woodward mlwmohawk@mohawksoft.com
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working/Experimental
|
||||
COMMENT: Tested on Linux, should work on other UNIX platforms. Backend server code can compile under Windows.
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: mssql
|
||||
PRIMARY MAINTAINER: Frank M. Kromann <fmk@swwwing.com>
|
||||
MAINTENANCE: Maintained
|
||||
@@ -141,24 +157,26 @@ STATUS: Working
|
||||
COMMENT: Tested on phpts and isapi versions
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: mysql
|
||||
PRIMARY MAINTAINER: Zak Greant <zak@mysql.com>, Georg Richter <georg@php.net>, Johannes Schlüter <johannes@php.net>, Ulf Wendel <uw@php.net>
|
||||
PRIMARY MAINTAINER: Zak Greant <zak@mysql.com>, Georg Richter <georg@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: mysqli
|
||||
PRIMARY MAINTAINER: Georg Richter <georg@php.net>, Andrey Hristov <andrey@php.net>, Johannes Schlüter <johannes@php.net>, Ulf Wendel <uw@php.net>
|
||||
EXTENSION: pgsql
|
||||
PRIMARY MAINTAINER: Yasuo Ohgaki <yohgaki@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
SINCE: 5.0
|
||||
COMMENT: Use PostgreSQL 7.0.x or later. PostgreSQL 6.5.3 or less have fatal bug.
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: mysqlnd
|
||||
PRIMARY MAINTAINER: Georg Richter <georg@php.net>, Andrey Hristov <andrey@php.net>, Johannes Schlüter <johannes@php.net>, Ulf Wendel <uw@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
EXTENSION: sybase
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Not Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: sybase_ct
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Working
|
||||
SINCE: 5.3
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: oci8
|
||||
PRIMARY MAINTAINER: Christopher Jones <sixd@php.net>, Antony Dovgal <tony2001@php.net>
|
||||
PRIMARY MAINTAINER: Thies C. Arntzen <thies@thieso.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
@@ -168,178 +186,89 @@ MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
COMMENT: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: pdo
|
||||
PRIMARY MAINTAINER: Unknown
|
||||
MAINTENANCE: Odd fixes
|
||||
STATUS: Working
|
||||
SINCE: 5.1
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: pdo_dblib
|
||||
PRIMARY MAINTAINER: Unknown
|
||||
MAINTENANCE: Odd fixes
|
||||
STATUS: Working
|
||||
SINCE: 5.1
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: pdo_firebird
|
||||
PRIMARY MAINTAINER: Lars Westermann <lwe@php.net>
|
||||
EXTENSION: oracle
|
||||
PRIMARY MAINTAINER: Thies C. Arntzen <thies@thieso.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
SINCE: 5.1
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: pdo_mysql
|
||||
PRIMARY MAINTAINER: Ilia Alshanetsky <iliaa@php.net>, Johannes Schlüter <johannes@php.net>, Andrey Hristov <andrey@php.net>, Ulf Wendel <uw@php.net>
|
||||
MAINTENANCE: Odd fixes
|
||||
STATUS: Working
|
||||
SINCE: 5.1
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: pdo_odbc
|
||||
PRIMARY MAINTAINER: Unknown
|
||||
MAINTENANCE: Odd fixes
|
||||
STATUS: Working
|
||||
SINCE: 5.1
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: pdo_oci
|
||||
PRIMARY MAINTAINER: Unknown
|
||||
MAINTENANCE: Odd fixes
|
||||
STATUS: Working
|
||||
SINCE: 5.1
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: pdo_pgsql
|
||||
PRIMARY MAINTAINER: Ilia Alshanetsky <iliaa@php.net>
|
||||
MAINTENANCE: Odd fixes
|
||||
STATUS: Working
|
||||
SINCE: 5.1
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: pdo_sqlite
|
||||
PRIMARY MAINTAINER: Unknown
|
||||
MAINTENANCE: Odd fixes
|
||||
STATUS: Working
|
||||
SINCE: 5.1
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: pgsql
|
||||
PRIMARY MAINTAINER: Marcus Boerger <helly@php.net>, Yasuo Ohgaki <yohgaki@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
COMMENT: Use PostgreSQL 7.0.x or later. PostgreSQL 6.5.3 or less have fatal bug.
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: sqlite
|
||||
PRIMARY MAINTAINER: Marcus Boerger <helly@php.net>, Wez Furlong <wez@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
SINCE: 5.0 (Since 4.3.2 in PECL)
|
||||
COMMENT: Integrates SQLite 2 embeddable SQL database engine.
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: sqlite3
|
||||
PRIMARY MAINTAINER: Scott MacVicar <scottmac@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
SINCE: 5.3
|
||||
COMMENT: Integrates SQLite 3 embeddable SQL database engine.
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: sybase_ct
|
||||
PRIMARY MAINTAINER: Timm Friebe <thekid@thekid.de>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
|
||||
== XML extensions ==
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: dom
|
||||
PRIMARY MAINTAINER: Christian Stocker <chregu@php.net>, Rob Richards <rrichards@php.net>, Marcus Boerger <helly@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
SINCE: 5.0
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: simplexml
|
||||
PRIMARY MAINTAINER: Marcus Boerger <helly@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
SINCE: 5.0
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: soap
|
||||
PRIMARY MAINTAINER: Dmitry Stogov <dmitry@zend.com>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: wddx
|
||||
PRIMARY MAINTAINER: Andrei Zmievski <andrei@php.net>
|
||||
MAINTENANCE: Orphaned
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: xml
|
||||
PRIMARY MAINTAINER: Thies C. Arntzen <thies@thieso.net>, Rob Richards <rrichards@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: libxml
|
||||
PRIMARY MAINTAINER: Rob Richards <rrichards@php.net>, Christian Stocker <chregu@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: xmlreader
|
||||
PRIMARY MAINTAINER: Rob Richards <rrichards@php.net>, Christian Stocker <chregu@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: xmlrpc
|
||||
PRIMARY MAINTAINER: Dan Libby
|
||||
MAINTENANCE: Orphaned
|
||||
STATUS: Experimental
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: xmlwriter
|
||||
PRIMARY MAINTAINER: Rob Richards <rrichards@php.net>, Pierre-Alain Joye <pajoye@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: xsl
|
||||
PRIMARY MAINTAINER: Christian Stocker <chregu@php.net>, Rob Richards <rrichards@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
SINCE: 5.0
|
||||
COMMENT: Using the new OCI8 driver is encouraged where possible.
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
|
||||
== Other extensions ==
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: bcmath
|
||||
MAINTENANCE: Andi Gutmans <andi@zend.com>
|
||||
EXTENSION: aspell
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Working
|
||||
COMMENT: For aspell .27 and greater, check out the pspell extension
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: bcmath
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: bz2
|
||||
PRIMARY MAINTAINER: Hartmut Holzgraefe <hholzgra@php.net>
|
||||
PRIMARY MAINTAINER: Hartmut Holzgraefe <hartmut@six.de>
|
||||
MAINTENANCE: Odd Fixes
|
||||
STATUS: Working
|
||||
SINCE: 4.0.3
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: dio
|
||||
PRIMARY MAINTAINER: Sterling Hughes <sterling@php.net>
|
||||
MAINTENANCE: Orphaned
|
||||
STATUS: Working
|
||||
SINCE: 4.0.6
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: cyrus
|
||||
PRIMARY MAINTAINER: Sterling Hughes <sterling@php.net>
|
||||
MAINTENANCE: Orphaned
|
||||
STATUS: Working
|
||||
SINCE: 4.0.6
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: calendar
|
||||
PRIMARY MAINTAINER: Hartmut Holzgraefe <hholzgra@php.net>
|
||||
PRIMARY MAINTAINER: Hartmut Holzgraefe <hartmut@six.de>
|
||||
MAINTENANCE: Odd Fixes
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: com_dotnet
|
||||
PRIMARY MAINTAINER: Wez Furlong <wez@php.net>
|
||||
EXTENSION: com
|
||||
PRIMARY MAINTAINER: Harald Radi <h.radi@nme.at>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Windows
|
||||
SINCE: 5.0
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: cpdf
|
||||
PRIMARY MAINTAINER: Uwe Steinmann <steinm@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: crack
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Experimental
|
||||
SINCE: 4.0.5
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: ctype
|
||||
PRIMARY MAINTAINER: Hartmut Holzgraefe <hholzgra@php.net>
|
||||
PRIMARY MAINTAINER: Hartmut Holzgraefe <hartmut@six.de>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: curl
|
||||
PRIMARY MAINTAINER: Sterling Hughes <sterling@php.net>,Ilia Alshanetsky <iliaa@php.net>
|
||||
PRIMARY MAINTAINER: Sterling Hughes <sterling@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
SINCE: 4.0.2
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: date
|
||||
PRIMARY MAINTAINER: Derick Rethans <derick@php.net>
|
||||
EXTENSION: cybercash
|
||||
PRIMARY MAINTAINER: Evan Klinger <evan715@sirius.com>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: domxml
|
||||
PRIMARY MAINTAINER: Uwe Steinmann <steinm@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Experimental
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: dotnet
|
||||
PRIMARY MAINTAINER: Sam Ruby <rubys@us.ibm.com>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Experimental
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: exif
|
||||
PRIMARY MAINTAINER: Marcus Boerger <helly@php.net>
|
||||
@@ -347,25 +276,23 @@ MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
SINCE: 4.2
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: fileinfo
|
||||
PRIMARY MAINTAINER: Derick Rethans <derick@php.net>
|
||||
EXTENSION: fdf
|
||||
PRIMARY MAINTAINER: Uwe Steinmann <steinm@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
SINCE: 5.3
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: filter
|
||||
PRIMARY MAINTAINER: Derick Rethans <derick@php.net>, Pierre-Alain Joye <pajoye@php.net>, Ilia Alshanetsky <iliaa@php.net>
|
||||
EXTENSION: fribidi
|
||||
PRIMARY MAINTAINER: Tal Peer <tal@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
SINCE: 5.2
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: ftp
|
||||
PRIMARY MAINTAINER: Stefan Esser <sesser@php.net>
|
||||
MAINTENANCE: Odd fixes
|
||||
PRIMARY MAINTAINER: Stefan Esser (sesser@php.net)
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: gd
|
||||
PRIMARY MAINTAINER: Pierre-Alain Joye <pajoye@php.net>
|
||||
PRIMARY MAINTAINER: Rasmus Lerdorf <rasmus@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
@@ -374,29 +301,31 @@ MAINTENANCE: Unknown
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: gmp
|
||||
PRIMARY MAINTAINER: Stanislav Malyshev <stas@php.net>, Antony Dovgal <tony2001@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
SINCE: 4.0.4
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: icap
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Obsolete
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: iconv
|
||||
PRIMARY MAINTAINER: Moriyoshi Koizumi <moriyoshi@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: imap
|
||||
PRIMARY MAINTAINER: Chuck Hagenbuch <chuck@horde.org>, Ilia Alshanetsky <iliaa@php.net>, Pierre-Alain Joye <pajoye@php.net>
|
||||
PRIMARY MAINTAINER: Chuck Hagenbuch <chuck@horde.org>
|
||||
MAINTENANCE: Odd Fixes
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: java
|
||||
PRIMARY MAINTAINER: Sam Ruby <rubys@us.ibm.com>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: json
|
||||
PRIMARY MAINTAINER: Unknown
|
||||
MAINTENANCE: Odd fixes
|
||||
STATUS: Working
|
||||
SINCE: 5.2
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: ldap
|
||||
PRIMARY MAINTAINER: Stig Venaas <venaas@php.net>, Douglas Goldstein <cardoe@php.net>, Pierre-Alain Joye <pajoye@php.net>
|
||||
PRIMARY MAINTAINER: Stig Venaas <venaas@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
@@ -405,136 +334,174 @@ PRIMARY MAINTAINER: Rui Hirokawa <hirokawa@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: mcal
|
||||
PRIMARY MAINTAINER: Chuck Hagenbuch <chuck@horde.org>
|
||||
MAINTENANCE: Odd Fixes
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: mcrypt
|
||||
PRIMARY MAINTAINER: Derick Rethans <derick@derickrethans.nl>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: mhash
|
||||
PRIMARY MAINTAINER: Sascha Schumann <sascha@schumann.cx>, Scott MacVicar <scottmac@php.net>
|
||||
MAINTENANCE: Unknown
|
||||
PRIMARY MAINTAINER: Sascha Schumann <sascha@schumann.cx>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: mime_magic
|
||||
PRIMARY MAINTAINER: Unknown
|
||||
MAINTENANCE: Deprecated
|
||||
STATUS: Experimental
|
||||
COMMENT: Use the fileinfo extension instead
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: ming
|
||||
PRIMARY MAINTAINER: Frank M. Kromann
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Experimental
|
||||
EXTENSION: muscat
|
||||
PRIMARY MAINTAINER: Sam Liddicott <sam@ananova.com>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
SINCE: 4.0.5
|
||||
COMMENT: Not tested against windows, only core API completed, rest under development
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: openssl
|
||||
PRIMARY MAINTAINER: Wez Furlong <wez@php.net>, Pierre-Alain Joye <pajoye@php.net>
|
||||
PRIMARY MAINTAINER: Wez Furlong <wez@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
STATUS: Experimental
|
||||
SINCE: 4.0.4
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: pcntl
|
||||
PRIMARY MAINTAINER: Arnaud Le Blanc <lbarnaud@php.net>
|
||||
EXTENSION: overload
|
||||
PRIMARY MAINTAINER: Andrei Zmievski <andrei@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
STATUS: Experimental
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: pcre
|
||||
PRIMARY MAINTAINER: Andrei Zmievski <andrei@php.net>, Nuno Lopes <nlopess@php.net>
|
||||
PRIMARY MAINTAINER: Andrei Zmievski <andrei@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: phar
|
||||
PRIMARY MAINTAINER: Greg Beaver <cellog@php.net>, Marcus Börger <helly@php.net>
|
||||
EXTENSION: pdf
|
||||
PRIMARY MAINTAINER: Uwe Steinmann <steinm@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
SINCE: 5.3
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: pfpro
|
||||
PRIMARY MAINTAINER: David Croft <david@infotrek.co.uk>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
SINCE: 4.0.2
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: posix
|
||||
PRIMARY MAINTAINER: Kristian Köhntopp <kris@koehntopp.de>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: printer
|
||||
PRIMARY MAINTAINER: Daniel Beulshausen <daniel@php4win.de>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
SINCE: 4.0.4
|
||||
COMMENT: Only for Win32
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: pspell
|
||||
PRIMARY MAINTAINER: Vlad Krupin <phpdevel@echospace.com>
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Working
|
||||
STATUS: Unknown
|
||||
SINCE: 4.0.2
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: qtdom
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Experimental
|
||||
SINCE: 4.0.4
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: readline
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Working
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: recode
|
||||
PRIMARY MAINTAINER: Kristian Köhntopp <kris@koehntopp.de>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: reflection
|
||||
PRIMARY MAINTAINER: Marcus Börger <helly@php.net>, Johannes Schlüter <johannes@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
EXTENSION: sablot
|
||||
PRIMARY MAINTAINER: Sterling Hughes <sterling@php.net>
|
||||
MAINTENANCE: Obsolete
|
||||
STATUS: Experimental
|
||||
SINCE: 4.0.3
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: satellite
|
||||
PRIMARY MAINTAINER: David Eriksson <eriksson@php.net>
|
||||
MAINTENANCE: Odd Fixes
|
||||
STATUS: Experimental
|
||||
SINCE: 4.0.3
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: session
|
||||
PRIMARY MAINTAINER: Sascha Schumann <sascha@schumann.cx>, Ilia Alshanetsky <iliaa@php.net>
|
||||
PRIMARY MAINTAINER: Sascha Schumann <sascha@schumann.cx>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: shmop
|
||||
PRIMARY MAINTAINER: Ilia Alshanetsky <iliaa@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
STATUS: Experimental
|
||||
SINCE: 4.0.3
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: snmp
|
||||
PRIMARY MAINTAINER: Rasmus Lerdorf <rasmus@php.net>, Pierre-Alain Joye <pajoye@php.net>
|
||||
PRIMARY MAINTAINER: Rasmus Lerdorf <rasmus@php.net>
|
||||
MAINTENANCE: Odd Fixes
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: sockets
|
||||
PRIMARY MAINTAINER: Chris Vandomelen <chrisv@b0rked.dhs.org>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
STATUS: Experimental
|
||||
SINCE: 4.0.2
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: spl
|
||||
PRIMARY MAINTAINER: Marcus Boerger <helly@php.net>, Etienne Kneuss <colder@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
SINCE: 5.0.0
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: sysvmsg
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Working
|
||||
EXTENSION: swf
|
||||
PRIMARY MAINTAINER: Sterling Hughes <sterling@php.net>
|
||||
MAINTENANCE: Orphaned
|
||||
STATUS: Deprecated (Use the ming swf extension instead)
|
||||
COMMENT: Only for Unix (won't change)
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: sysvsem
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Working
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: sysvshm
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: tidy
|
||||
PRIMARY MAINTAINER: John Coggeshall <john@php.net>, Ilia Alshanetsky <iliaa@php.net>, Nuno Lopes <nlopess@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
EXTENSION: vpopmail
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Experimental
|
||||
SINCE: 4.0.5
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: tokenizer
|
||||
EXTENSION: wddx
|
||||
PRIMARY MAINTAINER: Andrei Zmievski <andrei@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: unicode
|
||||
MAINTENANCE: Andrei Zmievski <andrei@php.net>
|
||||
EXTENSION: xml
|
||||
PRIMARY MAINTAINER: Thies C. Arntzen <thies@thieso.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: zip
|
||||
PRIMARY MAINTAINER: Pierre-Alain Joye <pajoye@php.net>
|
||||
EXTENSION: xslt
|
||||
PRIMARY MAINTAINER: Hartmut Holzgraefe <hartmut@six.de>
|
||||
MAINTENANCE: Odd Fixes
|
||||
STATUS: Working (mostly)
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: yaz
|
||||
PRIMARY MAINTAINER: Adam Dickmeiss <adam@indexdata.dk>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
STATUS: Unknown
|
||||
SINCE: 4.0.1
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: yp
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: zlib
|
||||
PRIMARY MAINTAINER: Stefan Roehrich <sr@linux.de>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: zziplib
|
||||
PRIMARY MAINTAINER: Hartmut Holzgraefe <hartmut@six.de>
|
||||
MAINTENANCE: Odd Fixes
|
||||
STATUS: Working
|
||||
SINCE: 4.0.5
|
||||
-------------------------------------------------------------------------------
|
||||
# iptc?
|
||||
@@ -1,6 +1,6 @@
|
||||
--------------------------------------------------------------------
|
||||
The PHP License, version 3.01
|
||||
Copyright (c) 1999 - 2009 The PHP Group. All rights reserved.
|
||||
The PHP License, version 3.0
|
||||
Copyright (c) 1999 - 2002 The PHP Group. All rights reserved.
|
||||
--------------------------------------------------------------------
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
@@ -38,8 +38,8 @@ are met:
|
||||
|
||||
6. Redistributions of any form whatsoever must retain the following
|
||||
acknowledgment:
|
||||
"This product includes PHP software, freely available from
|
||||
<http://www.php.net/software/>".
|
||||
"This product includes PHP, freely available from
|
||||
<http://www.php.net/>".
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE PHP DEVELOPMENT TEAM ``AS IS'' AND
|
||||
ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||
@@ -64,5 +64,5 @@ The PHP Group can be contacted via Email at group@php.net.
|
||||
For more information on the PHP Group and the PHP project,
|
||||
please see <http://www.php.net>.
|
||||
|
||||
PHP includes the Zend Engine, freely available at
|
||||
This product includes the Zend Engine, freely available at
|
||||
<http://www.zend.com>.
|
||||
+13
-13
@@ -3,21 +3,21 @@
|
||||
# Zend
|
||||
#
|
||||
|
||||
$(builddir)/zend_language_scanner.lo: $(srcdir)/zend_language_parser.h
|
||||
$(builddir)/zend_ini_scanner.lo: $(srcdir)/zend_ini_parser.h
|
||||
$(builddir)/zend_language_scanner.lo: $(builddir)/zend_language_parser.h
|
||||
$(builddir)/zend_ini_scanner.lo: $(builddir)/zend_ini_parser.h
|
||||
|
||||
$(srcdir)/zend_language_scanner.c: $(srcdir)/zend_language_scanner.l
|
||||
@(cd $(top_srcdir); $(RE2C) $(RE2C_FLAGS) --case-inverted -cbdFt Zend/zend_language_scanner_defs.h -oZend/zend_language_scanner.c Zend/zend_language_scanner.l)
|
||||
$(builddir)/zend_language_scanner.c: $(srcdir)/zend_language_scanner.l
|
||||
$(LEX) -Pzend -S$(srcdir)/flex.skl -o$@ -i $(srcdir)/zend_language_scanner.l
|
||||
|
||||
$(srcdir)/zend_language_parser.h: $(srcdir)/zend_language_parser.c
|
||||
$(srcdir)/zend_language_parser.c: $(srcdir)/zend_language_parser.y
|
||||
@$(YACC) -p zend -v -d $(srcdir)/zend_language_parser.y -o $@
|
||||
$(builddir)/zend_language_parser.h: $(builddir)/zend_language_parser.c
|
||||
$(builddir)/zend_language_parser.c: $(srcdir)/zend_language_parser.y
|
||||
$(YACC) -p zend -v -d $(srcdir)/zend_language_parser.y -o $@
|
||||
|
||||
$(srcdir)/zend_ini_parser.h: $(srcdir)/zend_ini_parser.c
|
||||
$(srcdir)/zend_ini_parser.c: $(srcdir)/zend_ini_parser.y
|
||||
@$(YACC) -p ini_ -v -d $(srcdir)/zend_ini_parser.y -o $@
|
||||
$(builddir)/zend_ini_parser.h: $(builddir)/zend_ini_parser.c
|
||||
$(builddir)/zend_ini_parser.c: $(srcdir)/zend_ini_parser.y
|
||||
$(YACC) -p ini_ -v -d $(srcdir)/zend_ini_parser.y -o $@
|
||||
|
||||
$(srcdir)/zend_ini_scanner.c: $(srcdir)/zend_ini_scanner.l
|
||||
@(cd $(top_srcdir); $(RE2C) $(RE2C_FLAGS) --case-inverted -cbdFt Zend/zend_ini_scanner_defs.h -oZend/zend_ini_scanner.c Zend/zend_ini_scanner.l)
|
||||
$(builddir)/zend_ini_scanner.c: $(srcdir)/zend_ini_scanner.l
|
||||
$(LEX) -Pini_ -S$(srcdir)/flex.skl -o$@ -i $(srcdir)/zend_ini_scanner.l
|
||||
|
||||
$(builddir)/zend_indent.lo $(builddir)/zend_highlight.lo $(builddir)/zend_compile.lo: $(srcdir)/zend_language_parser.h
|
||||
$(builddir)/zend_indent.lo $(builddir)/zend_highlight.lo $(builddir)/zend_compile.lo: $(builddir)/zend_language_parser.h
|
||||
@@ -1,79 +0,0 @@
|
||||
|
||||
#
|
||||
# LCOV
|
||||
#
|
||||
|
||||
lcov: lcov-html
|
||||
|
||||
lcov-test: all
|
||||
@echo "Running test suite"
|
||||
@find . -name \*.gcda -o -name \*.da -o -name \*.bbg? | xargs rm -f
|
||||
-@if test ! -z "$(PHP_EXECUTABLE)" && test -x "$(PHP_EXECUTABLE)"; then \
|
||||
NO_INTERACTION=1 \
|
||||
TEST_PHP_EXECUTABLE=$(PHP_EXECUTABLE) \
|
||||
TEST_PHP_SRCDIR=$(top_srcdir) \
|
||||
CC="$(CC)" \
|
||||
$(PHP_EXECUTABLE) -d 'open_basedir=' -d 'output_buffering=0' -d 'memory_limit=-1' $(top_srcdir)/run-tests.php -d 'extension_dir=modules/' -d `( . $(PHP_MODULES) ; echo extension=$$dlname)` tests/; \
|
||||
elif test ! -z "$(SAPI_CLI_PATH)" && test -x "$(SAPI_CLI_PATH)"; then \
|
||||
NO_INTERACTION=1 \
|
||||
TEST_PHP_EXECUTABLE=$(top_builddir)/$(SAPI_CLI_PATH) \
|
||||
TEST_PHP_SRCDIR=$(top_srcdir) \
|
||||
CC="$(CC)" \
|
||||
$(top_builddir)/$(SAPI_CLI_PATH) -d 'open_basedir=' -d 'output_buffering=0' -d 'memory_limit=-1' $(top_srcdir)/run-tests.php $(TESTS); \
|
||||
else \
|
||||
echo "ERROR: Cannot run tests without CLI sapi."; \
|
||||
fi
|
||||
|
||||
php_lcov.info: lcov-test
|
||||
@echo "Generating data for $@"
|
||||
@rm -rf lcov_data/
|
||||
@$(mkinstalldirs) lcov_data/
|
||||
@echo
|
||||
-@find . -name \*.gcda -o -name \*.gcno -o -name \*.da -o -name \*.h | sed -e 's/^\.\///' | sed -e 's/\.gcda//g' -e 's/\.gcno//g' -e 's/\.da//g' | uniq | while read x; do \
|
||||
echo -n . ;\
|
||||
y=`echo $$x | sed -e 's!\.libs/!!'`; \
|
||||
dir=lcov_data/`dirname $$x`; \
|
||||
test -d "$$dir" || $(mkinstalldirs) "$$dir"; \
|
||||
if test -f "$(top_srcdir)/$$y.c"; then \
|
||||
ln -f -s $(top_srcdir)/$$y.c lcov_data/$$y.c; \
|
||||
fi; \
|
||||
if test -f "$(top_srcdir)/$$y.h"; then \
|
||||
ln -f -s $(top_srcdir)/$$y.h lcov_data/$$y.h; \
|
||||
fi; \
|
||||
if test -f "$(top_srcdir)/$$y.re"; then \
|
||||
ln -f -s $(top_srcdir)/$$y.re lcov_data/$$y.re; \
|
||||
fi; \
|
||||
if test -f "$(top_srcdir)/$$y.y"; then \
|
||||
ln -f -s $(top_srcdir)/$$y.y lcov_data/$$y.y; \
|
||||
fi; \
|
||||
if test -f "$(top_srcdir)/$$y.l"; then \
|
||||
ln -f -s $(top_srcdir)/$$y.l lcov_data/$$y.l; \
|
||||
fi; \
|
||||
if test -f "$(top_srcdir)/$$y"; then \
|
||||
ln -f -s $(top_srcdir)/$$y lcov_data/$$y; \
|
||||
fi; \
|
||||
if test -f "$(top_builddir)/$$y.c"; then \
|
||||
ln -f -s $(top_builddir)/$$y.c lcov_data/$$y.c; \
|
||||
fi; \
|
||||
test -f "$$x.gcno" && cp $$x.gcno lcov_data/$$y.gcno ; \
|
||||
test -f "$$x.gcda" && cp $$x.gcda lcov_data/$$y.gcda ; \
|
||||
test -f "$$x.da" && cp $$x.da lcov_data/$$y.da ; \
|
||||
test -f "$$x.bb" && cp $$x.bb lcov_data/$$y.bb ; \
|
||||
test -f "$$x.bbg" && cp $$x.bbg lcov_data/$$y.bbg ; \
|
||||
done
|
||||
for dir in ext/bcmath/libbcmath ext/fileinfo/libmagic ext/gd/libgd ext/mbstring/libmbfl ext/mbstring/oniguruma ext/pcre/pcrelib ext/pdo_sqlite/libsqlite ext/sqlite/libsqlite ext/sqlite3/libsqlite ext/xmlrpc/libxmlrpc ext/zip/lib; do \
|
||||
test -d lcov_data/$$dir && rm -rf lcov_data/$$dir ; \
|
||||
done
|
||||
@echo
|
||||
@echo "Generating $@"
|
||||
@$(LTP) --directory lcov_data/ --capture --base-directory=lcov_data --output-file $@
|
||||
|
||||
lcov-html: php_lcov.info
|
||||
@echo "Generating lcov HTML"
|
||||
@$(LTP_GENHTML) --legend --output-directory lcov_html/ --title "PHP Code Coverage" php_lcov.info
|
||||
|
||||
lcov-clean:
|
||||
rm -f php_lcov.info
|
||||
rm -rf lcov_data/
|
||||
rm -rf lcov_html/
|
||||
|
||||
+31
-71
@@ -5,30 +5,31 @@ INSTALL_DATA = $(INSTALL) -m 644
|
||||
DEFS = -DPHP_ATOM_INC -I$(top_builddir)/include -I$(top_builddir)/main -I$(top_srcdir)
|
||||
COMMON_FLAGS = $(DEFS) $(INCLUDES) $(EXTRA_INCLUDES) $(CPPFLAGS) $(PHP_FRAMEWORKPATH)
|
||||
|
||||
|
||||
all: $(all_targets)
|
||||
@echo
|
||||
@echo "Build complete."
|
||||
@echo "Don't forget to run 'make test'."
|
||||
@echo "(It is safe to ignore warnings about tempnam and tmpnam)."
|
||||
@echo
|
||||
|
||||
build-modules: $(PHP_MODULES) $(PHP_ZEND_EX)
|
||||
build-modules: $(PHP_MODULES)
|
||||
|
||||
libphp$(PHP_MAJOR_VERSION).la: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
|
||||
libphp4.la: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
|
||||
$(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -rpath $(phptempdir) $(EXTRA_LDFLAGS) $(LDFLAGS) $(PHP_RPATHS) $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@
|
||||
-@$(LIBTOOL) --silent --mode=install cp $@ $(phptempdir)/$@ >/dev/null 2>&1
|
||||
-@$(LIBTOOL) --silent --mode=install cp libphp4.la $(phptempdir)/libphp4.la >/dev/null 2>&1
|
||||
|
||||
libs/libphp$(PHP_MAJOR_VERSION).bundle: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
|
||||
$(CC) $(MH_BUNDLE_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(PHP_GLOBAL_OBJS:.lo=.o) $(PHP_SAPI_OBJS:.lo=.o) $(PHP_FRAMEWORKS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@ && cp $@ libs/libphp$(PHP_MAJOR_VERSION).so
|
||||
libs/libphp4.bundle: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
|
||||
$(CC) $(MH_BUNDLE_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(PHP_GLOBAL_OBJS:.lo=.o) $(PHP_SAPI_OBJS:.lo=.o) $(PHP_FRAMEWORKS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@ && cp $@ libs/libphp4.so
|
||||
|
||||
install: $(all_targets) $(install_targets)
|
||||
|
||||
install-sapi: $(OVERALL_TARGET)
|
||||
@echo "Installing PHP SAPI module: $(PHP_SAPI)"
|
||||
-@$(mkinstalldirs) $(INSTALL_ROOT)$(bindir)
|
||||
-@if test ! -r $(phptempdir)/libphp$(PHP_MAJOR_VERSION).$(SHLIB_DL_SUFFIX_NAME); then \
|
||||
-@if test ! -r $(phptempdir)/libphp4.$(SHLIB_SUFFIX_NAME); then \
|
||||
for i in 0.0.0 0.0 0; do \
|
||||
if test -r $(phptempdir)/libphp$(PHP_MAJOR_VERSION).$(SHLIB_DL_SUFFIX_NAME).$$i; then \
|
||||
$(LN_S) $(phptempdir)/libphp$(PHP_MAJOR_VERSION).$(SHLIB_DL_SUFFIX_NAME).$$i $(phptempdir)/libphp$(PHP_MAJOR_VERSION).$(SHLIB_DL_SUFFIX_NAME); \
|
||||
if test -r $(phptempdir)/libphp4.$(SHLIB_SUFFIX_NAME).$$i; then \
|
||||
$(LN_S) $(phptempdir)/libphp4.$(SHLIB_SUFFIX_NAME).$$i $(phptempdir)/libphp4.$(SHLIB_SUFFIX_NAME); \
|
||||
break; \
|
||||
fi; \
|
||||
done; \
|
||||
@@ -37,82 +38,41 @@ install-sapi: $(OVERALL_TARGET)
|
||||
|
||||
install-modules: build-modules
|
||||
@test -d modules && \
|
||||
$(mkinstalldirs) $(INSTALL_ROOT)$(EXTENSION_DIR)
|
||||
@echo "Installing shared extensions: $(INSTALL_ROOT)$(EXTENSION_DIR)/"
|
||||
@rm -f modules/*.la >/dev/null 2>&1
|
||||
@$(INSTALL) modules/* $(INSTALL_ROOT)$(EXTENSION_DIR)
|
||||
$(mkinstalldirs) $(INSTALL_ROOT)$(EXTENSION_DIR) && \
|
||||
echo "Installing shared extensions: $(INSTALL_ROOT)$(EXTENSION_DIR)/" && \
|
||||
rm -f modules/*.la && \
|
||||
$(INSTALL) modules/* $(INSTALL_ROOT)$(EXTENSION_DIR) >/dev/null 2>&1 || true
|
||||
|
||||
install-headers:
|
||||
-@if test "$(INSTALL_HEADERS)"; then \
|
||||
for i in `echo $(INSTALL_HEADERS)`; do \
|
||||
i=`$(top_srcdir)/build/shtool path -d $$i`; \
|
||||
paths="$$paths $(INSTALL_ROOT)$(phpincludedir)/$$i"; \
|
||||
done; \
|
||||
$(mkinstalldirs) $$paths && \
|
||||
echo "Installing header files: $(INSTALL_ROOT)$(phpincludedir)/" && \
|
||||
for i in `echo $(INSTALL_HEADERS)`; do \
|
||||
if test "$(PHP_PECL_EXTENSION)"; then \
|
||||
src=`echo $$i | $(SED) -e "s#ext/$(PHP_PECL_EXTENSION)/##g"`; \
|
||||
else \
|
||||
src=$$i; \
|
||||
fi; \
|
||||
if test -f "$(top_srcdir)/$$src"; then \
|
||||
$(INSTALL_DATA) $(top_srcdir)/$$src $(INSTALL_ROOT)$(phpincludedir)/$$i; \
|
||||
elif test -f "$(top_builddir)/$$src"; then \
|
||||
$(INSTALL_DATA) $(top_builddir)/$$src $(INSTALL_ROOT)$(phpincludedir)/$$i; \
|
||||
else \
|
||||
(cd $(top_srcdir)/$$src && $(INSTALL_DATA) *.h $(INSTALL_ROOT)$(phpincludedir)/$$i; \
|
||||
cd $(top_builddir)/$$src && $(INSTALL_DATA) *.h $(INSTALL_ROOT)$(phpincludedir)/$$i) 2>/dev/null || true; \
|
||||
fi \
|
||||
done; \
|
||||
fi
|
||||
install-tester:
|
||||
@echo "Installing regression tester: $(INSTALL_ROOT)$(PEAR_INSTALLDIR)/"
|
||||
@$(mkinstalldirs) $(INSTALL_ROOT)$(PEAR_INSTALLDIR)
|
||||
@$(INSTALL) -m 755 $(top_srcdir)/run-tests.php $(INSTALL_ROOT)$(PEAR_INSTALLDIR)
|
||||
|
||||
PHP_TEST_SETTINGS = -d 'open_basedir=' -d 'output_buffering=0' -d 'memory_limit=-1'
|
||||
PHP_TEST_SHARED_EXTENSIONS = ` \
|
||||
if test "x$(PHP_MODULES)" != "x"; then \
|
||||
for i in $(PHP_MODULES)""; do \
|
||||
. $$i; $(top_srcdir)/build/shtool echo -n -- " -d extension=$$dlname"; \
|
||||
done; \
|
||||
fi; \
|
||||
if test "x$(PHP_ZEND_EX)" != "x"; then \
|
||||
for i in $(PHP_ZEND_EX)""; do \
|
||||
. $$i; $(top_srcdir)/build/shtool echo -n -- " -d $(ZEND_EXT_TYPE)=$(top_builddir)/modules/$$dlname"; \
|
||||
done; \
|
||||
fi`
|
||||
PHP_DEPRECATED_DIRECTIVES_REGEX = '^(define_syslog_variables|register_(globals|long_arrays)?|safe_mode|safe_mode_(gid|include_dir|exec_dir|allowed_env_vars|protected_env_vars)?|highlight_bg|enable_dl|detect_unicode|allow_call_time_pass_reference|magic_quotes_(gpc|runtime|sybase)?|(zend_)?extension(_debug)?(_ts)?)[\t\ ]*='
|
||||
install-su: install-pear install-tester
|
||||
|
||||
test: all
|
||||
-@if test ! -z "$(PHP_EXECUTABLE)" && test -x "$(PHP_EXECUTABLE)"; then \
|
||||
INI_FILE=`$(PHP_EXECUTABLE) -d 'display_errors=stderr' -r 'echo php_ini_loaded_file();' 2> /dev/null`; \
|
||||
if test "$$INI_FILE"; then \
|
||||
$(EGREP) -h -v $(PHP_DEPRECATED_DIRECTIVES_REGEX) "$$INI_FILE" > $(top_builddir)/tmp-php.ini; \
|
||||
else \
|
||||
echo > $(top_builddir)/tmp-php.ini; \
|
||||
fi; \
|
||||
INI_SCANNED_PATH=`$(PHP_EXECUTABLE) -d 'display_errors=stderr' -r '$$a = explode(",\n", trim(php_ini_scanned_files())); echo $$a[0];' 2> /dev/null`; \
|
||||
if test "$$INI_SCANNED_PATH"; then \
|
||||
INI_SCANNED_PATH=`$(top_srcdir)/build/shtool path -d $$INI_SCANNED_PATH`; \
|
||||
$(EGREP) -h -v $(PHP_DEPRECATED_DIRECTIVES_REGEX) "$$INI_SCANNED_PATH"/*.ini >> $(top_builddir)/tmp-php.ini; \
|
||||
fi; \
|
||||
TEST_PHP_EXECUTABLE=$(PHP_EXECUTABLE) \
|
||||
test:
|
||||
-@if test -x $(SAPI_CLI_PATH) && test ! -z $(SAPI_CLI_PATH); then \
|
||||
TEST_PHP_EXECUTABLE=$(top_builddir)/$(SAPI_CLI_PATH) \
|
||||
TEST_PHP_SRCDIR=$(top_srcdir) \
|
||||
CC="$(CC)" \
|
||||
$(PHP_EXECUTABLE) -n -c $(top_builddir)/tmp-php.ini $(PHP_TEST_SETTINGS) $(top_srcdir)/run-tests.php -n -c $(top_builddir)/tmp-php.ini -d extension_dir=$(top_builddir)/modules/ $(PHP_TEST_SHARED_EXTENSIONS) $(TESTS); \
|
||||
$(top_builddir)/$(SAPI_CLI_PATH) -d 'open_basedir=' -d 'safe_mode=0' -d 'output_buffering=0' $(top_srcdir)/run-tests.php $(TESTS); \
|
||||
else \
|
||||
echo "ERROR: Cannot run tests without CLI sapi."; \
|
||||
fi
|
||||
|
||||
clean:
|
||||
find . -name \*.gcno -o -name \*.gcda | xargs rm -f
|
||||
find . -name \*.lo -o -name \*.o | xargs rm -f
|
||||
find . -name \*.la -o -name \*.a | xargs rm -f
|
||||
find . -name \*.lo | xargs rm -f
|
||||
find . -name \*.o | xargs rm -f
|
||||
find . -name \*.la | xargs rm -f
|
||||
find . -name \*.a | xargs rm -f
|
||||
find . -name \*.so | xargs rm -f
|
||||
find . -name .libs -a -type d|xargs rm -rf
|
||||
rm -f libphp$(PHP_MAJOR_VERSION).la $(SAPI_CLI_PATH) $(OVERALL_TARGET) modules/* libs/*
|
||||
rm -f libphp4.la $(SAPI_CLI_PATH) $(OVERALL_TARGET) modules/* libs/*
|
||||
|
||||
distclean: clean
|
||||
rm -f Makefile config.cache config.log config.status Makefile.objects Makefile.fragments libtool main/php_config.h stamp-h sapi/apache/libphp$(PHP_MAJOR_VERSION).module buildmk.stamp
|
||||
$(EGREP) define'.*include/php' $(top_srcdir)/configure | $(SED) 's/.*>//'|xargs rm -f
|
||||
rm -f config.cache config.log config.status Makefile.objects Makefile.fragments libtool main/php_config.h stamp-h php4.spec sapi/apache/libphp4.module buildmk.stamp
|
||||
egrep define'.*include/php' configure|sed 's/.*>//'|xargs rm -f
|
||||
find . -name Makefile | xargs rm -f
|
||||
|
||||
.PHONY: all clean install distclean test
|
||||
.NOEXPORT:
|
||||
@@ -0,0 +1,115 @@
|
||||
This is the first file you should be reading after you get your CVS account.
|
||||
We'll assume you're basically familiar with CVS, but feel free to post
|
||||
your questions on the mailing list. Please have a look at
|
||||
http://cvsbook.red-bean.com/ for more detailed information on CVS.
|
||||
|
||||
PHP is developed through the efforts of a large number of people.
|
||||
Collaboration is a Good Thing(tm), and CVS lets us do this. Thus, following
|
||||
some basic rules with regards to CVS usage will:
|
||||
|
||||
a. Make everybody happier, especially those responsible for maintaining
|
||||
the CVS itself.
|
||||
b. Keep the changes consistently well documented and easily trackable.
|
||||
c. Prevent some of those 'Oops' moments.
|
||||
d. Increase the general level of good will on planet Earth.
|
||||
|
||||
|
||||
Having said that, here are the organizational rules:
|
||||
|
||||
1. Respect other people working on the project.
|
||||
|
||||
2. Discuss any significant changes on the list before committing.
|
||||
|
||||
3. Look at EXTENSIONS file to see who is the primary maintainer of
|
||||
the code you want to contribute to.
|
||||
|
||||
4. If you "strongly disagree" about something another person did, don't
|
||||
start fighting publicly - take it up in private email.
|
||||
|
||||
5. If you don't know how to do something, ask first!
|
||||
|
||||
6. Test your changes before committing them. We mean it. Really.
|
||||
|
||||
|
||||
The next few rules are more of a technical nature.
|
||||
|
||||
1. DO NOT TOUCH ChangeLog! It is automagically updated from the commit
|
||||
messages every day. Woe be to those who attempt to mess with it.
|
||||
|
||||
2. All news updates intended for public viewing, such as new features,
|
||||
bug fixes, improvements, etc., should go into the NEWS file. Also see
|
||||
the note below about automatically updating NEWS in your commit message.
|
||||
|
||||
3. Do not commit multiple file and dump all messages in one commit. If you
|
||||
modified several unrelated files, commit each group separately and
|
||||
provide a nice commit message for each one. See example below.
|
||||
|
||||
4. Do write your commit message in such a way that it makes sense even
|
||||
without the corresponding diff. One should be able to look at it, and
|
||||
immediately know what was modified. Definitely include the function name
|
||||
in the message as shown below.
|
||||
|
||||
5. In your commit messages, keep each line shorter than 80 characters. And
|
||||
try to align your lines vertically, if they wrap. It looks bad otherwise.
|
||||
|
||||
6. If you modified a function that is callable from PHP, prepend PHP to
|
||||
the function name as shown below.
|
||||
|
||||
|
||||
The format of the commit messages is pretty simple.
|
||||
|
||||
If a line begins with #, it is taken to be a comment and will not appear
|
||||
in the ChangeLog. If the line begins with @, it will be redirected to the
|
||||
NEWS file. Everything else goes into the ChangeLog.
|
||||
|
||||
It is important to note that if your comment or news logline spans multiple
|
||||
lines, you have to put # or @ at the beginning of _every_ such line. Every
|
||||
entry in NEWS has to have a name after it, so if you did it with someone's
|
||||
help, put both your names there. Your name WILL NOT be automatically put
|
||||
at the end of the NEWS entry - so, please provide it yourself.
|
||||
|
||||
Example. Say you modified two files, datetime.c and string.c. In datetime.c
|
||||
you added a new format option for date() function, and in string.c you fixed
|
||||
a memory leak in php_trim(). Don't commit both of these at once. Commit them
|
||||
separately and try to make sure your commit messages look something like the
|
||||
following.
|
||||
|
||||
For datetime.c:
|
||||
|
||||
(PHP date) Added new 'K' format modifier for printing out number of
|
||||
days until New Year's Eve.
|
||||
@- Added new 'K' format modifier that will output the number of days
|
||||
@ until New Year's Eve. (Bob)
|
||||
|
||||
For string.c:
|
||||
(php_trim) Fixed a memory leak resulting from improper use of zval_dtor().
|
||||
# Man, that thing was leaking all over the place!
|
||||
@- Fixed memory leak in trim(). (Bob)
|
||||
|
||||
The lines above marked with @ will go into NEWS file automagically, and the
|
||||
# lines will be omitted from the ChangeLog. Alternatively, you might want
|
||||
to modify NEWS file directly and not use the @ lines.
|
||||
|
||||
If you fix some bugs, you should note the bug ID numbers in your
|
||||
commit message. Bug ID should be prefixed by "#" for easier access to
|
||||
bug report when developers are browsing CVS via. LXR or Bonsai.
|
||||
|
||||
Example:
|
||||
|
||||
Fixed pgsql notice handler double free crash bug. Bug #14016
|
||||
@ Fixed pgsql notice handler double free crash bug. Bug #14016
|
||||
|
||||
If you don't see your messages in ChangeLog and NEWS right away, don't worry!
|
||||
These files are updated once a day, so your stuff will not show up until
|
||||
somewhat later. Don't go adding stuff to NEWS by hand if you already put @
|
||||
lines in the commit message.
|
||||
|
||||
You can use LXR (http://lxr.php.net/) and Bonsai (http://bonsai.php.net/)
|
||||
to look at PHP CVS repository in various ways.
|
||||
|
||||
To receive daily updates to ChangeLog and NEWS, send an empty message to
|
||||
php-cvs-daily-subscribe@lists.php.net.
|
||||
|
||||
Happy hacking,
|
||||
|
||||
PHP Team
|
||||
+1
-6
@@ -1,7 +1,3 @@
|
||||
(NOTE: you may also want to take a look at the pear package
|
||||
PECL_Gen, a PHP-only alternative for this script that
|
||||
supports way more extension writing tasks and is
|
||||
supposed to replace ext_skel completely in the long run ...)
|
||||
|
||||
WHAT IT IS
|
||||
|
||||
@@ -21,8 +17,7 @@ HOW TO USE IT
|
||||
|
||||
[ Note that GNU awk is likely required for this script to work. Debian
|
||||
systems seem to default to using mawk, so you may need to change the
|
||||
#! line in skeleton/create_stubs and the cat $proto | awk line in
|
||||
ext_skel to use gawk explicitly. ]
|
||||
#! line in skeleton/create_stubs to use gawk explicitly. ]
|
||||
|
||||
If you don't need to test the existence of any external header files,
|
||||
libraries or functions in them, the module is already almost ready to be
|
||||
|
||||
@@ -1,79 +0,0 @@
|
||||
====================
|
||||
Mailinglist Rules
|
||||
====================
|
||||
|
||||
This is the first file you should be reading before doing any posts on PHP
|
||||
mailinglists. Following these rules is considered imperative to the success of
|
||||
the PHP project. Therefore expect your contributions to be of much less positive
|
||||
impact if you do not follow these rules. More importantly you can actually
|
||||
assume that not following these rules will hurt the PHP project.
|
||||
|
||||
PHP is developed through the efforts of a large number of people.
|
||||
Collaboration is a Good Thing(tm), and mailinglists lets us do this. Thus,
|
||||
following some basic rules with regards to mailinglist usage will:
|
||||
|
||||
a. Make everybody happier, especially those responsible for developing PHP
|
||||
itself.
|
||||
|
||||
b. Help in making sure we all use our time more efficiently.
|
||||
|
||||
c. Prevent you from making a fool of yourself in public.
|
||||
|
||||
d. Increase the general level of good will on planet Earth.
|
||||
|
||||
|
||||
Having said that, here are the organizational rules:
|
||||
|
||||
1. Respect other people working on the project.
|
||||
|
||||
2. Do not post when you are angry. Any post can wait a few hours. Review
|
||||
your post after a good breather or a good nights sleep.
|
||||
|
||||
3. Make sure you pick the right mailinglist for your posting. Please review
|
||||
the descriptions on the mailinglist overview page
|
||||
(http://www.php.net/mailing-lists.php). When in doubt ask a friend or
|
||||
someone you trust on IRC.
|
||||
|
||||
4. Make sure you know what you are talking about. PHP is a very large project
|
||||
that strives to be very open. The flip side is that the core developers
|
||||
are faced with a lot of requests. Make sure that you have done your
|
||||
research before posting to the entire developer community.
|
||||
|
||||
5. Patches have a much greater chance of acceptance than just asking the
|
||||
PHP developers to implement a feature for you. For one it makes the
|
||||
discussion more concrete and it shows that the poster put thought and time
|
||||
into the request.
|
||||
|
||||
6. If you are posting to an existing thread, make sure that you know what
|
||||
previous posters have said. This is even more important the longer the
|
||||
thread is already.
|
||||
|
||||
7. Please configure your email client to use a real name and keep message
|
||||
signatures to a maximum of 2 lines if at all necessary.
|
||||
|
||||
The next few rules are more some general hints:
|
||||
|
||||
1. If you notice that your posting ratio is much higher than that of other
|
||||
people, double check the above rules. Try to wait a bit longer before
|
||||
sending your replies to give other people more time to digest your answers
|
||||
and more importantly give you the opportunity to make sure that you
|
||||
aggregate your current position into a single mail instead of multiple
|
||||
ones.
|
||||
|
||||
2. Consider taking a step back from a very active thread now and then. Maybe
|
||||
talking to some friends and fellow developers will help in understanding
|
||||
the other opinions better.
|
||||
|
||||
3. Do not top post. Place your answer underneath anyone you wish to quote
|
||||
and remove any previous comment that is not relevant to your post.
|
||||
|
||||
4. Do not high-jack threads, by bringing up entirely new topics. Please
|
||||
create an entirely new thread copying anything you wish to quote into the
|
||||
new thread.
|
||||
|
||||
Finally, additional hints on how to behave inside the virtual community can be
|
||||
found in RFC 1855 (http://www.faqs.org/rfcs/rfc1855.html).
|
||||
|
||||
Happy hacking,
|
||||
|
||||
PHP Team
|
||||
@@ -1,142 +0,0 @@
|
||||
$Id$
|
||||
|
||||
|
||||
API adjustment to the old output control code:
|
||||
|
||||
Everything now resides beneath the php_output namespace,
|
||||
and there's an API call for every output handler op.
|
||||
|
||||
Checking output control layers status:
|
||||
// Using OG()
|
||||
php_output_get_status(TSRMLS_C);
|
||||
|
||||
Starting the default output handler:
|
||||
// php_start_ob_buffer(NULL, 0, 1 TSRMLS_CC);
|
||||
php_output_start_default(TSRMLS_C);
|
||||
|
||||
Starting an user handler by zval:
|
||||
// php_start_ob_buffer(zhandler, chunk_size, erase TSRMLS_CC);
|
||||
php_output_start_user(zhandler, chunk_size, flags TSRMLS_CC);
|
||||
|
||||
Starting an internal handler whithout context:
|
||||
// php_ob_set_internal_handler(my_php_output_handler_func_t, buffer_size, "output handler name", erase TSRMLS_CC);
|
||||
php_output_start_internal(handler_name_zval, my_php_output_handler_func_t, chunk_size, flags TSRMLS_CC);
|
||||
|
||||
Starting an internal handler with context:
|
||||
// not possible with old API
|
||||
php_output_handler *h;
|
||||
h = php_output_handler_create_internal(handler_name_zval, my_php_output_handler_context_func_t, chunk_size, flags TSRMLS_CC);
|
||||
php_output_handler_set_context(h, my_context, my_context_dtor);
|
||||
php_output_handler_start(h TSRMLS_CC);
|
||||
|
||||
Testing whether a certain output handler has already been started:
|
||||
// php_ob_handler_used("output handler name" TSRMLS_CC);
|
||||
php_output_handler_started(handler_name_zval TSRMLS_CC);
|
||||
|
||||
Flushing one output buffer:
|
||||
// php_ob_end_buffer(1, 1 TSRMLS_CC);
|
||||
php_output_flush(TSRMLS_C);
|
||||
|
||||
Flushing all output buffers:
|
||||
// not possible with old API
|
||||
php_output_flush_all(TSRMLS_C);
|
||||
|
||||
Cleaning one output buffer:
|
||||
// php_ob_end_buffer(0, 1 TSRMLS_CC);
|
||||
php_output_clean(TSRMLS_C);
|
||||
|
||||
Cleaning all output buffers:
|
||||
// not possible with old API
|
||||
php_output_clean_all(TSRMLS_C);
|
||||
|
||||
Discarding one output buffer:
|
||||
// php_ob_end_buffer(0, 0 TSRMLS_CC);
|
||||
php_output_discard(TSRMLS_C);
|
||||
|
||||
Discarding all output buffers:
|
||||
// php_ob_end_buffers(0 TSRMLS_CC);
|
||||
php_output_discard_all(TSRMLS_C);
|
||||
|
||||
Stopping (and dropping) one output buffer:
|
||||
// php_ob_end_buffer(1, 0 TSRMLS_CC)
|
||||
php_output_end(TSRMLS_C);
|
||||
|
||||
Stopping (and dropping) all output buffers:
|
||||
// php_ob_end_buffers(1, 0 TSRMLS_CC);
|
||||
php_output_end_all(TSRMLS_C);
|
||||
|
||||
Retrieving output buffers contents:
|
||||
// php_ob_get_buffer(zstring TSRMLS_CC);
|
||||
php_output_get_contents(zstring TSRMLS_CC);
|
||||
|
||||
Retrieving output buffers length:
|
||||
// php_ob_get_length(zlength TSRMLS_CC);
|
||||
php_output_get_length(zlength TSRMLS_CC);
|
||||
|
||||
Retrieving output buffering level:
|
||||
// OG(nesting_level);
|
||||
php_output_get_level(TSRMLS_C);
|
||||
|
||||
Issue a warning because of an output handler conflict:
|
||||
// php_ob_init_conflict("to be started handler name", "to be tested if already started handler name" TSRMLS_CC);
|
||||
php_output_handler_conflict(new_handler_name_zval, set_handler_name_zval TSRMLS_CC);
|
||||
|
||||
Registering a conflict checking function, which will be checked prior starting the handler:
|
||||
// not possible with old API, unless hardcoding into output.c
|
||||
php_output_handler_conflict_register(handler_name_zval, my_php_output_handler_conflict_check_t TSRMLS_CC);
|
||||
|
||||
Registering a reverse conflict checking function, which will be checked prior starting the specified foreign handler:
|
||||
// not possible with old API
|
||||
php_output_handler_reverse_conflict_register(foreign_handler_name_zval, my_php_output_handler_conflict_check_t TSRMLS_CC);
|
||||
|
||||
Facilitating a context from within an output handler callable with ob_start():
|
||||
// not possible with old API
|
||||
php_output_handler_hook(PHP_OUTPUT_HANDLER_HOOK_GET_OPAQ, (void *) &custom_ctx_ptr_ptr TSRMLS_CC);
|
||||
|
||||
Disabling of the output handler by itself:
|
||||
//not possible with old API
|
||||
php_output_handler_hook(PHP_OUTPUT_HANDLER_HOOK_DISABLE, NULL TSRMLS_CC);
|
||||
|
||||
Marking an output handler immutable by itself because of irreversibility of its operation:
|
||||
// not possible with old API
|
||||
php_output_handler_hook(PHP_OUTPUT_HANDLER_HOOK_IMMUTABLE, NULL TSRMLS_CC);
|
||||
|
||||
Restarting the output handler because of a CLEAN operation:
|
||||
// not possible with old API
|
||||
if (flags & PHP_OUTPUT_HANDLER_CLEAN) { ... }
|
||||
|
||||
Recognizing by the output handler itself if it gets discarded:
|
||||
// not possible with old API
|
||||
if ((flags & PHP_OUTPUT_HANDLER_CLEAN) && (flags & PHP_OUTPUT_HANDLER_FINAL)) { ... }
|
||||
|
||||
|
||||
Output handler hooks
|
||||
|
||||
The output handler can change its abilities at runtime. Eg. the gz handler can
|
||||
remove the CLEANABLE and REMOVABLE bits when the first output has passed through it;
|
||||
or handlers implemented in C to be used with ob_start() can contain a non-global
|
||||
context:
|
||||
PHP_OUTPUT_HANDLER_HOOK_GET_OPAQ
|
||||
pass a void*** pointer as second arg to receive the address of a pointer
|
||||
pointer to the opaque field of the output handler context
|
||||
PHP_OUTPUT_HANDLER_HOOK_GET_FLAGS
|
||||
pass a int* pointer as second arg to receive the flags set for the output handler
|
||||
PHP_OUTPUT_HANDLER_HOOK_GET_LEVEL
|
||||
pass a int* pointer as second arg to receive the level of this output handler
|
||||
(starts with 0)
|
||||
PHP_OUTPUT_HANDLER_HOOK_IMMUTABLE
|
||||
the second arg is ignored; marks the output handler to be neither cleanable
|
||||
nor removable
|
||||
PHP_OUTPUT_HANDLER_HOOK_DISABLE
|
||||
the second arg is ignored; marks the output handler as disabled
|
||||
|
||||
|
||||
Open questions
|
||||
|
||||
Should the userland API be adjusted and unified?
|
||||
|
||||
Many bits of the manual (and very first implementation) do not comply
|
||||
with the behaviour of the current (to be obsoleted) code, thus should
|
||||
the manual or the behaviour be adjusted?
|
||||
|
||||
END
|
||||
+39
-193
@@ -31,81 +31,25 @@ resources cannot be auto-converted.
|
||||
|
||||
Type specifiers
|
||||
---------------
|
||||
The following list shows the type specifier, its meaning and the parameter
|
||||
types that need to be passed by address. All passed paramaters are set
|
||||
if the PHP parameter is non optional and untouched if optional and the
|
||||
parameter is not present. The only exception is O where the zend_class_entry*
|
||||
has to be provided on input and is used to verify the PHP parameter is an
|
||||
instance of that class.
|
||||
|
||||
a - array (zval*)
|
||||
A - array or object (zval *)
|
||||
b - boolean (zend_bool)
|
||||
C - class (zend_class_entry*)
|
||||
d - double (double)
|
||||
f - function or array containing php method call info (returned as
|
||||
zend_fcall_info and zend_fcall_info_cache)
|
||||
h - array (returned as HashTable*)
|
||||
H - array or HASH_OF(object) (returned as HashTable*)
|
||||
l - long (long)
|
||||
L - long, limits out-of-range numbers to LONG_MAX/LONG_MIN (long)
|
||||
o - object of any type (zval*)
|
||||
O - object of specific type given by class entry (zval*, zend_class_entry)
|
||||
r - resource (zval*)
|
||||
s - string (with possible null bytes) and its length (char*, int)
|
||||
S - binary string, does not allow conversion from Unicode strings
|
||||
t - text (zstr (string union), int (length), zend_uchar (IS_STRING/..))
|
||||
accepts either Unicode or binary string
|
||||
T - text (zstr (string union), int (length), zend_uchar (IS_STRING/..))
|
||||
coalesces all T parameters to common type (Unicode or binary)
|
||||
u - unicode (UChar*, int)
|
||||
U - Unicode string, does not allow conversion from binary strings
|
||||
x - Unicode or binary string depending on UG(unicode). In unicode this
|
||||
behaves like 'u' and in nonunicode mode it behaves like 's'.
|
||||
z - the actual zval (zval*)
|
||||
Z - the actual zval (zval**)
|
||||
* - variable arguments list (0 or more)
|
||||
+ - variable arguments list (1 or more)
|
||||
l - long
|
||||
d - double
|
||||
s - string (with possible null bytes) and its length
|
||||
b - boolean, stored in zend_bool
|
||||
r - resource (stored in zval)
|
||||
a - array
|
||||
o - object (of any type)
|
||||
O - object (of specific type, specified by class entry)
|
||||
z - the actual zval
|
||||
|
||||
The following characters also have a meaning in the specifier string:
|
||||
| - indicates that the remaining parameters are optional, they
|
||||
should be initialized to default values by the extension since they
|
||||
will not be touched by the parsing function if they are not
|
||||
passed to it.
|
||||
/ - use SEPARATE_ZVAL_IF_NOT_REF() on the parameter it follows
|
||||
! - the parameter it follows can be of specified type or NULL (applies
|
||||
to all specifiers except for 'b', 'l', and 'd'). If NULL is passed, the
|
||||
results pointer is set to NULL as well.
|
||||
& - alternate format (currently used for 's' only to specify a converter to
|
||||
use when converting from Unicode strings)
|
||||
^ - returns original string type before conversion (only for 's' and 'u'
|
||||
specifiers)
|
||||
|
||||
|
||||
Note on 64bit compatibility
|
||||
---------------------------
|
||||
Please do not forget that int and long are two different things on 64bit
|
||||
OSes (int is 4 bytes and long is 8 bytes), so make sure you pass longs to "l"
|
||||
and ints to strings length (i.e. for "s" you need to pass char * and int),
|
||||
not the other way round!
|
||||
Remember: "l" is the only case when you need to pass long (and that's why
|
||||
it's "l", not "i" btw).
|
||||
|
||||
Both mistakes cause memory corruptions and segfaults on 64bit OSes:
|
||||
1)
|
||||
char *str;
|
||||
long str_len; /* XXX THIS IS WRONG!! Use int instead. */
|
||||
zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &str, &str_len)
|
||||
|
||||
2)
|
||||
int num; /* XXX THIS IS WRONG!! Use long instead. */
|
||||
zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &num)
|
||||
|
||||
If you're in doubt, use check_parameters.php script to the parameters
|
||||
and their types (it can be found in ./scripts/dev/ directory of PHP sources):
|
||||
|
||||
# php ./scripts/dev/check_parameters.php /path/to/your/sources/
|
||||
|
||||
| - indicates that the remaining parameters are optional, they
|
||||
should be initialized to default values by the extension since they
|
||||
will not be touched by the parsing function if they are not
|
||||
passed to it.
|
||||
/ - use SEPARATE_ZVAL_IF_NOT_REF() on the parameter it follows
|
||||
! - the parameter it follows can be of specified type or NULL (only applies
|
||||
to 'a', 'o', 'O', 'r', and 'z'). If NULL is passed, the results
|
||||
pointer is set to NULL as well.
|
||||
|
||||
Examples
|
||||
--------
|
||||
@@ -115,18 +59,18 @@ char *s;
|
||||
int s_len;
|
||||
zval *param;
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lsz",
|
||||
&l, &s, &s_len, ¶m) == FAILURE) {
|
||||
return;
|
||||
&l, &s, &s_len, ¶m) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/* Gets an object of class specified by my_ce, and an optional double. */
|
||||
zval *obj;
|
||||
double d = 0.5;
|
||||
zend_class_entry *my_ce;
|
||||
zend_class_entry my_ce;
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O|d",
|
||||
&obj, my_ce, &d) == FAILURE) {
|
||||
return;
|
||||
&obj, my_ce, &d) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -135,65 +79,26 @@ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O|d",
|
||||
zval *obj;
|
||||
zval *arr;
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "o!a",
|
||||
&obj, &arr) == FAILURE) {
|
||||
return;
|
||||
&obj, &arr) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/* Gets a separated array which can also be null. */
|
||||
zval *arr;
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "a/!",
|
||||
&arr) == FAILURE) {
|
||||
return;
|
||||
&arr) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/* Gets a binary string in UTF-8 */
|
||||
char *str;
|
||||
int str_len;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s&", &str, &str_len, UG(utf8_conv)) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/* Gets a Unicode string */
|
||||
UChar *str;
|
||||
int len;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "u", &str, &len) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/* Gets a Unicode or binary string */
|
||||
zstr str;
|
||||
int len;
|
||||
zend_uchar type;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "t", &str, &len, &type) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
if (type == IS_UNICODE) {
|
||||
/* process str.u as Unicode string */
|
||||
} else {
|
||||
/* process str.s binary string */
|
||||
}
|
||||
|
||||
|
||||
/* Gets two string parameters, both of which will be guaranteed to be of the same type */
|
||||
zstr str1, str2;
|
||||
int len1, len2;
|
||||
zend_uchar type1, type2;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "TT", &str1, &len1,
|
||||
&type1, &str2, &len2, &type2) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
if (type1 == IS_UNICODE) {
|
||||
/* process as Unicode, str2 is guaranteed to be Unicode as well */
|
||||
} else {
|
||||
/* process as binary string, str2 is guaranteed to be the same */
|
||||
/* Get only the first three parameters (useful for varargs functions). */
|
||||
zval *z;
|
||||
zend_bool b;
|
||||
zval *r;
|
||||
if (zend_parse_parameters(3 TSRMLS_CC, "zbr!",
|
||||
&z, &b, &r) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -210,72 +115,13 @@ char *s;
|
||||
int length;
|
||||
|
||||
if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC,
|
||||
"lll", &l1, &l2, &l3) == SUCCESS) {
|
||||
/* manipulate longs */
|
||||
"lll", &l1, &l2, &l3) == SUCCESS) {
|
||||
/* manipulate longs */
|
||||
} else if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC,
|
||||
"s", &s, &length) == SUCCESS) {
|
||||
/* manipulate string */
|
||||
"s", &s, &length) == SUCCESS) {
|
||||
/* manipulate string */
|
||||
} else {
|
||||
/* output error */
|
||||
/* output error */
|
||||
|
||||
return;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/* Function that accepts only varargs (0 or more) */
|
||||
|
||||
int i, num_varargs;
|
||||
zval ***varargs = NULL;
|
||||
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "*", &varargs, &num_varargs) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (i = 0; i < num_varargs; i++) {
|
||||
/* do something with varargs[i] */
|
||||
}
|
||||
|
||||
if (varargs) {
|
||||
efree(varargs);
|
||||
}
|
||||
|
||||
|
||||
/* Function that accepts a string, followed by varargs (1 or more) */
|
||||
|
||||
char *str;
|
||||
int str_len;
|
||||
int i, num_varargs;
|
||||
zval ***varargs = NULL;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s+", &str, &str_len, &varargs, &num_varargs) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (i = 0; i < num_varargs; i++) {
|
||||
/* do something with varargs[i] */
|
||||
}
|
||||
|
||||
if (varargs) {
|
||||
efree(varargs);
|
||||
}
|
||||
|
||||
|
||||
/* Function that takes an array, followed by varargs, and ending with a long */
|
||||
long num;
|
||||
zval *array;
|
||||
int i, num_varargs;
|
||||
zval ***varargs = NULL;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "a*l", &array, &varargs, &num_varargs, &num) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (i = 0; i < num_varargs; i++) {
|
||||
/* do something with varargs[i] */
|
||||
}
|
||||
|
||||
if (varargs) {
|
||||
efree(varargs);
|
||||
}
|
||||
|
||||
-11
@@ -1,11 +0,0 @@
|
||||
To install the PEAR installer, please use go-pear.
|
||||
|
||||
On linux:
|
||||
$ lynx -source http://pear.php.net/go-pear | php
|
||||
|
||||
or save the setup script under go-pear.php and run:
|
||||
|
||||
php go-pear.php
|
||||
|
||||
For more informations see the PEAR manual:
|
||||
http://pear.php.net/manual/en/installation.getting.php
|
||||
@@ -1,155 +0,0 @@
|
||||
1. strrpos() and strripos() now use the entire string as a needle. Be aware
|
||||
that the existing scripts may no longer work as you expect.
|
||||
|
||||
EX :
|
||||
<?php
|
||||
var_dump(strrpos("ABCDEF","DEF"));
|
||||
var_dump(strrpos("ABCDEF","DAF"));
|
||||
?>
|
||||
|
||||
Will give you different results. The former returns 3 while the latter
|
||||
returns false rather than the position of the last occurrence of 'D'.
|
||||
The same applies to strripos().
|
||||
|
||||
2. Illegal use of string offsets causes E_ERROR instead of E_WARNING.
|
||||
|
||||
EX :
|
||||
<?php
|
||||
$a = "foo";
|
||||
unset($a[0][1][2]);
|
||||
?>
|
||||
|
||||
Fatal error: Cannot use string offset as an array in ... on line 1
|
||||
|
||||
3. array_merge() was changed to accept only arrays. If a non-array variable is
|
||||
passed, a E_WARNING will be thrown for every such parameter. Be careful
|
||||
because your code may start emitting E_WARNING out of the blue.
|
||||
|
||||
4. Be careful when porting from ext/mysql to ext/mysqli. The following
|
||||
functions return NULL when no more data is available in the result set
|
||||
(ext/mysql's functions return FALSE).
|
||||
|
||||
- mysqli_fetch_row()
|
||||
- mysqli_fetch_array()
|
||||
- mysqli_fetch_assoc()
|
||||
|
||||
5. PATH_TRANSLATED server variable is no longer set implicitly under
|
||||
Apache2 SAPI in contrast to the situation in PHP 4, where it is set to the
|
||||
same value as the SCRIPT_FILENAME server variable when it is not populated
|
||||
by Apache. This change was made to comply with the CGI specification.
|
||||
Please refer to bug #23610 for further information.
|
||||
|
||||
6. Starting PHP 5.0.0 the T_ML_CONSTANT constant is no longer defined by the
|
||||
ext/tokenizer extension. If error_reporting is set to E_ALL notices will
|
||||
be produced. Instead of T_ML_CONSTANT for /* */ the T_COMMENT constant
|
||||
is used, thus both // and /* */ are resolved as the T_COMMENT constant.
|
||||
However the PHPDoc style comments /** */ ,which starting PHP 5 are parsed
|
||||
by PHP, are recongnized as T_DOC_COMMENT.
|
||||
|
||||
7. $_SERVER should be populated with argc and argv if variables_order
|
||||
includes "S". If you have specifically configured your system to not
|
||||
create $_SERVER, then of course it shouldn't be there. The change was to
|
||||
always make argc and argv available in the CLI version regardless of the
|
||||
variables_order setting. As in, the CLI version will now always populate
|
||||
the global $argc and $argv variables.
|
||||
|
||||
8. In some cases classes must be declared before used. It only happens only
|
||||
if some of the new features of PHP 5 are used. Otherwise the behaviour is
|
||||
the old.
|
||||
Example 1 (works with no errors):
|
||||
<?php
|
||||
$a = new a();
|
||||
class a {
|
||||
}
|
||||
?>
|
||||
|
||||
Example 2 (throws an error):
|
||||
<?php
|
||||
$a = new a();
|
||||
interface b{
|
||||
}
|
||||
class a implements b {
|
||||
}
|
||||
?>
|
||||
|
||||
Output (example 2) :
|
||||
Fatal error: Class 'a' not found in /tmp/cl.php on line 2
|
||||
|
||||
9. get_class() starting PHP 5 returns the name of the class as it was
|
||||
declared which may lead to problems in older scripts that rely on
|
||||
the previous behaviour - the class name is lowercased. Expect the
|
||||
same behaviour from get_parent_class() when applicable.
|
||||
Example :
|
||||
<?php
|
||||
class FooBar {
|
||||
}
|
||||
class ExtFooBar extends FooBar{}
|
||||
$a = new FooBar();
|
||||
var_dump(get_class($a), get_parent_class($a));
|
||||
?>
|
||||
|
||||
Output (PHP 4):
|
||||
string(6) "foobar"
|
||||
string(9) "extfoobar"
|
||||
|
||||
Output (PHP 5):
|
||||
string(6) "FooBar"
|
||||
string(9) "ExtFooBar"
|
||||
----------------------------------------------------------------------
|
||||
Example code that will break :
|
||||
//....
|
||||
function someMethod($p) {
|
||||
if (get_class($p) != 'helpingclass') {
|
||||
return FALSE;
|
||||
}
|
||||
//...
|
||||
}
|
||||
//...
|
||||
Possible solution is to search for get_class() and get_parent_class() in
|
||||
all your scripts and use strtolower().
|
||||
|
||||
10. get_class_methods() returns the names of the methods of a class as they
|
||||
declared. In PHP4 the names are all lowercased.
|
||||
Example code :
|
||||
<?php
|
||||
class Foo{
|
||||
function doFoo(){}
|
||||
function hasFoo(){}
|
||||
}
|
||||
var_dump(get_class_methods("Foo"));
|
||||
?>
|
||||
Output (PHP4):
|
||||
array(2) {
|
||||
[0]=>
|
||||
string(5) "dofoo"
|
||||
[1]=>
|
||||
string(6) "hasfoo"
|
||||
}
|
||||
Output (PHP5):
|
||||
array(2) {
|
||||
[0]=>
|
||||
string(5) "doFoo"
|
||||
[1]=>
|
||||
string(6) "hasFoo"
|
||||
}
|
||||
|
||||
11. Assignment $this is impossible. Starting PHP 5.0.0 $this has special
|
||||
meaning in class methods and is recognized by the PHP parser. The latter
|
||||
will generate a parse error when assignment to $this is found
|
||||
Example code :
|
||||
<?php
|
||||
class Foo {
|
||||
function assignNew($obj) {
|
||||
$this = $obj;
|
||||
}
|
||||
}
|
||||
$a = new Foo();
|
||||
$b = new Foo();
|
||||
$a->assignNew($b);
|
||||
echo "I was executed\n";
|
||||
?>
|
||||
Output (PHP 4):
|
||||
I was executed
|
||||
Output (PHP 5):
|
||||
PHP Fatal error: Cannot re-assign $this in /tmp/this_ex.php on line 4
|
||||
|
||||
@@ -1,429 +0,0 @@
|
||||
1. libmagic (ext/fileinfo) see ext/fileinfo/libmagic/LICENSE
|
||||
2. Oniguruma (ext/mbstring) see ext/mbstring/oniguruma/COPYING
|
||||
3. libmbfl (ext/mbstring) see ext/mbstring/libmbfl/LICENSE
|
||||
4. pcrelib (ext/pcre) see ext/pcre/pcrelib/LICENCE
|
||||
5. ext/standard crypt
|
||||
6. ext/standard crypt's blowfish implementation
|
||||
7. Sqlite/Sqlite3 ext/sqlite3 ext/sqlite
|
||||
8. ext/json/json_parser
|
||||
9. ext/standard/rand
|
||||
10. ext/standard/scanf
|
||||
11. ext/standard/strnatcmp.c
|
||||
12. ext/standard/uuencode
|
||||
13. libxmlrpc ext/xmlrpc
|
||||
14. libzip ext/zip
|
||||
15. main/snprintf.c
|
||||
16. main/strlcat
|
||||
17. main/strlcpy
|
||||
18. libgd see ext/gd/libgd/COPYING
|
||||
|
||||
5. ext/standard crypt
|
||||
|
||||
FreeSec: libcrypt for NetBSD
|
||||
|
||||
Copyright (c) 1994 David Burren
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
3. Neither the name of the author nor the names of other contributors
|
||||
may be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGE.
|
||||
|
||||
|
||||
6. ext/standard crypt's blowfish implementation
|
||||
|
||||
This code comes from John the Ripper password cracker, with reentrant
|
||||
and crypt(3) interfaces added, but optimizations specific to password
|
||||
cracking removed.
|
||||
|
||||
Written by Solar Designer <solar at openwall.com> in 1998-2002 and
|
||||
placed in the public domain.
|
||||
|
||||
There's absolutely no warranty.
|
||||
|
||||
It is my intent that you should be able to use this on your system,
|
||||
as a part of a software package, or anywhere else to improve security,
|
||||
ensure compatibility, or for any other purpose. I would appreciate
|
||||
it if you give credit where it is due and keep your modifications in
|
||||
the public domain as well, but I don't require that in order to let
|
||||
you place this code and any modifications you make under a license
|
||||
of your choice.
|
||||
|
||||
This implementation is compatible with OpenBSD bcrypt.c (version 2a)
|
||||
by Niels Provos <provos at citi.umich.edu>, and uses some of his
|
||||
ideas. The password hashing algorithm was designed by David Mazieres
|
||||
<dm at lcs.mit.edu>.
|
||||
|
||||
There's a paper on the algorithm that explains its design decisions:
|
||||
|
||||
http://www.usenix.org/events/usenix99/provos.html
|
||||
|
||||
Some of the tricks in BF_ROUND might be inspired by Eric Young's
|
||||
Blowfish library (I can't be sure if I would think of something if I
|
||||
hadn't seen his code).
|
||||
|
||||
|
||||
7. Sqlite/Sqlite3 ext/sqlite3 ext/sqlite
|
||||
|
||||
The author disclaims copyright to this source code. In place of
|
||||
a legal notice, here is a blessing:
|
||||
May you do good and not evil.
|
||||
May you find forgiveness for yourself and forgive others.
|
||||
May you share freely, never taking more than you give.
|
||||
|
||||
|
||||
8. ext/json/json_parser
|
||||
Copyright (c) 2005 JSON.org
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
The Software shall be used for Good, not Evil.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
|
||||
9. ext/standard/rand
|
||||
The following php_mt_...() functions are based on a C++ class MTRand by
|
||||
Richard J. Wagner. For more information see the web page at
|
||||
http://www-personal.engin.umich.edu/~wagnerr/MersenneTwister.html
|
||||
|
||||
Mersenne Twister random number generator -- a C++ class MTRand
|
||||
Based on code by Makoto Matsumoto, Takuji Nishimura, and Shawn Cokus
|
||||
Richard J. Wagner v1.0 15 May 2003 rjwagner@writeme.com
|
||||
|
||||
The Mersenne Twister is an algorithm for generating random numbers. It
|
||||
was designed with consideration of the flaws in various other generators.
|
||||
The period, 2^19937-1, and the order of equidistribution, 623 dimensions,
|
||||
are far greater. The generator is also fast; it avoids multiplication and
|
||||
division, and it benefits from caches and pipelines. For more information
|
||||
see the inventors' web page at http://www.math.keio.ac.jp/~matumoto/emt.html
|
||||
|
||||
Reference
|
||||
M. Matsumoto and T. Nishimura, "Mersenne Twister: A 623-Dimensionally
|
||||
Equidistributed Uniform Pseudo-Random Number Generator", ACM Transactions on
|
||||
Modeling and Computer Simulation, Vol. 8, No. 1, January 1998, pp 3-30.
|
||||
|
||||
Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura,
|
||||
Copyright (C) 2000 - 2003, Richard J. Wagner
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
3. The names of its contributors may not be used to endorse or promote
|
||||
products derived from this software without specific prior written
|
||||
permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
|
||||
10. ext/standard/scanf
|
||||
scanf.c --
|
||||
|
||||
This file contains the base code which implements sscanf and by extension
|
||||
fscanf. Original code is from TCL8.3.0 and bears the following copyright:
|
||||
|
||||
This software is copyrighted by the Regents of the University of
|
||||
California, Sun Microsystems, Inc., Scriptics Corporation,
|
||||
and other parties. The following terms apply to all files associated
|
||||
with the software unless explicitly disclaimed in individual files.
|
||||
|
||||
The authors hereby grant permission to use, copy, modify, distribute,
|
||||
and license this software and its documentation for any purpose, provided
|
||||
that existing copyright notices are retained in all copies and that this
|
||||
notice is included verbatim in any distributions. No written agreement,
|
||||
license, or royalty fee is required for any of the authorized uses.
|
||||
Modifications to this software may be copyrighted by their authors
|
||||
and need not follow the licensing terms described here, provided that
|
||||
the new terms are clearly indicated on the first page of each file where
|
||||
they apply.
|
||||
|
||||
IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY
|
||||
FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
|
||||
ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY
|
||||
DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,
|
||||
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE
|
||||
IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE
|
||||
NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR
|
||||
MODIFICATIONS.
|
||||
|
||||
GOVERNMENT USE: If you are acquiring this software on behalf of the
|
||||
U.S. government, the Government shall have only "Restricted Rights"
|
||||
in the software and related documentation as defined in the Federal
|
||||
Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2). If you
|
||||
are acquiring the software on behalf of the Department of Defense, the
|
||||
software shall be classified as "Commercial Computer Software" and the
|
||||
Government shall have only "Restricted Rights" as defined in Clause
|
||||
252.227-7013 (c) (1) of DFARs. Notwithstanding the foregoing, the
|
||||
authors grant the U.S. Government and others acting in its behalf
|
||||
permission to use and distribute the software in accordance with the
|
||||
terms specified in this license.
|
||||
|
||||
11. ext/standard/strnatcmp.c
|
||||
|
||||
strnatcmp.c -- Perform 'natural order' comparisons of strings in C.
|
||||
Copyright (C) 2000 by Martin Pool <mbp@humbug.org.au>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
|
||||
12. ext/standard/uuencode
|
||||
Portions of this code are based on Berkeley's uuencode/uudecode
|
||||
implementation.
|
||||
|
||||
Copyright (c) 1983, 1993
|
||||
The Regents of the University of California. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
3. All advertising materials mentioning features or use of this software
|
||||
must display the following acknowledgement:
|
||||
This product includes software developed by the University of
|
||||
California, Berkeley and its contributors.
|
||||
4. Neither the name of the University nor the names of its contributors
|
||||
may be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGE.
|
||||
|
||||
|
||||
13. libxmlrpc ext/xmlrpc
|
||||
|
||||
Copyright 2000 Epinions, Inc.
|
||||
|
||||
Subject to the following 3 conditions, Epinions, Inc. permits you, free
|
||||
of charge, to (a) use, copy, distribute, modify, perform and display this
|
||||
software and associated documentation files (the "Software"), and (b)
|
||||
permit others to whom the Software is furnished to do so as well.
|
||||
|
||||
1) The above copyright notice and this permission notice shall be included
|
||||
without modification in all copies or substantial portions of the
|
||||
Software.
|
||||
|
||||
2) THE SOFTWARE IS PROVIDED "AS IS", WITHOUT ANY WARRANTY OR CONDITION OF
|
||||
ANY KIND, EXPRESS, IMPLIED OR STATUTORY, INCLUDING WITHOUT LIMITATION ANY
|
||||
IMPLIED WARRANTIES OF ACCURACY, MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
||||
PURPOSE OR NONINFRINGEMENT.
|
||||
|
||||
3) IN NO EVENT SHALL EPINIONS, INC. BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES OR LOST PROFITS ARISING OUT
|
||||
OF OR IN CONNECTION WITH THE SOFTWARE (HOWEVER ARISING, INCLUDING
|
||||
NEGLIGENCE), EVEN IF EPINIONS, INC. IS AWARE OF THE POSSIBILITY OF SUCH
|
||||
DAMAGES.
|
||||
|
||||
14. libzip ext/zip
|
||||
zip.h -- exported declarations.
|
||||
Copyright (C) 1999-2009 Dieter Baron and Thomas Klausner
|
||||
|
||||
This file is part of libzip, a library to manipulate ZIP archives.
|
||||
The authors can be contacted at <libzip@nih.at>
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in
|
||||
the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
3. The names of the authors may not be used to endorse or promote
|
||||
products derived from this software without specific prior
|
||||
written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS
|
||||
OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY
|
||||
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
||||
GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
||||
IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
|
||||
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
15. main/snprintf.c
|
||||
Copyright (c) 2002, 2006 Todd C. Miller <Todd.Miller@courtesan.com>
|
||||
|
||||
Permission to use, copy, modify, and distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
Sponsored in part by the Defense Advanced Research Projects
|
||||
Agency (DARPA) and Air Force Research Laboratory, Air Force
|
||||
Materiel Command, USAF, under agreement number F39502-99-1-0512.
|
||||
|
||||
main/spprintf
|
||||
Copyright (c) 1995-1998 The Apache Group. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in
|
||||
the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
|
||||
3. All advertising materials mentioning features or use of this
|
||||
software must display the following acknowledgment:
|
||||
"This product includes software developed by the Apache Group
|
||||
for use in the Apache HTTP server project (http://www.apache.org/)."
|
||||
|
||||
4. The names "Apache Server" and "Apache Group" must not be used to
|
||||
endorse or promote products derived from this software without
|
||||
prior written permission.
|
||||
|
||||
5. Redistributions of any form whatsoever must retain the following
|
||||
acknowledgment:
|
||||
"This product includes software developed by the Apache Group
|
||||
for use in the Apache HTTP server project (http://www.apache.org/)."
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE APACHE GROUP ``AS IS'' AND ANY
|
||||
EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE APACHE GROUP OR
|
||||
ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||
OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
====================================================================
|
||||
|
||||
This software consists of voluntary contributions made by many
|
||||
individuals on behalf of the Apache Group and was originally based
|
||||
on public domain software written at the National Center for
|
||||
Supercomputing Applications, University of Illinois, Urbana-Champaign.
|
||||
For more information on the Apache Group and the Apache HTTP server
|
||||
project, please see <http://www.apache.org/>.
|
||||
|
||||
This code is based on, and used with the permission of, the
|
||||
SIO stdio-replacement strx_* functions by Panos Tsirigotis
|
||||
<panos@alumni.cs.colorado.edu> for xinetd.
|
||||
|
||||
16. main/strlcat
|
||||
17. main/strlcpy
|
||||
Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com>
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
3. The name of the author may not be used to endorse or promote products
|
||||
derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||
OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
@@ -1,286 +0,0 @@
|
||||
=======================
|
||||
PHP Release Process
|
||||
=======================
|
||||
|
||||
General notes and tips
|
||||
----------------------
|
||||
|
||||
1. Do not release on Fridays, Saturdays or Sundays
|
||||
because the sysadmins can not upgrade stuff then.
|
||||
|
||||
2. Package the day before a release. So if the release is to be on Thursday,
|
||||
package on Wednesday.
|
||||
|
||||
3. Ensure that Windows builds will work before packaging
|
||||
|
||||
4. Follow all steps to the letter. When unclear ask previous RM's (Derick/Ilia)
|
||||
before proceeding. Ideally make sure that for the first releases one of the
|
||||
previous RM's is around to answer questions. For the steps related to the
|
||||
php/QA/bug websites try to have someone from the webmaster team (Bjori) on hand.
|
||||
|
||||
5. Verify the tags to be extra sure everything was tagged properly.
|
||||
|
||||
6. Moving extensions from/to PECL requires root level access to the CVS server.
|
||||
Contact systems@php.net to get this taken care of.
|
||||
|
||||
Moving extensions from php-src to PECL
|
||||
- Filesystem: cp -r php-src/ext/foo pecl/foo
|
||||
- cvs rm php-src/ext/foo
|
||||
|
||||
If the extension is still usable or not dead, in cooperation with the extension
|
||||
maintainers if any:
|
||||
- create the pecl.php.net/foo package and its content, license, maintainer
|
||||
- create the package.xml, commit
|
||||
- release the package
|
||||
|
||||
Moving extensions from PECL to php-src
|
||||
- Filesystem: cp -r pecl/foo php-src/ext/foo
|
||||
OR depending on the wishes from the PECL extension maintainer.
|
||||
- Filesystem: ln -s pecl/foo php-src/ext/foo
|
||||
|
||||
Rolling a non stable release (alpha/beta/RC)
|
||||
--------------------------------------------
|
||||
|
||||
1. Check windows snapshot builder logs (http://snaps.php.net/win32/snapshot-STABLE.log f.e.)
|
||||
|
||||
2. Bump the version numbers in ``main/php_version.h``, ``configure.in`` and possibly ``NEWS``.
|
||||
Do not use abbreviations for alpha and beta.
|
||||
|
||||
3. Commit those changes
|
||||
|
||||
4. run the "scripts/dev/credits" script in php-src and commit the changes in the
|
||||
credits files in ext/standard.
|
||||
|
||||
5. tag the repository with the version f.e. "``cvs tag php_4_4_1RC1``"
|
||||
(of course, you need to change that to the version you're rolling an RC for).
|
||||
|
||||
6. Bump up the version numbers in ``main/php_version.h``, ``configure.in``
|
||||
and possibly ``NEWS`` again, to the **next** version. F.e. if the release
|
||||
candidate was "4.4.1RC1" then the new one should be "4.4.1RC2-dev" - regardless
|
||||
if we get a new RC or not. This is to make sure ``version_compare()`` can
|
||||
correctly work.
|
||||
|
||||
7. Commit those changes
|
||||
|
||||
8. Log in onto the snaps box and go into the correct tree (f.e. the PHP_4_4
|
||||
branch if you're rolling 4.4.x releases).
|
||||
|
||||
9. You do not have to update the tree, but of course you can with "``cvs up -dP``".
|
||||
|
||||
10. run: ``./makedist php 4.4.1RC1``, this will export the tree, create configure
|
||||
and build two tarballs (one gz and one bz2).
|
||||
|
||||
11. Copy those two tarballs to www.php.net, in your homedir there should be a
|
||||
directory "downloads/". Copy them into there, so that the system can generate
|
||||
MD5 sums. If you do not have this directory, talk to Derick.
|
||||
|
||||
12. Now the RC can be found on http://downloads.php.net/yourname,
|
||||
f.e. http://downloads.php.net/derick/
|
||||
|
||||
13. Once the release has been tagged, contact the PHP Windows development team
|
||||
(internals-win@lists.php.net) so that Windows binaries can be created. Once
|
||||
those are made, they should be placed into the same directory as the source snapshots.
|
||||
|
||||
Getting the non stable release (alpha/beta/RC) announced
|
||||
--------------------------------------------------------
|
||||
|
||||
1. Send an email (see example here: http://news.php.net/php.internals/19486)
|
||||
**To** ``internals@lists.php.net`` and ``php-general@lists.php.net`` lists
|
||||
pointing out "the location of the release" and "the possible release date of
|
||||
either the next RC, or the final release".
|
||||
|
||||
2. Send an email (see example here http://news.php.net/php.pear.qa/5201) **To**
|
||||
``php-qa@lists.php.net`` and ``primary-qa-tests@lists.php.net``.
|
||||
This email is to notify the selected projects about a new release so that they
|
||||
can make sure their projects keep working. Make sure that you have been setup
|
||||
as a moderator for ``primary-qa-tests@lists.php.net`` by having someone (Wez,
|
||||
Derick) run the following commands for you:
|
||||
|
||||
``ssh lists.php.net``
|
||||
|
||||
``sudo -u ezmlm ezmlm-sub ~ezmlm/primary-qa-tester/mod moderator-email-address``
|
||||
|
||||
3. Update the MD5 sums in ``web/qa/trunk/include/rc-md5sums.txt`` (no empty lines).
|
||||
|
||||
4. Update in ``web/qa/trunk/include/release-qa.php`` constants with the new RC and
|
||||
commit this.
|
||||
|
||||
a. ``$BUILD_TEST_RELEASES`` = array("4.4.7RC1", "5.2.2RC1")
|
||||
|
||||
b. ``$CURRENT_QA_RELEASE_4`` = "4.4.7RC1" (``$CURRENT_QA_RELEASE_5`` for PHP5)
|
||||
|
||||
c. ``$RELEASE_PROCESS`` = array(4 => true, 5 => true)
|
||||
|
||||
1. Update in ``php-bugs/trunk/include/functions.inc`` the ``show_version_option``
|
||||
function to include the new RC and commit.
|
||||
|
||||
2. Update ``phpweb/include/version.inc`` (x=major version number)
|
||||
|
||||
a. ``$PHP_x_RC`` = "5.3.0RC1"
|
||||
|
||||
b. ``$PHP_x_RC_DATE`` = "06 September 2007"
|
||||
|
||||
3. Commit those changes:
|
||||
|
||||
a. ``cvs commit include/version.inc include/releases.inc``
|
||||
|
||||
4. For the first RC, write the doc team (phpdoc@lists.php.net) about updating the
|
||||
INSTALL and win32/install.txt files which are generated from the PHP manual sources.
|
||||
|
||||
Rolling a stable release
|
||||
------------------------
|
||||
|
||||
1. Check windows snapshot builder logs (http://snaps.php.net/win32/snapshot-STABLE.log f.e.)
|
||||
|
||||
2. Bump the version numbers in ``main/php_version.h``, ``configure.in`` and possibly ``NEWS``.
|
||||
|
||||
3. **Merge** all related sections in NEWS (f.e. merge the 4.4.1RC1 and 4.4.0 sections)
|
||||
|
||||
4. Commit those changes
|
||||
|
||||
5. run the "scripts/dev/credits" script in php-src and commit the changes in the
|
||||
credits files in ext/standard.
|
||||
|
||||
6. tag the repository with the version f.e. "``cvs tag php_4_4_1``"
|
||||
(of course, you need to change that to the version you're rolling an RC for).
|
||||
When making 5.X release, you need to tag the Zend directory separately!!
|
||||
|
||||
7. Bump up the version numbers in ``main/php_version.h``, ``configure.in`` and
|
||||
possibly ``NEWS`` again, to the **next** version. F.e. if the release candidate
|
||||
was "4.4.1RC1" then the new one should be "4.4.1RC2-dev" - regardless if we get
|
||||
a new RC or not. This is to make sure ``version_compare()`` can correctly work.
|
||||
|
||||
8. Commit those changes
|
||||
|
||||
9. Log in onto the snaps box and go into the correct tree (f.e. the PHP_4_4
|
||||
branch if you're rolling 4.4.x releases).
|
||||
|
||||
10. You do not have to update the tree, but of course you can with "``cvs up -dP``".
|
||||
|
||||
11. run: ``./makedist php 4.4.1``, this will export the tree, create configure
|
||||
and build two tarballs (one gz and one bz2).
|
||||
|
||||
12. Commit those two tarballs to CVS (phpweb/distributions)
|
||||
|
||||
13. Once the release has been tagged, contact the PHP Windows development team
|
||||
(internals-win@lists.php.net) so that Windows binaries can be created. Once
|
||||
those are made, they should be committed to CVS too.
|
||||
|
||||
14. Check if the pear files are updated (phar for 5.1+ or run pear/make-pear-bundle.php with 4.4)
|
||||
|
||||
15. When making a final release, also remind the PHP Windows development team
|
||||
(internals-win@lists.php.net) to prepare the installer packages for Win32.
|
||||
|
||||
Getting the stable release announced
|
||||
------------------------------------
|
||||
|
||||
1. Run the bumpRelease script for phpweb on your local checkout
|
||||
|
||||
a. ``php bin/bumpRelease 5`` (or ``php bin/bumpRelease 4`` for PHP4)
|
||||
|
||||
2. Edit ``phpweb/include/version.inc`` and change (X=major release number):
|
||||
|
||||
a. ``$PHP_X_VERSION`` to the correct version
|
||||
|
||||
b. ``$PHP_X_DATE`` to the release date
|
||||
|
||||
c. ``$PHP_X_MD5`` array and update all the md5 sums
|
||||
|
||||
d. set ``$PHP_X_RC`` to false!
|
||||
|
||||
e. Make sure there are no outdated "notes" or edited "date" keys in the
|
||||
``$RELEASES[X][$PHP_X_VERSION]["source"]`` array
|
||||
|
||||
f. if the windows builds aren't ready yet prefix the "windows" key with a dot (".windows")
|
||||
|
||||
3. Update the ChangeLog file for the given major version
|
||||
f.e. ``ChangeLog-4.php`` from the NEWS file
|
||||
|
||||
a. go over the list and put every element on one line
|
||||
|
||||
b. check for &, < and > and escape them if necessary
|
||||
|
||||
c. remove all the names at the ends of lines
|
||||
|
||||
d. for marking up, you can do the following (with VI):
|
||||
|
||||
I. ``s/^- /<li>/``
|
||||
|
||||
II. ``s/$/<\/li>/``
|
||||
|
||||
III. ``s/Fixed bug #\([0-9]\+\)/<?php bugfix(\1); ?>/``
|
||||
|
||||
IV. ``s/Fixed PECL bug #\([0-9]\+\)/<?php peclbugfix(\1); ?>/``
|
||||
|
||||
V. ``s/FR #\([0-9]\+\)/FR <?php bugl(\1); ?>/``
|
||||
|
||||
4. ``cp releases/4_4_0.php releases/4_4_1.php``
|
||||
|
||||
5. ``cvs add releases/4_4_1.php``
|
||||
|
||||
6. Update the ``releases/*.php`` file with relevant data. The release
|
||||
announcement file should list in detail:
|
||||
|
||||
a. security fixes,
|
||||
|
||||
b. changes in behavior (whether due to a bug fix or not)
|
||||
|
||||
7. Add a short notice to phpweb stating that there is a new release, and
|
||||
highlight the major important things (security fixes) and when it is important
|
||||
to upgrade.
|
||||
|
||||
a. Call php bin/createNewsEntry in your local phpweb checkout
|
||||
|
||||
b. Add the content for the news entry
|
||||
|
||||
8. Commit all the changes.
|
||||
|
||||
9. Wait an hour or two, then send a mail to php-announce@lists.php.net,
|
||||
php-general@lists.php.net and internals@lists.php.net with a text similar to
|
||||
http://news.php.net/php.internals/17222.
|
||||
|
||||
10. Update ``php-bugs-web/include/functions.php`` to include the new version
|
||||
number, and remove the RC from there.
|
||||
|
||||
11. Update ``qaweb/include/release-qa.php``
|
||||
|
||||
a. Update the $BUILD_TEST_RELEASES array with the release name
|
||||
|
||||
b. Update $RELEASE_PROCESS array (set to false)
|
||||
|
||||
I. For PHP4: Set $CURRENT_QA_RELEASE_4 to false
|
||||
|
||||
II. For PHP5: Set $CURRENT_QA_RELEASE_5 to false
|
||||
|
||||
Re-releasing the same version (or -pl)
|
||||
--------------------------------------
|
||||
|
||||
1. Commit the new binaries to ``phpweb/distributions/``
|
||||
|
||||
2. Edit ``phpweb/include/version.inc`` and change (X=major release number):
|
||||
|
||||
a. If only releasing for one OS, make sure you edit only those variables
|
||||
|
||||
b. ``$PHP_X_VERSION`` to the correct version
|
||||
|
||||
c. ``$PHP_X_DATE`` to the release date
|
||||
|
||||
d. ``$PHP_X_MD5`` array and update all the md5 sums
|
||||
|
||||
e. Make sure there are no outdated "notes" or edited "date" keys in the
|
||||
``$RELEASES[X][$PHP_X_VERSION]["source"]`` array
|
||||
|
||||
3. Add a short notice to phpweb stating that there is a new release, and
|
||||
highlight the major important things (security fixes) and when it is important
|
||||
to upgrade.
|
||||
|
||||
a. Call php bin/createNewsEntry in your local phpweb checkout
|
||||
|
||||
b. Add the content for the news entry
|
||||
|
||||
4. Commit all the changes (``include/version.inc``, ``archive/archive.xml``,
|
||||
``archive/entries/YYYY-MM-DD-N.xml``)
|
||||
|
||||
5. Wait an hour or two, then send a mail to php-announce@lists.php.net,
|
||||
php-general@lists.php.net and internals@lists.php.net with a text similar to
|
||||
the news entry.
|
||||
+1
-7
@@ -37,10 +37,9 @@ PHPAPI int php_stream_close(php_stream * stream);
|
||||
PHPAPI int php_stream_flush(php_stream * stream);
|
||||
PHPAPI int php_stream_seek(php_stream * stream, off_t offset, int whence);
|
||||
PHPAPI off_t php_stream_tell(php_stream * stream);
|
||||
PHPAPI int php_stream_lock(php_stream * stream, int mode);
|
||||
|
||||
These (should) behave in the same way as the ANSI stdio functions with similar
|
||||
names: fread, fwrite, fprintf, feof, fgetc, fgets, fclose, fflush, fseek, ftell, flock.
|
||||
names: fread, fwrite, fprintf, feof, fgetc, fgets, fclose, fflush, fseek, ftell.
|
||||
|
||||
Opening Streams
|
||||
===============
|
||||
@@ -158,11 +157,6 @@ can lead to a crash when the resource is later used/released.
|
||||
NOTE: If you are opening a stream and need it to be seekable, use the
|
||||
STREAM_MUST_SEEK option to php_stream_open_wrapper();
|
||||
|
||||
PHPAPI int php_stream_supports_lock(php_stream * stream);
|
||||
|
||||
This function will return either 1 (success) or 0 (failure) indicating whether or
|
||||
not a lock can be set on this stream. Typically you can only set locks on stdio streams.
|
||||
|
||||
Casting Streams
|
||||
===============
|
||||
What if your extension needs to access the FILE* of a user level file pointer?
|
||||
|
||||
+98
-123
@@ -1,152 +1,127 @@
|
||||
Submitting Patches to PHP
|
||||
=========================
|
||||
Submitting Patch for PHP
|
||||
========================
|
||||
|
||||
This document describes how to submit a patch for PHP. Creating a
|
||||
patch for PHP is easy!
|
||||
This document describes how to submit a patch for PHP. Since you are
|
||||
reading this document, you are willing to submit a patch for PHP.
|
||||
Please keep reading! Submitting a patch for PHP is easy. The hard
|
||||
part is making it acceptable for inclusion into our repository. :-)
|
||||
|
||||
You don't need any login accounts or special access to download,
|
||||
build, debug and begin submitting PHP code, tests or documentation for
|
||||
inclusion in PHP. Once you've followed this README and had several
|
||||
patches accepted, PHP commit privileges are often quickly granted.
|
||||
How to create patch?
|
||||
--------------------
|
||||
We are working with CVS. You need to get CVS source to create a patch
|
||||
that we accept. Visit http://www.php.net/anoncvs.php to get CVS
|
||||
source. You can check out older versions, but make sure you get
|
||||
the default branch (i.e. Do not use -r option when you check out the
|
||||
CVS source)
|
||||
|
||||
An excellent article to read first is:
|
||||
http://phpadvent.org/2008/less-whining-more-coding-by-elizabeth-smith
|
||||
Read CODING_STANDARDS file before you start working.
|
||||
|
||||
Now you are ready to create a patch. Modify source to fix a bug in PHP or
|
||||
add a new feature to PHP. After you finished editing, please test your
|
||||
patch. Read README.TESTING for testing.
|
||||
|
||||
After you finish testing your patch, take diff file using
|
||||
"cvs diff > your.patch" command.
|
||||
|
||||
Read README.TESTING for submitting a test script for your patch. This is
|
||||
not strictly required, but it is preferred to submit a test script along
|
||||
with your patch. Making new test script is very easy. It also helps us
|
||||
to understand what you have been fixed or added to PHP.
|
||||
|
||||
|
||||
Prework
|
||||
-------
|
||||
If you are fixing broken functionality then create a bug or identify
|
||||
an existing bug at http://bugs.php.net/. This can be used to track
|
||||
the patch progress and prevent your changes getting lost in the PHP
|
||||
mail archives.
|
||||
Tips for creating patch
|
||||
-----------------------
|
||||
If you would like to fix multiple bugs. It is easier for us if you
|
||||
could create 1 patch for 1 bug, but this is not strictly required.
|
||||
Note though that you might get little response, if your patch is
|
||||
too hard to review.
|
||||
|
||||
If your code change is large, then first discuss it with the extension
|
||||
maintainer and/or a development mail list. Extension maintainers can
|
||||
be found in the EXTENSIONS file in the PHP source. Use the
|
||||
internals@lists.php.net mail list to discuss changes to the base PHP
|
||||
code. Use pecl-dev@lists.php.net for changes to code that is only
|
||||
available from PECL (http://pecl.php.net/). Use pear-dev@lists.php.net
|
||||
for PEAR modules (http://pear.php.net/). Use phpdoc@lists.php.net for
|
||||
PHP documentation questions. Mail list subscription is explained on
|
||||
http://www.php.net/mailing-lists.php.
|
||||
If you would like change/add many lines, it is better to ask module
|
||||
maintainer and/or internals@lists.php.net, or pear-dev@lists.php.net if
|
||||
you are patching PEAR. Official module maintainers can be found in
|
||||
EXTENSIONS file in PHP source.
|
||||
|
||||
If a PHP or PECL patch affects user functionality or makes significant
|
||||
internal changes then create a simple Request For Comment (RFC) page
|
||||
on http://wiki.php.net/rfc before starting discussion. This RFC can be
|
||||
used for initial discussion and later for documentation. Wiki accounts
|
||||
can be requested on http://wiki.php.net/start?do=register
|
||||
|
||||
Online information on PHP internal C functions is at
|
||||
http://www.php.net/internals, though this is considered
|
||||
incomplete. Various external resources can be found on the web. A
|
||||
standard reference is the book "Extending and Embedding PHP" by Sara
|
||||
Golemon.
|
||||
|
||||
Information on contributing to PEAR is available at
|
||||
http://pear.php.net/manual/en/guide-developers.php
|
||||
|
||||
Information on contributing to PHP documentation is at
|
||||
http://php.net/dochowto and http://wiki.php.net/doc/howto
|
||||
|
||||
There are several IRC channels where PHP developers are often
|
||||
available to discuss questions. They include #php.pecl and #php.doc
|
||||
on the EFNet network and #php-dev-win on FreeNode.
|
||||
If you are new to CVS (Concurrent Versions System), visit
|
||||
http://cvshome.org/ for details.
|
||||
|
||||
|
||||
How to create your patch
|
||||
------------------------
|
||||
PHP uses Subversion (SVN) for revision control. Read
|
||||
http://www.php.net/svn.php for help on using SVN to get and build PHP
|
||||
source code. We recommend using a Sparse Directory checkout described
|
||||
in http://wiki.php.net/vcs/svnfaq. If you are new to SVN, read
|
||||
http://svnbook.red-bean.com.
|
||||
Recommended CVS client settings for creating patch file
|
||||
------------------------------------------------------
|
||||
Recommended ~/.cvsrc file setting is:
|
||||
------
|
||||
cvs -z3
|
||||
update -d -P
|
||||
checkout -P
|
||||
diff -u
|
||||
|
||||
Generally we ask that patches work on the current stable PHP
|
||||
development branch and on "trunk".
|
||||
------
|
||||
diff -u means:
|
||||
-u Use the unified output format.
|
||||
|
||||
Read CODING_STANDARDS before you start working.
|
||||
|
||||
After modifying the source see README.TESTING and
|
||||
http://qa.php.net/write-test.php for how to test. Submitting test
|
||||
scripts helps us to understand what functionality has changed. It is
|
||||
important for the stability and maintainability of PHP that tests are
|
||||
comprehensive.
|
||||
|
||||
After testing is finished, create a patch file using the command:
|
||||
|
||||
svn diff > your_patch.txt
|
||||
|
||||
For ease of review and later troubleshooting, submit individual
|
||||
patches for each bug or feature.
|
||||
With this CVS setting, you don't have to worry about adding/deleting
|
||||
newlines and spaces.
|
||||
|
||||
|
||||
Checklist for submitting your patch
|
||||
-----------------------------------
|
||||
- Update SVN source just before running your final 'diff' and
|
||||
before testing.
|
||||
- Run "make test" to check your patch doesn't break other features.
|
||||
- Rebuild PHP with --enable-debug (which will show some kinds of
|
||||
memory errors) and check the PHP and web server error logs after
|
||||
running the PHP tests.
|
||||
- Rebuild PHP with --enable-maintainer-zts to check your patch compiles
|
||||
on multi-threaded web servers.
|
||||
- Create test scripts for use with "make test".
|
||||
- Add in-line comments and/or have external documentation ready.
|
||||
- Review the patch once more just before submitting it.
|
||||
Check list for submitting patch
|
||||
-------------------------------
|
||||
- Did you run "make test" to check if your patch didn't break
|
||||
other features?
|
||||
- Did you compile PHP with --enable-debug and check the PHP and
|
||||
web server error logs when you test your patch?
|
||||
- Did you build PHP for multi-threaded web servers. (Optional)
|
||||
- Did you create test script for "make test"? (Recommended)
|
||||
- Did you check your patch is unified format and it does not
|
||||
contain white space changes? (If you are not using recommended
|
||||
cvs setting)
|
||||
- Did you update CVS source before you take final patch?
|
||||
- Did you read the patch again?
|
||||
|
||||
|
||||
Where to send your patch
|
||||
------------------------
|
||||
If you are patching PHP C source then email the patch to
|
||||
internals@lists.php.net
|
||||
Where to send your patch?
|
||||
-------------------------
|
||||
If you are patching C source, send the patch to internals@lists.php.net.
|
||||
If you are patching a module, you should also send the patch to the
|
||||
maintainer. Official module maintainers are listed in EXTENSION file
|
||||
in source.
|
||||
|
||||
If you patching a PECL extension then send the patch to
|
||||
pecl-dev@lists.php.net
|
||||
If you are patching PEAR, send the patch to pear-dev@lists.php.net.
|
||||
|
||||
If you are patching PEAR then send the patch to
|
||||
pear-dev@lists.php.net
|
||||
Please add the prefix "[PATCH]" to your email subject and make sure
|
||||
to include the patch as a MIME attachment even if it is short.
|
||||
|
||||
If you are patching PHP's documentation then send the patch to
|
||||
phpdoc@lists.php.net
|
||||
NOTE: only MIME attachments of type 'text/*' are accepted. The
|
||||
easiest way to acclomplish this, is to make the extension
|
||||
'.txt'.
|
||||
|
||||
The mail can be CC'd to the extension maintainer (see EXTENSIONS).
|
||||
Test scripts should be included in the same email.
|
||||
Explain what has been fixed/added/changed by your patch.
|
||||
|
||||
Please make the subject prefix "[PATCH]", for example "[PATCH] Fix
|
||||
return value of all array functions"
|
||||
|
||||
Include the patch as an attachment with a file extension of ".txt".
|
||||
This is because only MIME attachments of type 'text/*' are accepted.
|
||||
|
||||
Explain what has been fixed/added/changed by your patch. Test scripts
|
||||
should be included in the email.
|
||||
|
||||
Include the bug id(s) which can be closed by your patch.
|
||||
|
||||
Finally, update any open bugs and add a link to the source of your
|
||||
patch.
|
||||
Finally, add the bug Id(s) which can be closed by your patch, if any.
|
||||
|
||||
|
||||
What happens after you submit your patch
|
||||
----------------------------------------
|
||||
If your patch is easy to review and obviously has no side-effects,
|
||||
it might be committed relatively quickly.
|
||||
--------------------------------------
|
||||
If your patch is easy to review and has obviously no side-effects,
|
||||
it might take up to a few hours until someone commits it.
|
||||
|
||||
Because PHP is a volunteer-driven effort more complex patches will
|
||||
require patience on your side. If you do not receive feedback in a few
|
||||
days, consider resubmitting the patch. Before doing this think about
|
||||
Because this is a volunteer-driven effort, more complex patches will
|
||||
require more patience on your side.
|
||||
|
||||
If you did not receive any feedback in a few days, please consider
|
||||
resubmitting the description of your patch, along-side with
|
||||
these questions:
|
||||
|
||||
- Did I review the mail list archives to see if these kind of
|
||||
changes had been discussed before?
|
||||
- Did I explain my patch clearly?
|
||||
- Is my patch too hard to review? Because of which factors?
|
||||
- Are there any unwanted white space changes?
|
||||
- Is my patch too hard to review? Because of which factors?
|
||||
- Should I split it up in multiple parts?
|
||||
- Are there any unwanted whitespace changes?
|
||||
|
||||
|
||||
What happens when your patch is applied
|
||||
---------------------------------------
|
||||
Your name will be included in the SVN commit log. If your patch
|
||||
affects end users, a brief description and your name might be added to
|
||||
the NEWS file.
|
||||
What happens when your patch is applied?
|
||||
----------------------------------------
|
||||
Your name will be included together with your email address in the CVS
|
||||
commit log. If your patch affects end-users, a brief description
|
||||
and your name might be added to the NEWS file.
|
||||
|
||||
Thank you for patching PHP!
|
||||
|
||||
|
||||
Thank you for submitting patch for PHP!
|
||||
@@ -1,146 +0,0 @@
|
||||
====================
|
||||
SVN Commit Rules
|
||||
====================
|
||||
|
||||
This is the first file you should be reading after you get your SVN account.
|
||||
We'll assume you're basically familiar with SVN, but feel free to post
|
||||
your questions on the mailing list. Please have a look at
|
||||
http://svnbook.red-bean.com/ for more detailed information on SVN.
|
||||
|
||||
PHP is developed through the efforts of a large number of people.
|
||||
Collaboration is a Good Thing(tm), and SVN lets us do this. Thus, following
|
||||
some basic rules with regards to SVN usage will::
|
||||
|
||||
a. Make everybody happier, especially those responsible for maintaining
|
||||
the SVN itself.
|
||||
|
||||
b. Keep the changes consistently well documented and easily trackable.
|
||||
|
||||
c. Prevent some of those 'Oops' moments.
|
||||
|
||||
d. Increase the general level of good will on planet Earth.
|
||||
|
||||
Having said that, here are the organizational rules::
|
||||
|
||||
1. Respect other people working on the project.
|
||||
|
||||
2. Discuss any significant changes on the list before committing and get
|
||||
confirmation from the release manager for the given branch.
|
||||
|
||||
3. Look at EXTENSIONS file to see who is the primary maintainer of
|
||||
the code you want to contribute to.
|
||||
|
||||
4. If you "strongly disagree" about something another person did, don't
|
||||
start fighting publicly - take it up in private email.
|
||||
|
||||
5. If you don't know how to do something, ask first!
|
||||
|
||||
6. Test your changes before committing them. We mean it. Really.
|
||||
To do so use "make test".
|
||||
|
||||
7. For development use the --enable-maintainer-zts switch to ensure your
|
||||
code handles TSRM correctly and doesn't break for thos who need that.
|
||||
|
||||
Currently we have the following branches in use::
|
||||
|
||||
trunk Will become PHP 6.0. This branch is for active development.
|
||||
|
||||
branches/PHP_5_3 Is used to release the PHP 5.3.x series. It still allows for
|
||||
larger enhancements.
|
||||
|
||||
branches/PHP_5_2 Is used to release the PHP 5.2.x series. Only bugfixes are permitted
|
||||
on this branch (Consult the releasemaster prior to commit).
|
||||
|
||||
branches/PHP_5_1 This branch is closed.
|
||||
|
||||
branches/PHP_4_4 This branch is closed.
|
||||
|
||||
The next few rules are more of a technical nature::
|
||||
|
||||
1. All changes should first go to trunk and then get merged from trunk
|
||||
(aka MFH'ed) to all other relevant branches.
|
||||
|
||||
2. DO NOT TOUCH ChangeLog! It is automagically updated from the commit
|
||||
messages every day. Woe be to those who attempt to mess with it.
|
||||
|
||||
3. All news updates intended for public viewing, such as new features,
|
||||
bug fixes, improvements, etc., should go into the NEWS file of the
|
||||
*first* to be released version with the given change. In other words
|
||||
any NEWS file change only needs to done in one branch.
|
||||
|
||||
NB! Lines, starting with @ will go automagically into NEWS file, but
|
||||
this is NOT recommended, though. Please, add news entries directly to
|
||||
NEWS file and don't forget to keep them adjusted and sorted.
|
||||
|
||||
4. Do not commit multiple file and dump all messages in one commit. If you
|
||||
modified several unrelated files, commit each group separately and
|
||||
provide a nice commit message for each one. See example below.
|
||||
|
||||
5. Do write your commit message in such a way that it makes sense even
|
||||
without the corresponding diff. One should be able to look at it, and
|
||||
immediately know what was modified. Definitely include the function name
|
||||
in the message as shown below.
|
||||
|
||||
6. In your commit messages, keep each line shorter than 80 characters. And
|
||||
try to align your lines vertically, if they wrap. It looks bad otherwise.
|
||||
|
||||
7. If you modified a function that is callable from PHP, prepend PHP to
|
||||
the function name as shown below.
|
||||
|
||||
|
||||
The format of the commit messages is pretty simple.
|
||||
|
||||
Use a - to start a new item in your commit message.
|
||||
|
||||
If a line begins with #, it is taken to be a comment and will not appear
|
||||
in the ChangeLog. Everything else goes into the ChangeLog.
|
||||
|
||||
It is important to note that if your comment or news logline spans multiple
|
||||
lines, you have to put # at the beginning of **every** such line.
|
||||
|
||||
Example. Say you modified two files, datetime.c and string.c. In datetime.c you
|
||||
added a new format option for the date() function, and in string.c you fixed a
|
||||
memory leak in php_trim(). Don't commit both of these at once. Commit them
|
||||
separately and try to make sure your commit messages look something like the
|
||||
following.
|
||||
|
||||
For datetime.c::
|
||||
|
||||
- Added new 'K' format modifier to date() for printing out number of days
|
||||
until New Year's Eve.
|
||||
|
||||
For string.c::
|
||||
|
||||
- Fixed a memory leak in php_trim() resulting from improper use of zval_dtor().
|
||||
#- Man, that thing was leaking all over the place!
|
||||
|
||||
The # lines will be omitted from the ChangeLog automagically.
|
||||
|
||||
Use the [DOC] tag in your log message whenever you feel that your changes
|
||||
imply a documentation modification. The php-doc team will automatically
|
||||
get notified about your commit through the php-doc mailing list.
|
||||
|
||||
If you fix some bugs, you should note the bug ID numbers in your
|
||||
commit message. Bug ID should be prefixed by "#" for easier access to
|
||||
bug report when developers are browsing SVN via LXR or Bonsai.
|
||||
|
||||
Example::
|
||||
|
||||
Fixed bug #14016 (pgsql notice handler double free crash bug.)
|
||||
|
||||
If you don't see your messages in ChangeLog right away, don't worry!
|
||||
These files are updated once a day, so your stuff will not show up until
|
||||
somewhat later.
|
||||
|
||||
When you change the NEWS file for a bug fix, then please keep the bugs
|
||||
sorted in decreasing order under the fixed version.
|
||||
|
||||
You can use LXR (http://lxr.php.net/) and Bonsai (http://bonsai.php.net/)
|
||||
to look at PHP SVN repository in various ways.
|
||||
|
||||
To receive daily updates to ChangeLog and NEWS, send an empty message to
|
||||
php-cvs-daily-subscribe@lists.php.net.
|
||||
|
||||
Happy hacking,
|
||||
|
||||
PHP Team
|
||||
+146
-19
@@ -1,20 +1,11 @@
|
||||
[IMPORTANT NOTICE]
|
||||
------------------
|
||||
Failed tests usualy indicate a problem with your local system setup
|
||||
and not within PHP itself (at least for official PHP release versions).
|
||||
You may decide to automaticaly submit a test summary to our QA workflow
|
||||
at the end of a test run.
|
||||
Please do *not* submit a failed test as a bug or ask for help on why
|
||||
it failed on your system without providing substantial backup information
|
||||
on *why* the test failed on your special setup. Thank you :-)
|
||||
Do _not_ ask to developers why some or all tests are failed under
|
||||
your environment! Let us know if you find why it fails. Thank you.
|
||||
|
||||
|
||||
[Testing Basics]
|
||||
----------------
|
||||
The easiest way to test your PHP build is to run "make test" from the
|
||||
command line after successfully compiling. This will run the complete
|
||||
tests for all enabled functionalities and extensions using the PHP
|
||||
CLI binary.
|
||||
To execute test scripts, you must build PHP with some SAPI, then you
|
||||
type "make test" to execute all or some test scripts saved under
|
||||
"tests" directory under source root directory.
|
||||
@@ -32,12 +23,11 @@ sapi/cli/php [-c /path/to/php.ini] run-tests.php [ext/foo/tests/GLOB]
|
||||
|
||||
[Which "php" executable "make test" look for]
|
||||
---------------------------------------------
|
||||
If you are running the run-tests.php script from the command line (as above)
|
||||
you must set the TEST_PHP_EXECUTABLE environment variable to explicitly
|
||||
select the PHP executable that is to be tested, that is, used to run the test scripts.
|
||||
You must use TEST_PHP_EXECUTABLE environment variable to explicitly
|
||||
select the php executable to be used to run the tests. That can either
|
||||
be the CLI or CGI executable.
|
||||
|
||||
If you run the tests using make test, the PHP CLI and CGI executables are
|
||||
automatically set for you. "make test" executes "run-tests.php" script with the CLI binary. Some
|
||||
"make test" executes "run-tests.php" script with "php" binary. Some
|
||||
test scripts such as session must be executed by CGI SAPI. Therefore,
|
||||
you must build PHP with CGI SAPI to perform all tests.
|
||||
|
||||
@@ -118,7 +108,7 @@ Example script to be run by cron(1):
|
||||
========== qa-test.sh =============
|
||||
#!/bin/sh
|
||||
|
||||
CO_DIR=$HOME/cvs/php5
|
||||
CO_DIR=$HOME/cvs/php4
|
||||
MYMAIL=qa-test@domain.com
|
||||
TMPDIR=/var/tmp
|
||||
TODAY=`date +"%Y%m%d"`
|
||||
@@ -129,7 +119,7 @@ export MAKE=gmake
|
||||
export CC=gcc
|
||||
|
||||
# Set test environment
|
||||
export NO_INTERACTION=1
|
||||
export NO_INTERACTIVITY=1
|
||||
export REPORT_EXIT_STATUS=1
|
||||
|
||||
cd $CO_DIR
|
||||
@@ -151,8 +141,145 @@ advised to test for non-zero, rather then a specific value.
|
||||
[Creating new test files]
|
||||
-------------------------
|
||||
Writing test file is very easy if you are used to PHP.
|
||||
See the HOWTO at http://qa.php.net/write-test.php
|
||||
|
||||
Here is an actual test file from standard module.
|
||||
|
||||
===== ext/standard/tests/strings/strtr.phpt =======
|
||||
--TEST--
|
||||
strtr() function
|
||||
--FILE--
|
||||
<?php
|
||||
/* Do not change this test it is a REATME.TESTING example. */
|
||||
$trans = array("hello"=>"hi", "hi"=>"hello", "a"=>"A", "world"=>"planet");
|
||||
var_dump(strtr("# hi all, I said hello world! #", $trans));
|
||||
?>
|
||||
--EXPECT--
|
||||
string(32) "# hello All, I sAid hi planet! #"
|
||||
===== ext/standard/tests/strings/strtr.phpt =======
|
||||
|
||||
As you can see the file is devided into several sections. Below is a
|
||||
list of all possible sections:
|
||||
|
||||
"--TEST--" is title of the test (required).
|
||||
"--SKIPIF--" is condition when to skip this test (optional).
|
||||
"--POST--" is POST variable passed to test script (optional).
|
||||
"--GET--" is GET variable passed to test script (optional).
|
||||
"--INI--" each line contains an ini setting e.g. foo=bar (optional).
|
||||
"--FILE--" is the test script (required).
|
||||
"--EXPECT--" is the expected output from the test script (required).
|
||||
"--EXPECTF--" is an alternative of --EXPECT--. The difference is that
|
||||
this form uses sscanf for output validation (alternative).
|
||||
"--EXPECTREGEX--" is an alternative of --EXPECT--. This form allows the tester
|
||||
to specify the result in a regular expression (alternative).
|
||||
|
||||
A test must at least contain the sections TEST, FILE and either EXPECT
|
||||
or EXPECTF. When a test is called run-test.php takes the name from the
|
||||
TEST section and writes the FILE section into a ".php" file with the
|
||||
same name as the ".phpt" file. This ".php" file will then be executed
|
||||
and its output compared to the contents of the EXPECT section. It is a
|
||||
good idea to generate output with var_dump() calls.
|
||||
|
||||
/ext/standard/tests/strings/str_shuffle.phpt is a good example for using
|
||||
EXPECTF instead of EXPECT. From time to time the algorithm used for shuffle
|
||||
changed and sometimes the machine used to execute the code has influence
|
||||
on the result of shuffle. But it always returns a three character string
|
||||
detectable by %s. Other scan-able forms are %i for integers, %d for numbers
|
||||
only, %f for floating point values, %c for single characters and %x for
|
||||
hexadecimal values.
|
||||
|
||||
==== /ext/standard/tests/strings/str_shuffle.phpt ===
|
||||
--TEST--
|
||||
Testing str_shuffle.
|
||||
--FILE--
|
||||
<?php
|
||||
/* Do not change this test it is a REATME.TESTING example. */
|
||||
$s = '123';
|
||||
var_dump(str_shuffle($s));
|
||||
var_dump($s);
|
||||
?>
|
||||
--EXPECTF--
|
||||
string(3) %s
|
||||
string(3) "123"
|
||||
==== end of /ext/standard/tests/strings/str_shuffle.phpt ===
|
||||
|
||||
/ext/standard/tests/strings/strings001.phpt is a good example for using
|
||||
EXPECTREGEX instead of EXPECT. This test also shows that in EXPECTREGEX
|
||||
some characters need to be escaped since otherwise they would be
|
||||
interpreted as a regular expression.
|
||||
|
||||
==== /ext/standard/tests/strings/strings001.phpt ===
|
||||
--TEST--
|
||||
Test whether strstr() and strrchr() are binary safe.
|
||||
--FILE--
|
||||
<?php
|
||||
/* Do not change this test it is a REATME.TESTING example. */
|
||||
$s = "alabala nica".chr(0)."turska panica";
|
||||
var_dump(strstr($s, "nic"));
|
||||
var_dump(strrchr($s," nic"));
|
||||
?>
|
||||
--EXPECTREGEX--
|
||||
string\(18\) \"nica\x00turska panica\"
|
||||
string\(19\) \" nica\x00turska panica\"
|
||||
==== end of /ext/standard/tests/strings/strings001.phpt ===
|
||||
|
||||
Some tests depend on modules or functions available only in certain versions
|
||||
or they even require minimum version of php or zend. These tests should be
|
||||
skipped when the requirement cannot be fullfilled. To achieve this you can
|
||||
use the SKIPIF section. To tell run-test.php that your test should be skipped
|
||||
the SKIPIF section must print out the word "skip" followed by a reason why
|
||||
the test should skip.
|
||||
|
||||
==== /ext/exif/tests/exif005.phpt ===
|
||||
--TEST--
|
||||
Check for exif_read_data, unusual IFD start
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('exif')) print 'skip exif extension not available';
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
/* Do not change this test it is a REATME.TESTING example.
|
||||
* test5.jpg is a 1*1 image that contains an Exif section with ifd = 00000009h
|
||||
*/
|
||||
$image = exif_read_data('./ext/exif/tests/test5.jpg','',true,false);
|
||||
var_dump($image['IFD0']);
|
||||
?>
|
||||
--EXPECT--
|
||||
array(2) {
|
||||
["ImageDescription"]=>
|
||||
string(11) "Ifd00000009"
|
||||
["DateTime"]=>
|
||||
string(19) "2002:10:18 20:06:00"
|
||||
}
|
||||
==== end of /ext/exif/tests/exif005.phpt ===
|
||||
|
||||
Test script and SKIPIF code should be directly written into *.phpt. However,
|
||||
it is recommended to use include files when more test scripts depend on the
|
||||
same SKIPIF code or when certain test files need the same values for some
|
||||
input. But no file used by any test should have one of the following
|
||||
extensions: ".php", ".log", ".exp", ".out" or ".diff".
|
||||
|
||||
Tests should be named according to the following list:
|
||||
|
||||
Class: Name: Example:
|
||||
Tests for bugs bug<bugid>.phpt bug17123.phpt
|
||||
Tests for functions <functionname>.phpt dba_open.phpt
|
||||
General tests for extensions <extname><no>.phpt dba3.phpt
|
||||
|
||||
When you use an include file for the SKIPIF section it should be named
|
||||
"skipif.inc" and an include file used in the FILE section of many tests
|
||||
should be named "test.inc".
|
||||
|
||||
NOTE: All tests should run correctly with error_reporting(E_ALL) and
|
||||
display_errors=1. This is the default when called from run-test.php.
|
||||
If you have a good reason for lowering the error reporting, use --INI--
|
||||
section and comment this in your testcode.
|
||||
|
||||
NOTE: If your test intentionally generates a PHP warning message use
|
||||
$php_errormsg variable, which you can then output. This will result
|
||||
in a consistent error message output across all platforms and PHP
|
||||
configurations, preventing your test from failing due inconsistencies
|
||||
in the error message content.
|
||||
|
||||
[How to help us]
|
||||
----------------
|
||||
|
||||
-137
@@ -1,137 +0,0 @@
|
||||
[IMPORTANT NOTICE]
|
||||
------------------
|
||||
This is an addendum to README.TESTING with additional information
|
||||
specific to server-tests.php.
|
||||
|
||||
server-tests.php is backward compatible with tests developed for
|
||||
the original run-tests.php script. server-tests is *not* used by
|
||||
'make test'. server-tests was developed to provide support for
|
||||
testing PHP under it's primary environment, HTTP, and can run the
|
||||
PHP tests under any of the SAPI modules that are direct executables,
|
||||
or are accessable via HTTP.
|
||||
|
||||
[New features]
|
||||
----------------
|
||||
* Command line interface:
|
||||
You can run 'php server-tests.php -h' to get all the possible options.
|
||||
* Configuration file:
|
||||
the -c argument will allow you to use a configuration file. This is
|
||||
handy if you are testing multiple environments and need various options
|
||||
depending on the environment.
|
||||
see server-tests-config.php for details.
|
||||
* CGI Emulation:
|
||||
Will emulate a CGI environment when testing with the cgi sapi executable.
|
||||
* HTTP testing:
|
||||
can be configured to run test scripts through an HTTP server running
|
||||
on localhost. localhost is required since either the web server must
|
||||
alias a directory to the php source directory, or the test scripts
|
||||
must be copied to a directory under the web server
|
||||
(see config options TEST_WEB_BASE_URL, TEST_BASE_PATH, and TEST_WEB_EXT)
|
||||
* New sections supported for test files (see below)
|
||||
|
||||
When running tests over http, tests that require ini settings different that what
|
||||
the web server runs under will be skipped. Since the test harness defines a number
|
||||
of ini settings by default, the web server may require special configuration to
|
||||
make testing work.
|
||||
|
||||
[Example Usage]
|
||||
----------------
|
||||
Some (but not all!) examples of usage:
|
||||
|
||||
1. run tests from the php source directory
|
||||
php server-tests.php -p /path/to/php-cli
|
||||
|
||||
2. run tests using cgi emulation
|
||||
php server-tests.php -p /path/to/php-cgi
|
||||
|
||||
3. run tests over http, copying test files into document root
|
||||
php server-tests.php -w -u http://localhost/test -m /path/to/htdocs/test
|
||||
|
||||
4. run tests over http, php sources have been aliased in web server
|
||||
php server-tests.php -w -u http://localhost/test
|
||||
|
||||
5. run tests using configuration file
|
||||
php server-tests.php -c /path/to/server-tests-config.php
|
||||
|
||||
6. run tests using configuration file, but overriding some settings:
|
||||
(config file must be first)
|
||||
php server-tests.php -c /path/to/server-tests-config.php -w -t 3 -d /path/to/testdir
|
||||
|
||||
NOTE: configuration as described in README.TESTING still works.
|
||||
|
||||
[New Test Sections]
|
||||
----------------
|
||||
In addition to the traditional test sections
|
||||
(see http://qa.php.net/write-test.php), several new sections are available
|
||||
under server-tests.
|
||||
|
||||
--POST--
|
||||
This is not a new section, but not multipart posts are supported for testing
|
||||
file uploads, or other types of POST data.
|
||||
|
||||
--CGI--
|
||||
This section takes no value. It merely provides a simple marker for tests
|
||||
that MUST be run as CGI, even if there is no --POST-- or --GET-- sections
|
||||
in the test file.
|
||||
|
||||
--DESCRIPTION--
|
||||
Not used for anything, just a section for documenting the test
|
||||
|
||||
--ENV--
|
||||
This section get's eval()'d to help build an environment for the
|
||||
execution of the test. This can be used to change environment
|
||||
vars that are used for CGI emulation, or simply to set env vars
|
||||
for cli testing. A full example looks like:
|
||||
|
||||
--ENV--
|
||||
return <<<END
|
||||
PATH_TRANSLATED=$filename
|
||||
PATH_INFO=$scriptname
|
||||
SCRIPT_NAME=$scriptname
|
||||
END;
|
||||
|
||||
Some variables are made easily available for use in this section, they
|
||||
include:
|
||||
$filename full native path to file, will become PATH_TRANSLATED
|
||||
$filepath =dirname($filename)
|
||||
$scriptname this is what will become SCRIPT_NAME unless you override it
|
||||
$docroot the equivelant of DOCUMENT_ROOT under Apache
|
||||
$cwd the directory that the test is being initiated from
|
||||
$this->conf all server-tests configuration vars
|
||||
$this->env all environment variables that will get passed to the test
|
||||
|
||||
|
||||
--REQUEST--
|
||||
This section is also eval'd, and is similar in nature to --ENV--. However,
|
||||
this section is used to build the url used in an HTTP request. Valid values
|
||||
to set in this section would include:
|
||||
SCRIPT_NAME The inital part of the request url
|
||||
PATH_INFO The pathinfo part of a request url
|
||||
FRAGMENT The fragment section of a url (after #)
|
||||
QUERY_STRING The query part of a url (after ?)
|
||||
|
||||
--REQUEST--
|
||||
return <<<END
|
||||
PATH_INFO=/path/info
|
||||
END;
|
||||
|
||||
--HEADERS--
|
||||
This section is also eval'd. It is used to provide additional headers sent
|
||||
in an HTTP request, such as content type for multipart posts, cookies, etc.
|
||||
|
||||
--HEADERS--
|
||||
return <<<END
|
||||
Content-Type=multipart/form-data; boundary=---------------------------240723202011929
|
||||
Content-Length=100
|
||||
END;
|
||||
|
||||
--EXPECTHEADERS--
|
||||
This section can be used to define what headers are required to be
|
||||
received back from a request, and is checked in addition to the
|
||||
regular expect sections. For example:
|
||||
|
||||
--EXPECTHEADERS--
|
||||
Status: 404
|
||||
|
||||
|
||||
|
||||
-644
@@ -1,644 +0,0 @@
|
||||
Audience
|
||||
========
|
||||
|
||||
This README describes how PHP 6 provides native support for the Unicode
|
||||
Standard. Readers of this document should be proficient with PHP and have a
|
||||
basic understanding of Unicode concepts. For more technical details about
|
||||
PHP 6 design principles and for guidelines about writing Unicode-ready PHP
|
||||
extensions, refer to README.UNICODE-UPGRADES.
|
||||
|
||||
Introduction
|
||||
============
|
||||
|
||||
As successful as PHP has proven to be over the years, its support for
|
||||
multilingual and multinational environments has languished. PHP can no
|
||||
longer afford to remain outside the overall movement towards the Unicode
|
||||
standard. Although recent updates involving the mbstring extension have
|
||||
enabled easier multibyte data processing, this does not constitute native
|
||||
Unicode support.
|
||||
|
||||
Since the full implementation of the Unicode Standard is very involved, our
|
||||
approach is to speed up implementation by using the well-tested,
|
||||
full-featured, and freely available ICU (International Components for
|
||||
Unicode) library.
|
||||
|
||||
|
||||
General Remarks
|
||||
===============
|
||||
|
||||
International Components for Unicode
|
||||
------------------------------------
|
||||
|
||||
ICU (International Components for Unicode is a mature, widely used set of
|
||||
C/C++ and Java libraries for Unicode support, software internationalization
|
||||
and globalization. It provides:
|
||||
|
||||
- Encoding conversions
|
||||
- Collations
|
||||
- Unicode text processing
|
||||
- and much more
|
||||
|
||||
When building PHP 6, Unicode support is always enabled. The only
|
||||
configuration option during development should be the location of the ICU
|
||||
headers and libraries.
|
||||
|
||||
--with-icu-dir=<dir>
|
||||
|
||||
where <dir> specifies the location of ICU header and library files. If you do
|
||||
not specify this option, PHP attempts to find ICU under /usr and /usr/local.
|
||||
|
||||
NOTE: ICU is not bundled with PHP 6 yet. To download the distribution, visit
|
||||
http://icu.sourceforge.net. PHP requires ICU version 3.4 or higher.
|
||||
|
||||
Backwards Compatibility
|
||||
-----------------------
|
||||
Our paramount concern for providing Unicode support is backwards compatibility.
|
||||
Because PHP is used on so many sites, existing data types and functions must
|
||||
work as they always have. However, although PHP's interfaces must remain
|
||||
backwards-compatible, the speed of certain operations might be affected due to
|
||||
internal implementation changes.
|
||||
|
||||
Encoding Names
|
||||
--------------
|
||||
All the encoding settings discussed in this document can accept any valid
|
||||
encoding name supported by ICU. For a full list of encodings, refer to the ICU
|
||||
online documentation.
|
||||
|
||||
NOTE: References to "Unicode" in this document generally mean the UTF-16
|
||||
character encoding, unless explicitly stated otherwise.
|
||||
|
||||
Unicode Semantics Switch
|
||||
========================
|
||||
|
||||
Because many applications do not require Unicode, PHP 6 provides a server-wide
|
||||
INI setting to enable Unicode support:
|
||||
|
||||
unicode.semantics = On/Off
|
||||
|
||||
This switch is off by default. If your applications do not require native
|
||||
Unicode support, you may leave this switch off, and continue to use Unicode
|
||||
strings only when you need to.
|
||||
|
||||
However, if your application is ready to fully support Unicode, you should
|
||||
turn this switch on. This activates various Unicode support mechanisms,
|
||||
including:
|
||||
|
||||
* All string literals become Unicode
|
||||
* All variables received from HTTP requests become Unicode
|
||||
* PHP identifiers may use Unicode characters
|
||||
|
||||
More fundamentally, your PHP environment is now a Unicode environment. Strings
|
||||
inside PHP are Unicode, and the system is responsible for converting non-Unicode
|
||||
strings on PHP's periphery (for example, in HTTP input and output, streams, and
|
||||
filesystem operations). With unicode.semantics on, you must specify binary
|
||||
strings explicitly. PHP makes no assumptions about the content of a binary
|
||||
string, so your application must handle all binary string appropriately.
|
||||
|
||||
Conversely, if unicode.semantics is off, PHP behaves as it did in the past.
|
||||
String literals do not become Unicode, and files are binary strings for
|
||||
backwards compatibility. You can always create Unicode strings programmatically,
|
||||
and all functions and operators support Unicode strings transparently.
|
||||
|
||||
|
||||
Fallback Encoding
|
||||
=================
|
||||
|
||||
The fallback encoding provides a default value for all other unicode.*_encoding
|
||||
INI settings. If you do not set a particular unicode.*_encoding setting, PHP
|
||||
uses the fallback encoding. If you do not specify a fallback encoding, PHP uses
|
||||
UTF-8.
|
||||
|
||||
unicode.fallback_encoding = "iso-8859-1"
|
||||
|
||||
|
||||
Runtime Encoding
|
||||
================
|
||||
|
||||
The runtime encoding specifies the encoding PHP uses for converting binary
|
||||
strings within the PHP engine itself.
|
||||
|
||||
unicode.runtime_encoding = "iso-8859-1"
|
||||
|
||||
This setting has no effect on I/O-related operations such as writing to
|
||||
standard out, reading from the filesystem, or decoding HTTP input variables.
|
||||
|
||||
PHP enables you to explicitly convert strings using casting:
|
||||
|
||||
* (binary) -- casts to binary string type
|
||||
* (unicode) -- casts to Unicode string type
|
||||
* (string) -- casts to Unicode string type if unicode.semantics is on,
|
||||
to binary otherwise
|
||||
|
||||
For example, if unicode.runtime_encoding is iso-8859-1, and $uni is a unicode
|
||||
string, then
|
||||
|
||||
$str = (binary)$uni
|
||||
|
||||
creates a binary string $str in the ISO-8859-1 encoding.
|
||||
|
||||
Implicit conversions include concatenation, comparison, and parameter passing.
|
||||
For better precision, PHP attempts to convert strings to Unicode before
|
||||
performing these sorts of operations. For example, if we concatenate our binary
|
||||
string $str with a unicode literal, PHP converts $str to Unicode first, using
|
||||
the encoding specified by unicode.runtime_encoding.
|
||||
|
||||
Output Encoding
|
||||
===============
|
||||
|
||||
PHP automatically converts output for commands that write to the standard
|
||||
output stream, such as 'print' and 'echo'.
|
||||
|
||||
unicode.output_encoding = "utf-8"
|
||||
|
||||
However, PHP does not convert binary strings. When writing to files or external
|
||||
resources, you must rely on stream encoding features or manually encode the data
|
||||
using functions provided by the unicode extension.
|
||||
|
||||
The existing default_charset INI setting is DEPRECATED in favor of
|
||||
unicode.output_setting. Previously, default_charset only specified the charset
|
||||
portion of the Content-Type MIME header. Now default_charset only takes effect
|
||||
when unicode.semantics is off, and it does not affect the actual transcoding of
|
||||
the output stream. Setting unicode.output_encoding causes PHP to add the
|
||||
'charset' portion to the Content-Type header, overriding any value set for
|
||||
default_charset.
|
||||
|
||||
|
||||
HTTP Input Encoding
|
||||
===================
|
||||
|
||||
The HTTP input encoding specifies the encoding of variables received via
|
||||
HTTP, such as the contents of the $_GET and _$POST arrays.
|
||||
|
||||
This functionality is currently under development. For a discussion of the
|
||||
approach that the PHP 6 team is taking, refer to:
|
||||
|
||||
http://marc.theaimsgroup.com/?t=116613047300005&r=1&w=2
|
||||
|
||||
|
||||
Filesystem Encoding
|
||||
===================
|
||||
|
||||
The filesystem encoding specifies the encoding of file and directory names
|
||||
on the filesystem.
|
||||
|
||||
unicode.filename_encoding = "utf-8"
|
||||
|
||||
Filesystem-related functions such as opendir() perform this conversion when
|
||||
accepting and returning file names. You should set the filename encoding to
|
||||
the encoding used by your filesystem.
|
||||
|
||||
|
||||
Script Encoding
|
||||
===============
|
||||
|
||||
You may write PHP scripts in any encoding supported by ICU. To specify the
|
||||
script encoding site-wide, use the INI setting:
|
||||
|
||||
unicode.script_encoding = utf-8
|
||||
|
||||
If you cannot change the encoding system wide, you can use a pragma to
|
||||
override the INI setting in a local script:
|
||||
|
||||
<?php declare(encoding = 'Shift-JIS'); ?>
|
||||
|
||||
The pragma setting must be the first statement in the script. It only affects
|
||||
the script in which it occurs, and does not propagate to any included files.
|
||||
|
||||
|
||||
INI Files
|
||||
=========
|
||||
|
||||
If unicode.semantics is on, INI files are presumed to contain UTF-8 encoded
|
||||
keys and values. If unicode.semantics is off, the data is taken as-is,
|
||||
similar to PHP 5. No validation occurs during parsing. Instead invalid UTF-8
|
||||
sequences are caught during access by ini_*() functions.
|
||||
|
||||
|
||||
Stream I/O
|
||||
==========
|
||||
|
||||
PHP has a streams-based I/O system for generalized filesystem access,
|
||||
networking, data compression, and other operations. Since the data on the
|
||||
other end of the stream can be in any encoding, you need to think about
|
||||
data conversion.
|
||||
|
||||
Okay, this needs to be clarified. By "default", streams are actually
|
||||
opened in binary mode. You have to specify 't' flag or use FILE_TEXT in
|
||||
order to open it in text mode, where conversions apply. And for the text
|
||||
mode streams, the default stream encoding is UTF-8 indeed.
|
||||
|
||||
By default, PHP opens streams in binary mode. To open a file in text mode,
|
||||
you must use the 't' flag (or the FILE_TEXT parameter -- see below). The
|
||||
default encoding for streams in text mode is UTF-8. This means that if
|
||||
'file.txt' is a UTF-8 text file, this code snippet:
|
||||
|
||||
$fp = fopen('file.txt', 'rt');
|
||||
$str = fread($fp, 100)
|
||||
|
||||
returns 100 Unicode characters, while:
|
||||
|
||||
$fp = fopen('file.txt', 'wt');
|
||||
$fwrite($fp, $uni)
|
||||
|
||||
writes to a UTF-8 text file.
|
||||
|
||||
If you mainly work with files in an encoding other than UTF-8, you can
|
||||
change the default context encoding setting:
|
||||
|
||||
stream_default_encoding('Shift-JIS');
|
||||
$data = file_get_contents('file.txt', FILE_TEXT);
|
||||
// work on $data
|
||||
file_put_contents('file.txt', $data, FILE_TEXT);
|
||||
|
||||
The file_get_contents() and file_put_contents() functions now accept an
|
||||
additional parameter, FILE_TEXT. If you provide FILE_TEXT for
|
||||
file_get_contents(), PHP returns a Unicode string. Without FILE_TEXT, PHP
|
||||
returns a binary string (which would be appropriate for true binary data, such
|
||||
as an image file). When writing a Unicode string with file_put_contents(), you
|
||||
must supply the FILE_TEXT parameter, or PHP generates a warning.
|
||||
|
||||
If you need to work with multiple encodings, you can create custom contexts
|
||||
using stream_context_create() and then pass in the custom context as an
|
||||
additional parameter. For example:
|
||||
|
||||
$ctx = stream_context_create(NULL, array('encoding' => 'big5'));
|
||||
$data = file_get_contents('file.txt', FILE_TEXT, $ctx);
|
||||
// work on $data
|
||||
file_put_contents('file.txt', $data, FILE_TEXT, $ctx);
|
||||
|
||||
|
||||
Conversion Semantics and Error Handling
|
||||
=======================================
|
||||
|
||||
PHP can convert strings explicitly (casting) and implicitly (concatenation,
|
||||
comparison, and parameter passing. For example, when concatenating a Unicode
|
||||
string and a binary string, PHP converts the binary string to Unicode for better
|
||||
precision.
|
||||
|
||||
However, not all characters can be converted between Unicode and legacy
|
||||
encodings. The first possibility is that a string contains corrupt data or
|
||||
an illegal byte sequence. In this case, the converter simply stops with
|
||||
a message that resembles:
|
||||
|
||||
Warning: Could not convert binary string to Unicode string
|
||||
(converter UTF-8 failed on bytes (0xE9) at offset 2)
|
||||
|
||||
Conversely, if a similar error occurs when attempting to convert Unicode to
|
||||
a legacy string, the converter generates a message that resembles:
|
||||
|
||||
Warning: Could not convert Unicode string to binary string
|
||||
(converter ISO-8859-1 failed on character {U+DC00} at offset 2)
|
||||
|
||||
To customize this behavior, refer to "Creating a Custom Error Handler" below.
|
||||
|
||||
The second possibility is that a Unicode character simply cannot be represented
|
||||
in the legacy encoding. By default, when downconverting from Unicode, the
|
||||
converter substitutes any missing sequences with the appropriate substitution
|
||||
sequence for that codepage, such as 0x1A (Control-Z) in ISO-8859-1. When
|
||||
upconverting to Unicode, the converter replaces any byte sequence that has no
|
||||
Unicode equivalent with the Unicode substitution character (U+FFFD).
|
||||
|
||||
You can customize the conversion error behavior to:
|
||||
|
||||
- stop the conversion and return an empty string
|
||||
- skip any invalid characters
|
||||
- substitute invalid characters with a custom substitution character
|
||||
- escape the invalid character in various formats
|
||||
|
||||
To control the global conversion error settings, use the functions:
|
||||
|
||||
unicode_set_error_mode(int direction, int mode)
|
||||
unicode_set_subst_char(unicode char)
|
||||
|
||||
where direction is either FROM_UNICODE or TO_UNICODE, and mode is one of these
|
||||
constants:
|
||||
|
||||
U_CONV_ERROR_STOP
|
||||
U_CONV_ERROR_SKIP
|
||||
U_CONV_ERROR_SUBST
|
||||
U_CONV_ERROR_ESCAPE_UNICODE
|
||||
U_CONV_ERROR_ESCAPE_ICU
|
||||
U_CONV_ERROR_ESCAPE_JAVA
|
||||
U_CONV_ERROR_ESCAPE_XML_DEC
|
||||
U_CONV_ERROR_ESCAPE_XML_HEX
|
||||
|
||||
As an example, with a runtime encoding of ISO-8859-1, the conversion:
|
||||
|
||||
$str = (binary)"< \u30AB >";
|
||||
|
||||
results in:
|
||||
|
||||
MODE RESULT
|
||||
--------------------------------------
|
||||
stop ""
|
||||
skip "< >"
|
||||
substitute "< ? >"
|
||||
escape (Unicode) "< {U+30AB} >"
|
||||
escape (ICU) "< %U30AB >"
|
||||
escape (Java) "< \u30AB >"
|
||||
escape (XML decimal) "< カ >"
|
||||
escape (XML hex) "< カ >"
|
||||
|
||||
With a runtime encoding of UTF-8, the conversion of the (illegal) sequence:
|
||||
|
||||
$str = (unicode)b"< \xe9\xfe >";
|
||||
|
||||
results in:
|
||||
|
||||
MODE RESULT
|
||||
--------------------------------------
|
||||
stop ""
|
||||
skip ""
|
||||
substitute ""
|
||||
escape (Unicode) "< %XE9%XFE >"
|
||||
escape (ICU) "< %XE9%XFE >"
|
||||
escape (Java) "< \xE9\xFE >"
|
||||
escape (XML decimal) "< éþ >"
|
||||
escape (XML hex) "< éþ >"
|
||||
|
||||
The substitution character can be set only for FROM_UNICODE direction and has to
|
||||
exist in the target character set. The default substitution character is (?).
|
||||
|
||||
NOTE: Casting is just a shortcut for using unicode.runtime_encoding. To convert
|
||||
using an alternative encoding, use the unicode_encode() and unicode_decode()
|
||||
functions. For example,
|
||||
|
||||
$str = unicode_encode($uni, 'koi8-r', U_CONV_ERROR_SUBST);
|
||||
|
||||
results in a binary KOI8-R encoded string.
|
||||
|
||||
Creating a Custom Error Handler
|
||||
-------------------------------
|
||||
If an error occurs during the conversion, PHP outputs a warning describing the
|
||||
problem. Instead of this default behavior, PHP can invoke a user-provided error
|
||||
handler, similar to how the current user-defined error handler works. To set
|
||||
the custom conversion error handler, call:
|
||||
|
||||
mixed unicode_set_error_handler(callback error_handler)
|
||||
|
||||
The function returns the previously defined custom error handler. If no error
|
||||
handler was defined, or if an error occurs when returning the handler, this
|
||||
function returns NULL.
|
||||
|
||||
When the custom handler is set, the standard error handler is bypassed. It is
|
||||
the responsibility of the custom handler to output or log any messages, raise
|
||||
exceptions, or die(), if necessary. However, if the custom error handler returns
|
||||
FALSE, the standard handler will be invoked afterwards.
|
||||
|
||||
The user function specified as the error_handler must accept five parameters:
|
||||
|
||||
mixed error_handler($direction, $encoding, $char_or_byte, $offset,
|
||||
$message)
|
||||
|
||||
where:
|
||||
|
||||
$direction - the direction of conversion, FROM_UNICODE/TO_UNICODE
|
||||
|
||||
$encoding - the name of the encoding to/from which the conversion
|
||||
was attempted
|
||||
|
||||
$char_or_byte - either Unicode character or byte sequence (depending
|
||||
on direction) which caused the error
|
||||
|
||||
$offset - the offset of the failed character/byte sequence in
|
||||
the source string
|
||||
|
||||
$message - the error message describing the problem
|
||||
|
||||
NOTE: If the error mode set by unicode_set_error_mode() is substitute,
|
||||
skip, or escape, the handler won't be called, since these are non-error
|
||||
causing operations. To always invoke your handler, set the error mode to
|
||||
U_CONV_ERROR_STOP.
|
||||
|
||||
|
||||
Unicode String Type
|
||||
===================
|
||||
|
||||
The Unicode string type (IS_UNICODE) is supposed to contain text data encoded in
|
||||
UTF-16. This is the main string type in PHP when Unicode semantics switch is
|
||||
turned on. Unicode strings can exist when the switch is off, but they have to be
|
||||
produced programmatically via calls to functions that return Unicode types.
|
||||
|
||||
|
||||
Binary String Type
|
||||
==================
|
||||
|
||||
Binary string type (IS_STRING) serves two purposes: backwards compatibility and
|
||||
representing non-Unicode strings and binary data. When Unicode semantics switch
|
||||
is off, it is used for all strings in PHP, same in previous versions. When the
|
||||
switch is on, this type will be used to store text in other encodings as well as
|
||||
true binary data such as images, PDFs, etc.
|
||||
|
||||
Printing binary data to the standard output passes it through as-is, independent
|
||||
of the output encoding.
|
||||
|
||||
For examples of specifying binary string literals, refer to the section
|
||||
"Language Modfications".
|
||||
|
||||
Language Modifications
|
||||
======================
|
||||
|
||||
If a Unicode switch is turned on, PHP string literals -- single-quoted,
|
||||
double-quoted, and heredocs -- become Unicode strings (IS_UNICODE type). String
|
||||
literals support all the same escape sequences and variable interpolations as
|
||||
before, plus several new escape sequences.
|
||||
|
||||
PHP interprets the contents of strings as follows:
|
||||
|
||||
- all non-escaped characters are interpreted as a corresponding Unicode
|
||||
codepoint based on the current script encoding, e.g. ASCII 'a' (0x61) =>
|
||||
U+0061, Shift-JIS (0x92 0x86) => U+4E2D
|
||||
|
||||
- existing PHP escape sequences are also interpreted as Unicode codepoints,
|
||||
including \xXX (hex) and \OOO (octal) numbers, e.g. "\x20" => U+0020
|
||||
|
||||
- two new escape sequences, \uXXXX and \UXXXXXX, are interpreted as a 4 or
|
||||
6-hex Unicode codepoint value, e.g. \u0221 => U+0221, \U010410 =>
|
||||
U+10410. (Having two sequences avoids the ambiguity of \u020608 --
|
||||
is that supposed to be U+0206 followed by "08", or U+020608 ?)
|
||||
|
||||
- a new escape sequence allows specifying a character by its full
|
||||
Unicode name, e.g. \C{THAI CHARACTER PHO SAMPHAO} => U+0E20
|
||||
|
||||
PHP allows variable interpolation inside the double-quoted and heredoc strings.
|
||||
However, the parser separates the string into literal and variable chunks during
|
||||
compilation, e.g. "abc $var def" -> "abc" . $var . "def". This means that PHP
|
||||
can handle literal chunks in the normal way as far as Unicode support is
|
||||
concerned.
|
||||
|
||||
Since all string literals become Unicode by default, PHP 6 introduces new syntax
|
||||
for creating byte-oriented or binary strings. Prefixing a string literal with
|
||||
the letter 'b' creates a binary string:
|
||||
|
||||
$var = b'abc\001';
|
||||
$var = b"abc\001";
|
||||
$var = b<<<EOD
|
||||
abc\001
|
||||
EOD;
|
||||
|
||||
The content of a binary string is the literal byte sequence inside the
|
||||
delimiters, which depends on the script encoding (unicode.script_encoding).
|
||||
Binary string literals support the same escape sequences as PHP 5 strings. If
|
||||
the Unicode switch is turned off, then the binary string literals generate the
|
||||
normal string (IS_STRING) type internally without any effect on the application.
|
||||
|
||||
The string operators now accomodate the new IS_UNICODE and IS_BINARY types:
|
||||
|
||||
- The concatenation operator (.) and concatenation assignment operator (.=)
|
||||
automatically coerce the IS_STRING type to the more precise IS_UNICODE if
|
||||
the operands are of different string types.
|
||||
|
||||
- The string indexing operator [] now accommodates IS_UNICODE type strings
|
||||
and extracts the specified character. To support supplementary characters,
|
||||
the index specifies a code point, not a byte or a code unit.
|
||||
|
||||
- Bitwise operators and increment/decrement operators do not work on
|
||||
Unicode strings. They do work on binary strings.
|
||||
|
||||
- Two new casting operators are introduced, (unicode) and (binary). The
|
||||
(string) operator casts to Unicode type if the Unicode semantics switch is
|
||||
on, and to binary type otherwise.
|
||||
|
||||
- The comparison operators compare Unicode strings in binary code point
|
||||
order. They also coerce strings to Unicode if the strings are of different
|
||||
types.
|
||||
|
||||
- The arithmetic operators use the same semantics as today for converting
|
||||
strings to numbers. A Unicode string is considered numeric if it
|
||||
represents a long or a double number in the en_US_POSIX locale.
|
||||
|
||||
|
||||
Unicode Support in Existing Functions
|
||||
=====================================
|
||||
|
||||
All functions in the PHP default distribution are undergoing analysis to
|
||||
determine which functions need to be upgraded for native Unicode support.
|
||||
You can track progress here:
|
||||
|
||||
http://www.php.net/~scoates/unicode/render_func_data.php
|
||||
|
||||
Key extensions that are fully converted include:
|
||||
|
||||
* curl
|
||||
* dom
|
||||
* json
|
||||
* mysql
|
||||
* mysqli
|
||||
* oci8
|
||||
* pcre
|
||||
* reflection
|
||||
* simplexml
|
||||
* soap
|
||||
* sqlite
|
||||
* xml
|
||||
* xmlreader/xmlwriter
|
||||
* xsl
|
||||
* zlib
|
||||
|
||||
NOTE: Unsafe functions might still work, since PHP performs Unicode conversions
|
||||
at runtime. However, unsafe functions might not work correctly with multibyte
|
||||
binary strings, or Unicode characters that are not representable in the
|
||||
specified unicode.runtime_encoding.
|
||||
|
||||
|
||||
Identifiers
|
||||
===========
|
||||
|
||||
Since scripts may be written in various encodings, we do not restrict
|
||||
identifiers to be ASCII-only. PHP allows any valid identifier based
|
||||
on the Unicode Standard Annex #31.
|
||||
|
||||
|
||||
Numbers
|
||||
=======
|
||||
|
||||
Unlike identifiers, numbers must consist only of ASCII digits,.and are
|
||||
restricted to the en_US_POSIX or C locale. In other words, numbers have no
|
||||
thousands separator, and the fractional separator is (.) "full stop". Numeric
|
||||
strings adhere to the same rules, so "10,3" is not interpreted as a number even
|
||||
if the current locale's fractional separator is a comma.
|
||||
|
||||
TextIterators
|
||||
=============
|
||||
|
||||
Instead of using the offset operator [] to access characters in a linear
|
||||
fashion, use a TextIterator instead. TextIterator is very fast and enables you
|
||||
to iterate over code points, combining sequences, characters, words, lines, and
|
||||
sentences, both forward and backward. For example:
|
||||
|
||||
$text = "nai\u308ve";
|
||||
foreach (new TextIterator($text) as $u) {
|
||||
var_inspect($u)
|
||||
}
|
||||
|
||||
lists six code points, including the umlaut (U+0308) as a separate code point.
|
||||
Instantiating the TextIterator to iterate over characters,
|
||||
|
||||
$text = "nai\u308ve";
|
||||
foreach (new TextIterator($text, TextIterator::CHARACTER) as $u) {
|
||||
var_inspect($u)
|
||||
}
|
||||
|
||||
lists five characters, including an "i" with an umlaut as a single character.
|
||||
|
||||
Locales
|
||||
=======
|
||||
|
||||
Unicode support in PHP relies exclusively on ICU locales, NOT the POSIX locales
|
||||
installed on the system. You may access the default ICU locale using:
|
||||
|
||||
locale_set_default()
|
||||
locale_get_default()
|
||||
|
||||
ICU locale IDs have a somewhat different format from POSIX locale IDs. The ICU
|
||||
syntax is:
|
||||
|
||||
<language>[_<script>]_<country>[_<variant>][@<keywords>]
|
||||
|
||||
For example, sr_Latn_YU_REVISED@currency=USD is Serbian (Latin, Yugoslavia,
|
||||
Revised Orthography, Currency=US Dollar).
|
||||
|
||||
Do not use the deprecated setlocale() function. This function interacts with the
|
||||
POSIX locale. If Unicode semantics are on, using setlocale() generates
|
||||
a deprecation warning.
|
||||
|
||||
Document TODO
|
||||
==========================================
|
||||
- Final review.
|
||||
- Fix the HTTP Input Encoding section, that's obsolete now.
|
||||
|
||||
|
||||
References
|
||||
==========
|
||||
|
||||
Unicode
|
||||
http://www.unicode.org
|
||||
|
||||
Unicode Glossary
|
||||
http://www.unicode.org/glossary/
|
||||
|
||||
UTF-8
|
||||
http://www.utf-8.com/
|
||||
|
||||
UTF-16
|
||||
http://www.ietf.org/rfc/rfc2781.txt
|
||||
|
||||
ICU Homepage
|
||||
http://www.ibm.com/software/globalization/icu/
|
||||
|
||||
ICU User Guide and API Reference
|
||||
http://icu.sourceforge.net/
|
||||
|
||||
Unicode Annex #31
|
||||
http://www.unicode.org/reports/tr31/
|
||||
|
||||
PHP Parameter Parsing API
|
||||
http://www.php.net/manual/en/zend.arguments.retrieval.php
|
||||
|
||||
|
||||
Authors
|
||||
=======
|
||||
Andrei Zmievski <andrei@gravitonic.com>
|
||||
Evan Goer <goer@yahoo-inc.com>
|
||||
|
||||
vim: set et tw=80 :
|
||||
@@ -1,806 +0,0 @@
|
||||
This document attempts to describe portions of the API related to the new
|
||||
Unicode functionality and the best practices for upgrading existing
|
||||
functions to support Unicode.
|
||||
|
||||
Your first stop should be README.UNICODE: it covers the general Unicode
|
||||
functionality and concepts without going into technical implementation
|
||||
details.
|
||||
|
||||
Internal Encoding
|
||||
=================
|
||||
|
||||
UTF-16 is the internal encoding used for Unicode strings. UTF-16 consumes
|
||||
two bytes for any Unicode character in the Basic Multilingual Plane, which
|
||||
is where most of the current world's languages are represented. While being
|
||||
less memory efficient for basic ASCII text it simplifies the processing and
|
||||
makes interfacing with ICU easier, since ICU uses UTF-16 for its internal
|
||||
processing as well.
|
||||
|
||||
|
||||
Zval Structure Changes
|
||||
======================
|
||||
|
||||
For IS_UNICODE type, we add another structure to the union:
|
||||
|
||||
union {
|
||||
....
|
||||
struct {
|
||||
UChar *val; /* Unicode string value */
|
||||
int len; /* number of UChar's */
|
||||
} ustr;
|
||||
....
|
||||
} value;
|
||||
|
||||
This cleanly separates the two types of strings and helps preserve backwards
|
||||
compatibility.
|
||||
|
||||
To optimize access to IS_STRING and IS_UNICODE storage at runtime, we need yet
|
||||
another structure:
|
||||
|
||||
union {
|
||||
....
|
||||
struct { /* Universal string type */
|
||||
zstr val;
|
||||
int len;
|
||||
} uni;
|
||||
....
|
||||
} value;
|
||||
|
||||
Where zstr is a union of char*, UChar*, and void*.
|
||||
|
||||
|
||||
Parameter Parsing API Modifications
|
||||
===================================
|
||||
|
||||
There are now five new specifiers: 'u', 't', 'T', 'U', 'S', 'x' and a new '&'
|
||||
modifier.
|
||||
|
||||
't' specifier
|
||||
-------------
|
||||
This specifier indicates that the caller requires the incoming parameter to be
|
||||
string data (IS_STRING, IS_UNICODE). The caller has to provide the storage for
|
||||
string value, length, and type.
|
||||
|
||||
void *str;
|
||||
int len;
|
||||
zend_uchar type;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "t", &str, &len, &type) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
if (type == IS_UNICODE) {
|
||||
/* process Unicode string */
|
||||
} else {
|
||||
/* process binary string */
|
||||
}
|
||||
|
||||
For IS_STRING type, the length represents the number of bytes, and for
|
||||
IS_UNICODE the number of UChar's. When converting other types (numbers,
|
||||
booleans, etc) to strings, the exact behavior depends on the Unicode semantics
|
||||
switch: if on, they are converted to IS_UNICODE, otherwise to IS_STRING.
|
||||
|
||||
|
||||
'u' specifier
|
||||
-------------
|
||||
This specifier indicates that the caller requires the incoming parameter
|
||||
to be a Unicode encoded string. If a non-Unicode string is passed, the engine
|
||||
creates a copy of the string and automatically convert it to Unicode type before
|
||||
passing it to the internal function. No such conversion is necessary for Unicode
|
||||
strings, obviously.
|
||||
|
||||
UChar *str;
|
||||
int len;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "u", &str, &len) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
/* process Unicode string */
|
||||
|
||||
|
||||
'T' specifier
|
||||
-------------
|
||||
This specifier is useful when the function takes two or more strings and
|
||||
operates on them. Using 't' specifier for each one would be somewhat
|
||||
problematic if the passed-in strings are of mixed types, and multiple
|
||||
checks need to be performed in order to do anything. All parameters
|
||||
marked by the 'T' specifier are promoted to the same type.
|
||||
|
||||
If at least one of the 'T' parameters is of Unicode type, then the rest of
|
||||
them are converted to IS_UNICODE. Otherwise all 'T' parameters are conveted to
|
||||
IS_STRING type.
|
||||
|
||||
|
||||
void *str1, *str2;
|
||||
int len1, len2;
|
||||
zend_uchar type1, type2;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "TT", &str1, &len1,
|
||||
&type1, &str2, &len2, &type2) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
if (type1 == IS_UNICODE) {
|
||||
/* process as Unicode, str2 is guaranteed to be Unicode as well */
|
||||
} else {
|
||||
/* process as binary string, str2 is guaranteed to be the same */
|
||||
}
|
||||
|
||||
|
||||
'x' specifier
|
||||
-------------
|
||||
This specifier acts as either 'u' or 's', depending on the value of the
|
||||
unicode semantics switch. If UG(unicode) is on, it behaves as 'u', and as
|
||||
's' otherwise.
|
||||
|
||||
The existing 's' specifier has been modified as well. If a Unicode string is
|
||||
passed in, it automatically copies and converts the string to the runtime
|
||||
encoding, and issues a warning. If a binary type is passed-in, no conversion
|
||||
is necessary. The '&' modifier can be used after 's' specifier to force
|
||||
a different converter instead.
|
||||
|
||||
char *str;
|
||||
int len;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s&", &str, &len, UG(utf8_conv)) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
/* here str is in UTF-8, if a Unicode string was passed in */
|
||||
|
||||
The 'U' and 'S' specifiers are similar to 'u' and 's' but they are more strict
|
||||
about the type of the passed-in parameter. If 'U' is specified and the binary
|
||||
string is passed in, the engine will issue a warning instead of doing automatic
|
||||
conversion. The converse applies to the 'S' specifier.
|
||||
|
||||
|
||||
Working in Unicode World
|
||||
========================
|
||||
|
||||
Strings
|
||||
-------
|
||||
|
||||
A lot of internal functionality is controlled by the unicode.semantics
|
||||
switch. Its value is found in the Unicode globals variable, UG(unicode). It
|
||||
is either on or off for the entire request.
|
||||
|
||||
The big thing is that there is a new string types: IS_UNICODE.
|
||||
This has its own storage in the value union part of
|
||||
zval (value.ustr) while non-unicode (binary) strings reuse the
|
||||
IS_STRING type and the value.str element of the zval.
|
||||
|
||||
New macros exist (parallel to Z_STRVAL/Z_STRLEN) for accessing unicode strings.
|
||||
|
||||
Z_USTRVAL(), Z_USTRLEN()
|
||||
- accesses the value (as a UChar*) and length (in code units) of the Unicode type string
|
||||
value.ustr.val value.ustr.len
|
||||
|
||||
Z_UNIVAL(), Z_UNILEN()
|
||||
- accesses the value (as a zstr) and length (in type-appropriate units)
|
||||
value.uni.val value.uni.len
|
||||
|
||||
Z_USTRCPLEN()
|
||||
- gives the number of codepoints (not units) in the Unicode type string
|
||||
This macro examines the actual string taking into account Surrogate Pairs
|
||||
and returns the number of UChar32(UTF32) codepoints which may be less than the
|
||||
number of UChar(UTF16) codeunits found in the string buffer.
|
||||
If this value will be used repeatedly, consider storing it in a local variable
|
||||
to avoid having to reexamine the string every time.
|
||||
|
||||
|
||||
ZVAL_* macros
|
||||
-------------
|
||||
|
||||
The 'dup' parameter to the ZVAL_STRING()/RETVAL_STRING()/RETURN_STRING() type
|
||||
macros has been extended slightly. The following defines are now encouraged instead:
|
||||
|
||||
#define ZSTR_DUPLICATE (1<<0)
|
||||
#define ZSTR_AUTOFREE (1<<1)
|
||||
|
||||
ZSTR_DUPLICATE (which has a resulting value of 1) serves the same purpose as a
|
||||
truth value in old-style 'dup' flags. The value of 1 was specifically chosen
|
||||
to match the common practice of passing a 1 for this parameter.
|
||||
Warning: If you find extension code which uses a truth value other than one for
|
||||
the dup flag, its logic should be modified to explicitly pass ZSTR_DUPLICATE instead.
|
||||
|
||||
ZSTR_AUTOFREE is used with macros such as ZVAL_RT_STRING which may populate Unicode
|
||||
zvals from non-unicode source strings. When UG(unicode) is on, the source string
|
||||
will be implicitly copied (to make a UChar* version). If the original string
|
||||
needed copying anyway this is fine. However if the original string was emalloc()'d
|
||||
and would have ordinarily been given to the engine (i.e. RETURN_STRING(estrdup("foo"), 0))
|
||||
then it will need to be freed in UG(unicode) mode to avoid leaking.
|
||||
The ZSTR_AUTOFREE flag ensures that the original string is freed in UG(unicode) mode.
|
||||
|
||||
ZVAL_UNICODE(pzv, str, dup), ZVAL_UNICODEL(pzv, str, str_len, dup)
|
||||
- Sets zval to hold a Unicode string. Takes the same parameters as
|
||||
Z_STRING(), Z_STRINGL().
|
||||
|
||||
ZVAL_U_STRING(conv, pzv, str, dup), ZVAL_U_STRINGL(conv, pzv, str, str_len, dup)
|
||||
- When UG(unicode) is off, it's equivalent to Z_STRING(), ZSTRINGL()
|
||||
and the conv parameter is ignored.
|
||||
When UG(unicode) is on, it sets zval to hold a Unicode representation of the
|
||||
passed-in string using the UConverter* specified by conv.
|
||||
Since a new string is always created in this case, passing ZSTR_DUPLICATE
|
||||
for 'dup' does not matter, but ZSTR_AUTOFREE will be used will be used to
|
||||
efree the original value
|
||||
|
||||
ZVAL_RT_STRING(pzv, str, dup), ZVAL_RT_STRINGL(pzv, str, str_len, dup)
|
||||
- When UG(unicode) is off, it's equivalent to Z_STRING(), Z_STRINGL().
|
||||
When UG(unicode) is on, it takes the input string, converts it to Unicode
|
||||
using the runtime_encoding converter and sets zval to it.
|
||||
Since a new string is always created in this case, passing ZSTR_DUPLICATE
|
||||
for 'dup' does not matter, but ZSTR_AUTOFREE will be used will be used to
|
||||
efree the original value
|
||||
|
||||
ZVAL_ASCII_STRING(pzv, str, dup), ZVAL_ASCII_STRINGL(pzv, str, str_len, dup)
|
||||
- When UG(unicode) is off, it's equivalent to Z_STRING(), Z_STRINGL().
|
||||
When UG(unicode) is on, it takes the input string, converts it to Unicode
|
||||
using an ASCII converter and sets zval to it.
|
||||
Since a new string is always created in this case, passing ZSTR_DUPLICATE
|
||||
for 'dup' does not matter, but ZSTR_AUTOFREE will be used will be used to
|
||||
efree the original value
|
||||
|
||||
ZVAL_UTF8_STRING(pzv, str, dup), ZVAL_UTF8_STRINGL(pzv, str, str_len, dup)
|
||||
- When UG(unicode) is off, it's equivalent to Z_STRING(), Z_STRINGL().
|
||||
When UG(unicode) is on, it takes the input string, converts it to Unicode
|
||||
using a UTF8 converter and sets zval to it.
|
||||
Since a new string is always created in this case, passing ZSTR_DUPLICATE
|
||||
for 'dup' does not matter, but ZSTR_AUTOFREE will be used will be used to
|
||||
efree the original value
|
||||
|
||||
ZVAL_ZSTR(pzv, type, zstr, dup), ZVAL_ZSTRL(pzv, type, zstr, zstr_len, dup)
|
||||
- This macro uses 'type' to switch between calling ZVAL_STRING(pzv, zstr.s, dup)
|
||||
and ZVAL_UNICODE(pzv, zstr.u, dup). No conversion happens so the
|
||||
presense of absense of ZSTR_AUTOFREE is ignored.
|
||||
|
||||
ZVAL_TEXT(pzv, zstr, dup), ZVAL_TEXTL(pzv, zstr, zstr_len, dup)
|
||||
- This macro sets the zval to hold either a Unicode or a normal string,
|
||||
depending on the value of UG(unicode). No conversion happens, so be certain
|
||||
that the string passed in matches the type expected by UG(unicode).
|
||||
One example of its usage would be to initialize zval to hold the name
|
||||
of a user function.
|
||||
|
||||
ZVAL_EMPTY_UNICODE(pzv) / ZVAL_EMPTY_TEXT(pzv)
|
||||
- These macros work identically to ZVAL_EMPTY_STRING() with the UNICODE
|
||||
version always generating an IS_UNICODE zval, and the TEXT version
|
||||
generating a UG(unicode) dependent string type.
|
||||
|
||||
ZVAL_UCHAR32(pzv, char)
|
||||
- Converts the character provided into a UChar string (which may potentially
|
||||
be 1 or 2 characters long in the case of surrogate pairs) and dispatches
|
||||
to ZVAL_UNICODEL().
|
||||
|
||||
|
||||
As usual, for each ZVAL_* macro, there is a matching RETVAL_* and RETURN_* macro.
|
||||
|
||||
Conversion Macros
|
||||
-----------------
|
||||
|
||||
convert_to_string_with_converter(zval *op, UConverter *conv)
|
||||
- converts a zval to native string using the specified converter, if necessary.
|
||||
|
||||
convert_to_unicode_with_converter(zval *op, UConverter *conv)
|
||||
- converts a zval to Unicode string using the specified converter, if
|
||||
necessary.
|
||||
|
||||
convert_to_unicode(zval *op)
|
||||
- converts a zval to Unicode string.
|
||||
|
||||
convert_to_string(zval *op)
|
||||
- Behaves just as it currently does, converting to IS_STRING type
|
||||
|
||||
convert_to_text(zval *op)
|
||||
- converts a zval to either Unicode or native string, depending on the
|
||||
value of UG(unicode) switch
|
||||
|
||||
zend_ascii_to_unicode() function can be used to convert an ASCII char*
|
||||
string to Unicode. This is useful especially for inline string literals, in
|
||||
which case you can simply use USTR_MAKE() macro, e.g.:
|
||||
|
||||
UChar* ustr;
|
||||
|
||||
ustr = USTR_MAKE("main");
|
||||
|
||||
If you need to initialize a few such variables, it may be more efficient to
|
||||
use ICU macros, which avoid the conversion, depending on the platform. See
|
||||
[1] for more information.
|
||||
|
||||
USTR_FREE(zstr) can be used to free a UChar* string safely, since it checks for
|
||||
NULL argument. USTR_LEN() takes a zstr as its argument, and
|
||||
depending on the UG(unicode) value, and returns its strlen() or u_strlen().
|
||||
|
||||
Array Manipulation
|
||||
------------------
|
||||
|
||||
The add_next_index_*(), add_index_*() and add_assoc_*() functions have been
|
||||
significantly expanded both to allow for the unicode type as a value and to
|
||||
permit various types of keys.
|
||||
|
||||
Values: In the following examples, {1} represents a placeholder for the keytype and
|
||||
its arguments (covered later).
|
||||
|
||||
add_{1}_unicode(zval *arr, {1}, UChar *ustr, int dup);
|
||||
add_{1}_unicodel(zval *arr, {1}, UChar *ustr, int ustr_len, int dup);
|
||||
- Works like add_{1}_string() and add_{1}_stringl() but takes a UChar* value
|
||||
and adds an IS_UNICODE type.
|
||||
|
||||
add_{1}_rt_string(zval *arr, {1}, char *str, int dup);
|
||||
add_{1}_rt_stringl(zval *arr, {1}, char *str, int str_len, int dup);
|
||||
- Works like add_{1}_string() and add_{1}_stringl() but converts the char*
|
||||
value to Unicode using runtime encoding when UG(unicode) is on.
|
||||
|
||||
add_{1}_ascii_string(zval *arr, {1}, char *str, int dup);
|
||||
add_{1}_ascii_stringl(zval *arr, {1}, char *str, int str_len, int dup);
|
||||
- Works like add_{1}_rt_string() and add_{1}_rt_stringl() but uses
|
||||
an ASCII converter rather than runtime encoding.
|
||||
|
||||
add_{1}_utf8_string(zval *arr, {1}, char *str, int dup);
|
||||
add_{1}_utf8_stringl(zval *arr, {1}, char *str, int str_len, int dup);
|
||||
- Works like add_{1}_rt_string() and add_{1}_rt_stringl() but uses
|
||||
a UTF8 converter rather than runtime encoding.
|
||||
|
||||
add_{1}_text(zval *arr, {1}, zstr str, int dup);
|
||||
add_{1}_textl(zval *arr, {1}, zstr str, int str_len, int dup);
|
||||
- Wrapper which dispatches to add_{1}_string(l)() or add_{1}_unicode(l)()
|
||||
depending on the setting of UG(unicode).
|
||||
|
||||
add_{1}_zstr(zval *arr, {1}, zend_uchar type, zstr str, int dup);
|
||||
add_{1}_zstrl(zval *arr, {1}, zend_uchar type, zstr str, int str_len, int dup);
|
||||
- Works like add_{1}_text() and add_{1}_textl(), but dispatches based on 'type'.
|
||||
|
||||
|
||||
Keys: In the following example, the zval* type is used for values, however
|
||||
each of the value types (including those listed above) are supported.
|
||||
|
||||
The existing key types work as they always have:
|
||||
add_next_index_zval(zval *arr, zval *val);
|
||||
add_index_zval(zval *arr, long idx, zval *val);
|
||||
add_assoc_zval(zval *arr, char *key, zval *val);
|
||||
add_assoc_zval_ex(zval *arr, char *key, int key_len, zval *val);
|
||||
. Associative keys are considered binary (IS_STRING)
|
||||
. Remember that key_len includes the terminating NULL
|
||||
|
||||
The following additional methods provide unicode capable keytypes:
|
||||
|
||||
add_u_assoc_zval(zval *arr, zend_uchar type, zstr key, zval *val);
|
||||
add_u_assoc_zval_ex(zval *arr, zend_uchar type, zstr key, int key_len, zval *val);
|
||||
. When type==IS_STRING, these behave identically to their
|
||||
add_assoc_zval() and add_assoc_zval_ex() counterparts.
|
||||
When type==IS_STRING, the key is considered to be Unicode (UChar*).
|
||||
|
||||
add_rt_assoc_zval(zval *arr, char *key, zval *val);
|
||||
add_rt_assoc_zval_ex(zval *arr, char *key, int key_len, zval *val);
|
||||
. When UG(unicode) is off, these behave identically to their
|
||||
add_assoc_zval() and add_assoc_zval_ex() counterparts.
|
||||
When UG(unicode) is on, key is converted to Unicode using runtime encoding.
|
||||
|
||||
add_ascii_assoc_zval(zval *arr, char *key, zval *val);
|
||||
add_ascii_assoc_zval_ex(zval *arr, char *key, int key_len, zval *val);
|
||||
. When UG(unicode) is off, these behave identically to their
|
||||
add_assoc_zval() and add_assoc_zval_ex() counterparts.
|
||||
When UG(unicode) is on, key is converted to Unicode using an ASCII converter.
|
||||
|
||||
add_utf8_assoc_zval(zval *arr, char *key, zval *val);
|
||||
add_utf8_assoc_zval_ex(zval *arr, char *key, int key_len, zval *val);
|
||||
. When UG(unicode) is off, these behave identically to their
|
||||
add_assoc_zval() and add_assoc_zval_ex() counterparts.
|
||||
When UG(unicode) is on, key is converted to Unicode using a UTF8 converter.
|
||||
|
||||
|
||||
Keytype and Valuetype specification may be mixed in any combination, for example:
|
||||
add_utf8_assoc_ascii_stringl_ex(zval *arr, char *key, int key_len, char *val, int val_len, int dup);
|
||||
|
||||
|
||||
Miscellaneous
|
||||
-------------
|
||||
|
||||
UBYTES() macro can be used to obtain the number of bytes necessary to store
|
||||
the given number of UChar's. The typical usage is:
|
||||
|
||||
char *constant_name = colon + (UG(unicode)?UBYTES(2):2);
|
||||
|
||||
|
||||
Code Points and Code Units
|
||||
--------------------------
|
||||
|
||||
Unicode type strings are in the UTF-16 encoding where 1 Unicode character
|
||||
may be represented by 1 or 2 UChar's. Each UChar is referred to as a "code
|
||||
unit", and a full Unicode character as a "code point". Consequently, number
|
||||
of code units and number of code points for the same Unicode string may be
|
||||
different. This has many implications, the most important of which is that
|
||||
you cannot simply index the UChar* string to get the desired codepoint.
|
||||
|
||||
The zval's value.ustr.len contains the number of code units (UChar -- UTF16).
|
||||
To obtain the number of code points, one can use u_countChar32() ICU API
|
||||
function or Z_USTRCPLEN() macro.
|
||||
|
||||
ICU provides a number of macros for working with UTF-16 strings on the
|
||||
codepoint level [2]. They allow you to do things like obtain a codepoint at
|
||||
random code unit offset, move forward and backward over the string, etc.
|
||||
There are two versions of iterator macros, *_SAFE and *_UNSAFE. It is strong
|
||||
recommended to use *_SAFE version, since they handle unpaired surrogates and
|
||||
check for string boundaries. Here is an example of how to move through
|
||||
UChar* string and work on codepoints.
|
||||
|
||||
UChar *str = ...;
|
||||
int32_t str_len = ...;
|
||||
UChar32 codepoint;
|
||||
int32_t offset = 0;
|
||||
|
||||
while (offset < str_len) {
|
||||
U16_NEXT(str, offset, str_len, codepoint);
|
||||
/* now we have the Unicode character in codepoint */
|
||||
}
|
||||
|
||||
There is not macro to get a codepoint at a certain code point offset, but
|
||||
there is a Zend API function that does it.
|
||||
|
||||
inline UChar32 zend_get_codepoint_at(UChar *str, int32_t length, int32_t n);
|
||||
|
||||
To retrieve 3rd codepoint, you would call:
|
||||
|
||||
zend_get_codepoint_at(str, str_len, 3);
|
||||
|
||||
If you have a UChar32 codepoint and need to put it into a UChar* string,
|
||||
there is another helper function, zend_codepoint_to_uchar(). It takes
|
||||
a single UChar32 and converts it to a UChar sequence (1 or 2 UChar's).
|
||||
|
||||
UChar buf[8];
|
||||
UChar32 codepoint = 0x101a2;
|
||||
int8_t num_uchars;
|
||||
num_uchars = zend_codepoint_to_uchar(codepoint, buf);
|
||||
|
||||
The return value is the number of resulting UChar's or 0, which indicates
|
||||
invalid codepoint.
|
||||
|
||||
|
||||
Memory Allocation
|
||||
-----------------
|
||||
|
||||
For ease of use and to reduce possible bugs, there are memory allocation
|
||||
functions specific to Unicode strings. Please use them at all times when
|
||||
allocating UChar's.
|
||||
|
||||
eumalloc(size)
|
||||
eurealloc(ptr, size)
|
||||
eustrndup(s, length)
|
||||
eustrdup(s)
|
||||
|
||||
peumalloc(size, persistent)
|
||||
peurealloc(ptr, size, persistent)
|
||||
|
||||
The size parameter refers to the number of UChar's, not bytes.
|
||||
|
||||
zend_zstrndup(type, zstr, length)
|
||||
|
||||
|
||||
Hashes
|
||||
------
|
||||
|
||||
Hashes API has been upgraded to work with Unicode and binary strings. All
|
||||
hash functions that worked with string keys now have their equivalent
|
||||
zend_u_hash_* API. The zend_u_hash_* functions take the type of the key
|
||||
string as the second argument.
|
||||
|
||||
When UG(unicode) switch is on, the IS_STRING keys are upconverted to
|
||||
IS_UNICODE and then used in the hash lookup.
|
||||
|
||||
A new HASH_KEY constant has been added for differentiating key types:
|
||||
. HASH_KEY_IS_UNICODE
|
||||
|
||||
Note that zend_hash_get_current_key_ex() does not have a zend_u_hash_*
|
||||
version. It returns the key as a char* pointer, you can can cast it
|
||||
appropriately based on the key type.
|
||||
|
||||
|
||||
Identifiers and Class Entries
|
||||
-----------------------------
|
||||
|
||||
In Unicode mode all the identifiers are Unicode strings. This means that
|
||||
while various structures such as zend_class_entry, zend_function, etc store
|
||||
the identifier name as a char* pointer, it will actually point to UChar*
|
||||
string. Be careful when accessing the names of classes, functions, and such
|
||||
-- always check UG(unicode) before using them.
|
||||
|
||||
|
||||
Formatted Output
|
||||
----------------
|
||||
|
||||
Since UTF-16 strings frequently contain NULL bytes, you cannot simpley use
|
||||
%s format to print them out. Towards that end, output functions such as
|
||||
php_printf(), spprintf(), etc now have three different formats for use with
|
||||
Unicode strings:
|
||||
|
||||
%r
|
||||
This format treats the corresponding argument as a Unicode string. The
|
||||
string is automatically converted to the output encoding. If you wish to
|
||||
apply a different converter to the string, use %*r and pass the
|
||||
converter before the string argument.
|
||||
|
||||
UChar *class_name = USTR_NAME("ReflectionClass");
|
||||
zend_printf("%r", class_name);
|
||||
spprintf(&utf8_buffer, 0, "%*r", UG(utf8_conv), class_name);
|
||||
|
||||
%R
|
||||
This format requires at least two arguments: the first one specifies the
|
||||
type of the string to follow (IS_STRING or IS_UNICODE), and the second
|
||||
one - the string itself. If the string is of Unicode type, it is
|
||||
automatically converted to the output encoding. If you wish to apply
|
||||
a different converter to the string, use %*R and pass the converter
|
||||
before the string argument.
|
||||
|
||||
zend_throw_exception_ex(U_CLASS_ENTRY(reflection_exception_ptr), 0 TSRMLS_CC,
|
||||
"Interface %R does not exist",
|
||||
Z_TYPE_P(class_name), Z_UNIVAL_P(class_name));
|
||||
|
||||
%v
|
||||
This format takes only one parameter, the string, but the expected
|
||||
string type depends on the UG(unicode) value. If the string is of
|
||||
Unicode type, it is automatically converted to the output encoding. If
|
||||
you wish to apply a different converter to the string, use %*R and pass
|
||||
the converter before the string argument.
|
||||
|
||||
zend_error(E_WARNING, "%v::__toString() did not return anything",
|
||||
Z_OBJCE_P(object)->name);
|
||||
|
||||
%Z
|
||||
This format prints a zval's value. You can specify the minimum length
|
||||
of the string representation using "%*Z" as well as the absolute length
|
||||
using "%.*Z". The following example is taken from the engine and
|
||||
therefor uses zend_spprintf rather than spprintf. Further more clen is
|
||||
an integer that is smaller than Z_UNILEN_P(callable).
|
||||
|
||||
zend_spprintf(error, 0, "class '%.*Z' not found", clen, callable);
|
||||
|
||||
The function allows to output any kind of zval values, as long as a
|
||||
string (or unicode) conversion is available. Note that printing non
|
||||
string zvals outside of request time is not possible.
|
||||
|
||||
Since [v]spprintf() can only output native strings there are also the new
|
||||
functions [v]uspprintf() and [v]zspprintf() that create unicode strings and
|
||||
return the number of characters printed. That is they return the length rather
|
||||
than the byte size. The second pair of functions also takes an additional type
|
||||
parameter that allows to create a string of arbitrary type. The following
|
||||
example illustrates the use. Assume it fetches a unicode/native string into
|
||||
path, path_len and path_type inorder to create sub_name, sub_len and sub_type.
|
||||
|
||||
zstr path, sub_name;
|
||||
int path_len, sub_len;
|
||||
zend_uchar path_type, sub_type;
|
||||
|
||||
/* fetch */
|
||||
|
||||
if (path.v) {
|
||||
sub_type = path_type;
|
||||
sub_len = zspprintf(path_type, &sub_name, 0, "%R%c%s",
|
||||
path_type, path,
|
||||
DEFAULT_SLASH,
|
||||
entry.d_name);
|
||||
}
|
||||
|
||||
|
||||
Upgrading Functions
|
||||
===================
|
||||
|
||||
Let's take a look at a couple of functions that have been upgraded to
|
||||
support new string types.
|
||||
|
||||
substr()
|
||||
--------
|
||||
|
||||
This functions returns part of a string based on offset and length
|
||||
parameters.
|
||||
|
||||
zstr str;
|
||||
int str_len, cp_len;
|
||||
zend_uchar str_type;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "tl|l", &str, &str_len, &str_type, &f, &l) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
The first thing we notice is that the incoming string specifier is 't',
|
||||
which means that we can accept all 3 string types. The 'str' variable is
|
||||
declared as zstr, because it can point to either UChar* or char*.
|
||||
The actual type of the incoming string is stored in 'str_type' variable.
|
||||
|
||||
if (str_type == IS_UNICODE) {
|
||||
cp_len = u_countChar32(str.u, str_len);
|
||||
} else {
|
||||
cp_len = str_len;
|
||||
}
|
||||
|
||||
If the string is a Unicode one, we cannot rely on the str_len value to tell
|
||||
us the number of characters in it. Instead, we call u_countChar32() to
|
||||
obtain it.
|
||||
|
||||
The next several lines normalize start and length parameters to fit within the
|
||||
string. Nothing new here. Then we locate the appropriate segment.
|
||||
|
||||
if (str_type == IS_UNICODE) {
|
||||
int32_t start = 0, end = 0;
|
||||
U16_FWD_N(str.u, end, str_len, f);
|
||||
start = end;
|
||||
U16_FWD_N(str.u, end, str_len, l);
|
||||
RETURN_UNICODEL(str.u + start, end-start, ZSTR_DUPLICATE);
|
||||
|
||||
Since codepoint (character) #n is not necessarily at offset #n in Unicode
|
||||
strings, we start at the beginning and iterate forward until we have gone
|
||||
through the required number of codepoints to reach the start of the segment.
|
||||
Then we save the location in 'start' and continue iterating through the number
|
||||
of codepoints specified by the offset. Once that's done, we can return the
|
||||
segment as a Unicode string.
|
||||
|
||||
} else {
|
||||
RETURN_STRINGL(str.s + f, l, ZSTR_DUPLICATE);
|
||||
}
|
||||
|
||||
For native strings, we can return the segment directly.
|
||||
|
||||
|
||||
strrev()
|
||||
--------
|
||||
|
||||
Let's look at strrev() which requires somewhat more complicated upgrade.
|
||||
While one of the guidelines for upgrades is that combining sequences are not
|
||||
really taken into account during processing -- substr() can break them up,
|
||||
for example -- in this case, we actually should be concerned, because
|
||||
reversing combining sequence may result in a completely different string. To
|
||||
illustrate:
|
||||
|
||||
a (U+0061 LATIN SMALL LETTER A)
|
||||
o (U+006f LATIN SMALL LETTER O)
|
||||
+ ' (U+0301 COMBINING ACUTE ACCENT)
|
||||
+ _ (U+0320 COMBINING MINUS SIGN BELOW)
|
||||
l (U+006C LATIN SMALL LETTER L)
|
||||
|
||||
Reversing this would result in:
|
||||
|
||||
l (U+006C LATIN SMALL LETTER L)
|
||||
+ _ (U+0320 COMBINING MINUS SIGN BELOW)
|
||||
+ ' (U+0301 COMBINING ACUTE ACCENT)
|
||||
o (U+006f LATIN SMALL LETTER O)
|
||||
a (U+0061 LATIN SMALL LETTER A)
|
||||
|
||||
All of a sudden the combining marks are being applied to 'l' instead of 'o'.
|
||||
To avoid this, we need to treat combininig sequences as a unit, by checking
|
||||
the combining character class of each character with u_getCombiningClass().
|
||||
|
||||
strrev() obtains its single argument, a string, and unless the string is of
|
||||
Unicode type, processes it exactly as before, simply swapping bytes around.
|
||||
For Unicode case, the magic is like this:
|
||||
|
||||
int32_t i, x1, x2;
|
||||
UChar32 ch;
|
||||
UChar *u_s, *u_n, *u_p;
|
||||
|
||||
u_n = eumalloc(Z_USTRLEN_PP(str)+1);
|
||||
u_p = u_n;
|
||||
u_s = Z_USTRVAL_PP(str);
|
||||
|
||||
i = Z_USTRLEN_PP(str);
|
||||
while (i > 0) {
|
||||
U16_PREV(u_s, 0, i, ch);
|
||||
if (u_getCombiningClass(ch) == 0) {
|
||||
u_p += zend_codepoint_to_uchar(ch, u_p);
|
||||
} else {
|
||||
x2 = i;
|
||||
do {
|
||||
U16_PREV(u_s, 0, i, ch);
|
||||
} while (u_getCombiningClass(ch) != 0);
|
||||
x1 = i;
|
||||
while (x1 <= x2) {
|
||||
U16_NEXT(u_s, x1, Z_USTRLEN_PP(str), ch);
|
||||
u_p += zend_codepoint_to_uchar(ch, u_p);
|
||||
}
|
||||
}
|
||||
}
|
||||
*u_p = 0;
|
||||
|
||||
The basic idea is to walk the string backwards from the end, using
|
||||
U16_PREV() macro. If the combining class of the current character is 0,
|
||||
meaning it's a base character and not a combining mark, we simply append it
|
||||
to the new string. Otherwise, we save the location of the index and do a run
|
||||
over the characters until we get to the next one with combining class 0. At
|
||||
that point we append the sequence as is, without reversing, to the new
|
||||
string. Voila.
|
||||
|
||||
Note that the code uses zend_codepoint_to_uchar() to convert full Unicode
|
||||
characters (UChar32 type) to 1 or 2 UTF-16 code units (UChar type).
|
||||
|
||||
|
||||
realpath()
|
||||
----------
|
||||
|
||||
Filenames use their own converter as it's not uncommon, for example,
|
||||
to need to access files on a filesystem with latin1 entries while outputting
|
||||
UTF8 runtime content.
|
||||
|
||||
The most common approach to parsing filenames can be found in realpath():
|
||||
|
||||
zval **ppfilename;
|
||||
char *filename;
|
||||
int filename_len;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Z", &ppfilename) == FAILURE ||
|
||||
php_stream_path_param_encode(ppfilename, &filename, &filename_len, REPORT_ERRORS, FG(default_context)) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
Here, the filename is taken first as a generic zval**, then converted (separating if necessary)
|
||||
and populated into local char* and int storage. The filename will be converted according to
|
||||
unicode.filesystem_encoding unless the wrapper specified overrides this with its own conversion
|
||||
function (The http:// wrapper, for example, enforces utf8 conversion).
|
||||
|
||||
|
||||
rmdir()
|
||||
-------
|
||||
|
||||
If the function accepts a context parameter, then this context should be used in place of FG(default_context)
|
||||
|
||||
zval **ppdir, *zcontext = NULL;
|
||||
char *dir;
|
||||
int dir_len;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Z|r", &ppdir, &zcontext) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
context = php_stream_context_from_zval(zcontext, 0);
|
||||
if (php_stream_path_param_encode(ppdir, &dir, &dir_len, REPORT_ERRORS, context) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
sqlite_query()
|
||||
--------------
|
||||
|
||||
If the function's underlying library expects a particular encoding (i.e. UTF8), then the alternate form of
|
||||
the string parameter may be used with zend_parse_parameters().
|
||||
|
||||
char *sql;
|
||||
int sql_len;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s&", &sql, &sql_len, UG(utf8_conv)) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
Converters
|
||||
==========
|
||||
|
||||
Standard Converters
|
||||
-------------------
|
||||
|
||||
The following converters (UConverter*) are initialized by Zend and are always available (regardless of UG(unicode) mode):
|
||||
UG(utf8_conv)
|
||||
UG(ascii_conv)
|
||||
UG(fallback_encoding_conv) - UTF8 unless overridden by INI setting unicode.fallback_encoding
|
||||
|
||||
Additional converters will be optionally initialized depending on INI settings:
|
||||
UG(runtime_encoding_conv) - unicode.runtime_encoding
|
||||
. Unicode output generated by a script will be encoding using this converter
|
||||
|
||||
UG(script_encoding_conv) - unicode.script_encoding
|
||||
. Scripts read from disk will be decoded using this converter
|
||||
|
||||
UG(filesystem_encoding_conv) - unicode.filesystem_encoding
|
||||
. Filenames and paths will be encoding using this converter
|
||||
|
||||
|
||||
Since these additional converters may not be instatiated (because their INI value is not set), all uses of these converters must
|
||||
be wrapped in ZEND_U_CONVERTER() for safety. If the converter hasn't been instantiated, then UG(fallback_encoding_conv) will be
|
||||
used instead.
|
||||
|
||||
For example, RETURN_RT_STRING("foo", ZSTR_DUPLICATE); expands out to:
|
||||
RETURN_U_STRING(ZEND_U_CONVERTER(UG(runtime_encoding_conv)), "foo", ZSTR_DUPLICATE);
|
||||
|
||||
Which uses UG(runtime_encoding_conv) if it's been set, otherwise using UG(fallback_encoding_conv).
|
||||
|
||||
Note that the INI setting unicode.stream_encoding does not instantiate a UConverter* automatically for use by the process/thread,
|
||||
it stores the value as a string for use during fopen() style calls where a UConverter* is instantiated for that particular stream.
|
||||
|
||||
References
|
||||
==========
|
||||
|
||||
[1] http://icu.sourceforge.net/apiref/icu4c/ustring_8h.html#a1
|
||||
|
||||
[2] http://icu.sourceforge.net/apiref/icu4c/utf16_8h.html
|
||||
|
||||
vim: set et ai tw=76 fo=tron21:
|
||||
@@ -108,7 +108,7 @@ module, program, etc).
|
||||
|
||||
For example for APXS:
|
||||
|
||||
PHP_SELECT_SAPI(apache, shared, sapi_apache.c mod_php5.c php_apache.c)
|
||||
PHP_SELECT_SAPI(apache, shared, sapi_apache.c mod_php4.c php_apache.c)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,172 +0,0 @@
|
||||
Updating your script to PHP6
|
||||
============================
|
||||
|
||||
This document attempts to describe portions of PHP that changed or
|
||||
disapeared in PHP6 and the best practices for upgrading existing
|
||||
applications to support PHP6.
|
||||
|
||||
1. Language
|
||||
1.1 Functions and function aliases
|
||||
1.2 Register globals
|
||||
1.3 Magic quotes
|
||||
1.4 Register long arrays ($HTTP_*_VARS)
|
||||
1.5 ZE1 compatibility mode
|
||||
1.6 dl() function
|
||||
1.7 E_ALL and E_STRICT constants
|
||||
1.8 References
|
||||
2. Unicode (see README.UNICODE-UPGRADES)
|
||||
2. Extensions
|
||||
2.1 GD
|
||||
|
||||
|
||||
1.1 Functions and function aliases
|
||||
------------------------------
|
||||
|
||||
<TODO: List all arguments order changes, aliases droped in php6...>
|
||||
1.2 Register globals
|
||||
----------------
|
||||
|
||||
For security reasons, register_globals has been removed from php6.
|
||||
ini_get('register_globals') will always return false.
|
||||
|
||||
You can emulate its behavior with some minimum changes in your code.
|
||||
|
||||
*DISCLAIMER*
|
||||
people should get a short-term solution if they are willing to run
|
||||
an insecure app.
|
||||
|
||||
Here is an example to emulate the session related functions and
|
||||
a snippet to register variables:
|
||||
|
||||
$_register_globals_order = strrev(ini_get("variables_order"));
|
||||
$_register_globals_order_len = strlen($_register_globals_order);
|
||||
|
||||
for($_register_globals_i=0;$_register_globals_i<$_register_globals_order_len;$_register_globals_i++) {
|
||||
switch($_register_globals_order{$_register_globals_i}) {
|
||||
case "E":
|
||||
extract($_ENV, EXTR_REFS|EXTR_SKIP);
|
||||
break;
|
||||
|
||||
case "G":
|
||||
extract($_GET, EXTR_REFS|EXTR_SKIP);
|
||||
break;
|
||||
|
||||
case "P":
|
||||
extract($_POST, EXTR_REFS|EXTR_SKIP);
|
||||
break;
|
||||
|
||||
case "C":
|
||||
extract($_COOKIE, EXTR_REFS|EXTR_SKIP);
|
||||
break;
|
||||
|
||||
case "S":
|
||||
extract($_SERVER, EXTR_REFS|EXTR_SKIP);
|
||||
break;
|
||||
}
|
||||
}
|
||||
unset($_register_globals_order, $_register_globals_order_len, $_register_globals_i);
|
||||
|
||||
function session_register($mixed) {
|
||||
static $started;
|
||||
if(!isset($started) || session_id() === "") {
|
||||
session_start();
|
||||
$started = true;
|
||||
}
|
||||
|
||||
$array = func_get_args();
|
||||
foreach($array as $mixed) {
|
||||
|
||||
if(is_scalar($mixed)) {
|
||||
$_SESSION[$mixed] =& $GLOBALS[$mixed];
|
||||
}
|
||||
elseif(is_array($mixed)) {
|
||||
foreach($mixed as $name) {
|
||||
$ok = session_register($name);
|
||||
if(!$ok) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function session_is_registered($name) {
|
||||
if(is_scalar($name)) {
|
||||
return isset($_SESSION[$name]);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function session_unregister($name) {
|
||||
if(isset($_SESSION[$name]) && is_scalar($name)) {
|
||||
unset($_SESSION[$name]);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
1.3 Magic quotes
|
||||
------------
|
||||
|
||||
1.4 Register long arrays ($HTTP_*_VARS)
|
||||
-----------------------------------
|
||||
|
||||
register_long_arrays and the long versions of super globals had been removed.
|
||||
PHP will emit E_CORE_ERROR during PHP startup if it would detect
|
||||
register_long_arrays setting.
|
||||
|
||||
You can emulate long arrays by including the following file:
|
||||
|
||||
<?php
|
||||
if (!ini_get('register_long_arrays')) {
|
||||
$HTTP_POST_VARS =& $_POST;
|
||||
$HTTP_GET_VARS =& $_GET;
|
||||
$HTTP_COOKIE_VARS =& $_COOKIE;
|
||||
$HTTP_SERVER_VARS =& $_SERVER;
|
||||
$HTTP_ENV_VARS =& $_ENV;
|
||||
$HTTP_POST_FILES =& $_FILES;
|
||||
}
|
||||
?>
|
||||
|
||||
1.5 ZE1 compatibility mode
|
||||
----------------------
|
||||
|
||||
ZE1 compatibility mode (PHP4 object model) was introduced to migrate from PHP4
|
||||
to PHP5 in an easier way, but it never keeped 100% compatibility.
|
||||
It is completly removed in PHP6, and there is no way to emulate it.
|
||||
Applications should assume PHP5/PHP6 object model.
|
||||
|
||||
1.6 dl() function
|
||||
-------------
|
||||
|
||||
Now dl() function is supported only in CLI, CGI and EMBED SAPI.
|
||||
There is no way to emulte it. You can just check if dl() is supported by SAPI:
|
||||
|
||||
<?php
|
||||
if (!function_exists("dl")) {
|
||||
die("dl() function is required\n!");
|
||||
}
|
||||
?>
|
||||
|
||||
1.7 E_ALL and E_STRICT constants
|
||||
----------------------------
|
||||
|
||||
Now E_ALL error reporting mask includes E_STRICT.
|
||||
You can filter E_STRICT error messages using the following code:
|
||||
|
||||
<?php
|
||||
error_reporting(error_reporting() & ~E_STRICT);
|
||||
?>
|
||||
|
||||
1.8 References
|
||||
----------
|
||||
|
||||
<TODO: Derick plans to clean the reference mess in php6>
|
||||
|
||||
2.1 GD
|
||||
|
||||
<TODO: gd2/ft2 only, functions droped>
|
||||
@@ -1,6 +0,0 @@
|
||||
The Win32 Build System.
|
||||
|
||||
See http://wiki.php.net/internals/windows/stepbystepbuild
|
||||
|
||||
vim:tw=78:sw=1:ts=1:et
|
||||
|
||||
+25
-11
@@ -1,4 +1,4 @@
|
||||
Using PHP 5 with the Zeus Web Server
|
||||
Using PHP4 with the Zeus Web Server
|
||||
-----------------------------------
|
||||
|
||||
Zeus fully supports running PHP in combination with our
|
||||
@@ -21,13 +21,29 @@ If you have any problems, please check the support site for more
|
||||
up-to-date information and advice.
|
||||
|
||||
|
||||
Quick guide to installing CGI/FastCGI with Zeus
|
||||
-----------------------------------------------
|
||||
Quick guide to installing FastCGI with Zeus
|
||||
-------------------------------------------
|
||||
|
||||
Step 1 - Compile PHP as FastCGI.
|
||||
Step 1 - obtain and install FastCGI development kit.
|
||||
|
||||
Grab the package from:
|
||||
http://www.fastcgi.com/dist/devkit_2.2.0.tar.gz
|
||||
|
||||
Extract the package and follow the instructions:
|
||||
./configure
|
||||
make
|
||||
make export
|
||||
(run the last as root)
|
||||
|
||||
This will install to /usr/local/lib/libfcgi.a
|
||||
and /usr/local/include/*fcgi*
|
||||
|
||||
|
||||
|
||||
Step 2 - Compile PHP as FastCGI.
|
||||
|
||||
Compile as follows:
|
||||
./configure --enable-fastcgi
|
||||
./configure --with-fastcgi
|
||||
make
|
||||
|
||||
Note that PHP has many options to the configure script -
|
||||
@@ -39,7 +55,7 @@ program called 'php'. Copy this into your document root, under a
|
||||
dedicated FastCGI directory (e.g. $DOCROOT/fcgi-bin/php)
|
||||
|
||||
|
||||
Step 2 - configure Zeus
|
||||
Step 3 - configure Zeus
|
||||
|
||||
Four stages:
|
||||
- enable FastCGI
|
||||
@@ -82,7 +98,7 @@ Click 'update' to commit these changes
|
||||
Finally restart your virtual server for these changes to take effect.
|
||||
|
||||
|
||||
Step 3 - start PHP as a FastCGI runner
|
||||
Step 4 - start PHP as a FastCGI runner
|
||||
|
||||
When you start PHP, it will pre-fork a given number of child processes
|
||||
to handle incoming PHP requests. Each process will handle a given
|
||||
@@ -90,10 +106,8 @@ number of requests before exiting (and being replaced by a newly
|
||||
forked process). You can control these two parameters by setting the
|
||||
following environment variables BEFORE starting the FastCGI runner:
|
||||
|
||||
PHP_FCGI_CHILDREN - the number of child processes to pre-fork. This
|
||||
variable MUST be set, if not then the PHP will not run as a FastCGI.
|
||||
We recommend a value of 8 for a fairly busy site. If you have many,
|
||||
long-running PHP scripts, then you may need to increase this further.
|
||||
PHP_FCGI_CHILDREN - the number of child processes to pre-fork. If not
|
||||
set, defaults to 8.
|
||||
|
||||
PHP_FCGI_MAX_REQUESTS - the number of requests each PHP child process
|
||||
handles before exiting. If not set, defaults to 500.
|
||||
|
||||
@@ -1,193 +0,0 @@
|
||||
Input Filter Support in PHP 5
|
||||
-----------------------------
|
||||
|
||||
XSS (Cross Site Scripting) hacks are becoming more and more prevalent,
|
||||
and can be quite difficult to prevent. Whenever you accept user data
|
||||
and somehow display this data back to users, you are likely vulnerable
|
||||
to XSS hacks.
|
||||
|
||||
The Input Filter support in PHP 5 is aimed at providing the framework
|
||||
through which a company-wide or site-wide security policy can be
|
||||
enforced. It is implemented as a SAPI hook and is called from the
|
||||
treat_data and post handler functions. To implement your own security
|
||||
policy you will need to write a standard PHP extension.
|
||||
|
||||
A simple implementation might look like the following. This stores the
|
||||
original raw user data and adds a my_get_raw() function while the normal
|
||||
$_POST, $_GET and $_COOKIE arrays are only populated with stripped
|
||||
data. In this simple example all I am doing is calling strip_tags() on
|
||||
the data. If register_globals is turned on, the default globals that
|
||||
are created will be stripped ($foo) while a $RAW_foo is created with the
|
||||
original user input.
|
||||
|
||||
ZEND_BEGIN_MODULE_GLOBALS(my_input_filter)
|
||||
zval *post_array;
|
||||
zval *get_array;
|
||||
zval *cookie_array;
|
||||
ZEND_END_MODULE_GLOBALS(my_input_filter)
|
||||
|
||||
#ifdef ZTS
|
||||
#define IF_G(v) TSRMG(my_input_filter_globals_id, zend_my_input_filter_globals *, v)
|
||||
#else
|
||||
#define IF_G(v) (my_input_filter_globals.v)
|
||||
#endif
|
||||
|
||||
ZEND_DECLARE_MODULE_GLOBALS(my_input_filter)
|
||||
|
||||
zend_function_entry my_input_filter_functions[] = {
|
||||
PHP_FE(my_get_raw, NULL)
|
||||
{NULL, NULL, NULL}
|
||||
};
|
||||
|
||||
zend_module_entry my_input_filter_module_entry = {
|
||||
STANDARD_MODULE_HEADER,
|
||||
"my_input_filter",
|
||||
my_input_filter_functions,
|
||||
PHP_MINIT(my_input_filter),
|
||||
PHP_MSHUTDOWN(my_input_filter),
|
||||
NULL,
|
||||
PHP_RSHUTDOWN(my_input_filter),
|
||||
PHP_MINFO(my_input_filter),
|
||||
"0.1",
|
||||
STANDARD_MODULE_PROPERTIES
|
||||
};
|
||||
|
||||
PHP_MINIT_FUNCTION(my_input_filter)
|
||||
{
|
||||
ZEND_INIT_MODULE_GLOBALS(my_input_filter, php_my_input_filter_init_globals, NULL);
|
||||
|
||||
REGISTER_LONG_CONSTANT("POST", PARSE_POST, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("GET", PARSE_GET, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("COOKIE", PARSE_COOKIE, CONST_CS | CONST_PERSISTENT);
|
||||
|
||||
sapi_register_input_filter(my_sapi_input_filter);
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
PHP_RSHUTDOWN_FUNCTION(my_input_filter)
|
||||
{
|
||||
if(IF_G(get_array)) {
|
||||
zval_ptr_dtor(&IF_G(get_array));
|
||||
IF_G(get_array) = NULL;
|
||||
}
|
||||
if(IF_G(post_array)) {
|
||||
zval_ptr_dtor(&IF_G(post_array));
|
||||
IF_G(post_array) = NULL;
|
||||
}
|
||||
if(IF_G(cookie_array)) {
|
||||
zval_ptr_dtor(&IF_G(cookie_array));
|
||||
IF_G(cookie_array) = NULL;
|
||||
}
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
PHP_MINFO_FUNCTION(my_input_filter)
|
||||
{
|
||||
php_info_print_table_start();
|
||||
php_info_print_table_row( 2, "My Input Filter Support", "enabled" );
|
||||
php_info_print_table_row( 2, "Revision", "$Revision$");
|
||||
php_info_print_table_end();
|
||||
}
|
||||
|
||||
/* The filter handler. If you return 1 from it, then PHP also registers the
|
||||
* (modified) variable. Returning 0 prevents PHP from registering the variable;
|
||||
* you can use this if your filter already registers the variable under a
|
||||
* different name, or if you just don't want the variable registered at all. */
|
||||
SAPI_INPUT_FILTER_FUNC(my_sapi_input_filter)
|
||||
{
|
||||
zval new_var;
|
||||
zval *array_ptr = NULL;
|
||||
char *raw_var;
|
||||
int var_len;
|
||||
|
||||
assert(*val != NULL);
|
||||
|
||||
switch(arg) {
|
||||
case PARSE_GET:
|
||||
if(!IF_G(get_array)) {
|
||||
ALLOC_ZVAL(array_ptr);
|
||||
array_init(array_ptr);
|
||||
INIT_PZVAL(array_ptr);
|
||||
}
|
||||
IF_G(get_array) = array_ptr;
|
||||
break;
|
||||
case PARSE_POST:
|
||||
if(!IF_G(post_array)) {
|
||||
ALLOC_ZVAL(array_ptr);
|
||||
array_init(array_ptr);
|
||||
INIT_PZVAL(array_ptr);
|
||||
}
|
||||
IF_G(post_array) = array_ptr;
|
||||
break;
|
||||
case PARSE_COOKIE:
|
||||
if(!IF_G(cookie_array)) {
|
||||
ALLOC_ZVAL(array_ptr);
|
||||
array_init(array_ptr);
|
||||
INIT_PZVAL(array_ptr);
|
||||
}
|
||||
IF_G(cookie_array) = array_ptr;
|
||||
break;
|
||||
}
|
||||
Z_STRLEN(new_var) = val_len;
|
||||
Z_STRVAL(new_var) = estrndup(*val, val_len);
|
||||
Z_TYPE(new_var) = IS_STRING;
|
||||
|
||||
var_len = strlen(var);
|
||||
raw_var = emalloc(var_len+5); /* RAW_ and a \0 */
|
||||
strcpy(raw_var, "RAW_");
|
||||
strlcat(raw_var,var,var_len+5);
|
||||
|
||||
php_register_variable_ex(raw_var, &new_var, array_ptr TSRMLS_DC);
|
||||
|
||||
php_strip_tags(*val, val_len, NULL, NULL, 0);
|
||||
|
||||
*new_val_len = strlen(*val);
|
||||
return 1;
|
||||
}
|
||||
|
||||
PHP_FUNCTION(my_get_raw)
|
||||
{
|
||||
long arg;
|
||||
char *var;
|
||||
int var_len;
|
||||
zval **tmp;
|
||||
zval *array_ptr = NULL;
|
||||
HashTable *hash_ptr;
|
||||
char *raw_var;
|
||||
|
||||
if(zend_parse_parameters(2 TSRMLS_CC, "ls", &arg, &var, &var_len) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
switch(arg) {
|
||||
case PARSE_GET:
|
||||
array_ptr = IF_G(get_array);
|
||||
break;
|
||||
case PARSE_POST:
|
||||
array_ptr = IF_G(post_array);
|
||||
break;
|
||||
case PARSE_COOKIE:
|
||||
array_ptr = IF_G(post_array);
|
||||
break;
|
||||
}
|
||||
|
||||
if(!array_ptr) RETURN_FALSE;
|
||||
|
||||
/*
|
||||
* I'm changing the variable name here because when running with register_globals on,
|
||||
* the variable will end up in the global symbol table
|
||||
*/
|
||||
raw_var = emalloc(var_len+5); /* RAW_ and a \0 */
|
||||
strcpy(raw_var, "RAW_");
|
||||
strlcat(raw_var,var,var_len+5);
|
||||
hash_ptr = HASH_OF(array_ptr);
|
||||
|
||||
if(zend_hash_find(hash_ptr, raw_var, var_len+5, (void **)&tmp) == SUCCESS) {
|
||||
*return_value = **tmp;
|
||||
zval_copy_ctor(return_value);
|
||||
} else {
|
||||
RETVAL_FALSE;
|
||||
}
|
||||
efree(raw_var);
|
||||
}
|
||||
|
||||
@@ -1,174 +0,0 @@
|
||||
Design
|
||||
======
|
||||
|
||||
Main assumption of the model is that the problem that we are to solve is the
|
||||
problem of the very long class names in PHP libraries. We would not attempt
|
||||
to take autoloader's job or create packaging model - only make names
|
||||
manageable.
|
||||
|
||||
Namespaces are defined the following way:
|
||||
|
||||
Zend/DB/Connection.php:
|
||||
<?php
|
||||
namespace Zend\DB;
|
||||
|
||||
class Connection {
|
||||
}
|
||||
|
||||
function connect() {
|
||||
}
|
||||
?>
|
||||
|
||||
Namespace definition does the following:
|
||||
All class and function names inside are automatically prefixed with
|
||||
namespace name. Inside namespace, local name always takes precedence over
|
||||
global name. Several files may be using the same namespace.
|
||||
The namespace declaration statement must be the very first statement in
|
||||
the file. The only exception is "declare" statement that can be used before.
|
||||
|
||||
Every class and function in a namespace can be referred to by the full name
|
||||
- e.g. Zend\DB\Connection or Zend\DB\connect - at any time.
|
||||
|
||||
<?php
|
||||
require 'Zend/Db/Connection.php';
|
||||
$x = new Zend\DB\Connection;
|
||||
Zend\DB\connect();
|
||||
?>
|
||||
|
||||
Namespace or class name can be imported:
|
||||
|
||||
<?php
|
||||
require 'Zend/Db/Connection.php';
|
||||
use Zend\DB;
|
||||
use Zend\DB\Connection as DbConnection;
|
||||
|
||||
$x = new Zend\DB\Connection();
|
||||
$y = new DB\connection();
|
||||
$z = new DbConnection();
|
||||
DB\connect();
|
||||
?>
|
||||
|
||||
The use statement only defines name aliasing. It may create name alias for
|
||||
namespace or class. The simple form of statement "use A\B\C\D;" is
|
||||
equivalent to "use A\B\C\D as D;". The use statement can be used at any
|
||||
time in the global scope (not inside function/class) and takes effect from
|
||||
the point of definition down to the end of file. It is recommended however to
|
||||
place the use statements at the beginning of the file. The use statements have
|
||||
effect only on the file where they appear.
|
||||
|
||||
The special "empty" namespace (\ prefix) is useful as explicit global
|
||||
namespace qualification. All class and function names started from \
|
||||
interpreted as global.
|
||||
|
||||
<?php
|
||||
namespace A\B\C;
|
||||
|
||||
$con = \mysql_connect(...);
|
||||
?>
|
||||
|
||||
A special constant __NAMESPACE__ contains the name of the current namespace.
|
||||
It can be used to construct fully-qualified names to pass them as callbacks.
|
||||
|
||||
<?php
|
||||
namespace A\B\C;
|
||||
|
||||
function foo() {
|
||||
}
|
||||
|
||||
set_error_handler(__NAMESPACE__ . "\foo");
|
||||
?>
|
||||
|
||||
In global namespace __NAMESPACE__ constant has the value of empty string.
|
||||
|
||||
Names inside namespace are resolved according to the following rules:
|
||||
|
||||
1) all qualified names are translated during compilation according to
|
||||
current import rules. So if we have "use A\B\C" and then "C\D\e()"
|
||||
it is translated to "A\B\C\D\e()".
|
||||
2) unqualified class names translated during compilation according to
|
||||
current import rules. So if we have "use A\B\C" and then "new C()" it
|
||||
is translated to "new A\B\C()".
|
||||
3) inside namespace, calls to unqualified functions that are defined in
|
||||
current namespace (and are known at the time the call is parsed) are
|
||||
interpreted as calls to these namespace functions.
|
||||
4) inside namespace, calls to unqualified functions that are not defined
|
||||
in current namespace are resolved at run-time. The call to function foo()
|
||||
inside namespace (A\B) first tries to find and call function from current
|
||||
namespace A\B\foo() and if it doesn't exist PHP tries to call internal
|
||||
function foo(). Note that using foo() inside namespace you can call only
|
||||
internal PHP functions, however using \foo() you are able to call any
|
||||
function from the global namespace.
|
||||
5) unqualified class names are resolved at run-time. E.q. "new Exception()"
|
||||
first tries to use (and autoload) class from current namespace and in case
|
||||
of failure uses internal PHP class. Note that using "new A" in namespace
|
||||
you can only create class from this namespace or internal PHP class, however
|
||||
using "new \A" you are able to create any class from the global namespace.
|
||||
6) Calls to qualified functions are resolved at run-time. Call to
|
||||
A\B\foo() first tries to call function foo() from namespace A\B, then
|
||||
it tries to find class A\B (__autoload() it if necessary) and call its
|
||||
static method foo()
|
||||
7) qualified class names are interpreted as class from corresponding
|
||||
namespace. So "new A\B\C()" refers to class C from namespace A\B.
|
||||
|
||||
Examples
|
||||
--------
|
||||
<?php
|
||||
namespace A;
|
||||
foo(); // first tries to call "foo" defined in namespace "A"
|
||||
// then calls internal function "foo"
|
||||
\foo(); // calls function "foo" defined in global scope
|
||||
?>
|
||||
|
||||
<?php
|
||||
namespace A;
|
||||
new B(); // first tries to create object of class "B" defined in namespace "A"
|
||||
// then creates object of internal class "B"
|
||||
new \B(); // creates object of class "B" defined in global scope
|
||||
?>
|
||||
|
||||
<?php
|
||||
namespace A;
|
||||
new A(); // first tries to create object of class "A" from namespace "A" (A\A)
|
||||
// then creates object of internal class "A"
|
||||
?>
|
||||
|
||||
<?php
|
||||
namespace A;
|
||||
B\foo(); // first tries to call function "foo" from namespace "A\B"
|
||||
// then calls method "foo" of internal class "B"
|
||||
\B\foo(); // first tries to call function "foo" from namespace "B"
|
||||
// then calls method "foo" of class "B" from global scope
|
||||
?>
|
||||
|
||||
The worst case if class name conflicts with namespace name
|
||||
<?php
|
||||
namespace A;
|
||||
A\foo(); // first tries to call function "foo" from namespace "A\A"
|
||||
// then tries to call method "foo" of class "A" from namespace "A"
|
||||
// then tries to call function "foo" from namespace "A"
|
||||
// then calls method "foo" of internal class "A"
|
||||
\A\foo(); // first tries to call function "foo" from namespace "A"
|
||||
// then calls method "foo" of class "A" from global scope
|
||||
?>
|
||||
|
||||
TODO
|
||||
====
|
||||
|
||||
* Support for namespace constants?
|
||||
|
||||
* performance problems
|
||||
- calls to internal functions in namespaces are slower, because PHP first
|
||||
looks for such function in current namespace
|
||||
- calls to static methods are slower, because PHP first tries to look
|
||||
for corresponding function in namespace
|
||||
|
||||
* Extend the Reflection API?
|
||||
* Add ReflectionNamespace class
|
||||
+ getName()
|
||||
+ getClasses()
|
||||
+ getFunctions()
|
||||
+ getFiles()
|
||||
* Add getNamespace() methods to ReflectionClass and ReflectionFunction
|
||||
|
||||
* Rename namespaces to packages?
|
||||
|
||||
@@ -3,26 +3,49 @@ parenthesis means that person has taken on this project.
|
||||
|
||||
Zend
|
||||
----
|
||||
For PHP 4.3.0:
|
||||
* Allow foreach ($array as $k => &$val) syntax. right now we cannot
|
||||
traverse an array without copying each element.
|
||||
* Allow foreach ($array as $k => list($a, $b)) syntax for multi
|
||||
dimensional arrays.
|
||||
* Look at replacing c-lib call tolower().
|
||||
* Make hash API functions work with HASH_OF() to save time.
|
||||
* Allow to set a default value for call-by-reference-parameters.
|
||||
eg: function hello (&$pallo = NULL) {}
|
||||
* Disallow function(method) redefinition in class.
|
||||
* Add configure test to determine if dlsym() requires underscore and set
|
||||
DLSYM_NEEDS_UNDERSCORE accordingly. Perl and zsh have it in configure,
|
||||
for example. (DONE?)
|
||||
|
||||
For PHP 5.0.0:
|
||||
* Native large number support (probably with GNU GMP)
|
||||
* Const'ify APIs. Right now, many functions leave parameters untouched,
|
||||
but don't declare those as const. This makes interaction with other
|
||||
interfaces difficult which pass const parameters to us.
|
||||
* Clean up object->string conversion behavior wherever possible (switch(),
|
||||
comparison, etc)
|
||||
* Port safe-allocation functions from 5.3 (zend_alloc.[ch])
|
||||
|
||||
|
||||
global
|
||||
------
|
||||
For PHP 4.3.0:
|
||||
* Add aliases to functions to conform to new naming conventions, e.g.
|
||||
str_to_upper().
|
||||
* Make all extensions thread-safe.
|
||||
* Make everything on the language-level independent of your locale
|
||||
settings.
|
||||
* Change PHP error messages, so that they point to pages or sections
|
||||
in the PHP Manual.
|
||||
* Make sure that all ZTS globals get destructed. Most ts_allocate_id()
|
||||
calls should have a dtor entry.
|
||||
* Activate all extensions by default that don't rely on external
|
||||
dependencies. (eg ftp) (DONE?)
|
||||
* on some platforms unimplemented function will just do nothing
|
||||
(e.g. symlink) they should print a warning or not even be defined!
|
||||
(DONE ?)
|
||||
* Use arg_separator.input to implode args in the CGI sapi extension
|
||||
and arg_separator.input to explode in php_build_argv(). (DONE?)
|
||||
|
||||
For PHP 5.0.0
|
||||
* bundle and use curl lib for fopen wrapper.
|
||||
* --enable-all in configure. (--enable-shared=max ...)
|
||||
* make configure print out a summary when it's done (like XEmacs)
|
||||
* replace standard functions which work on static data with
|
||||
@@ -32,29 +55,19 @@ global
|
||||
of compliance.
|
||||
* see what functions might need to be changed to use HashPosition, so
|
||||
that the internal array pointer is not affected.
|
||||
* Move most extensions and PEAR packages out of the PHP CVS tree,
|
||||
include them again during release packaging.
|
||||
|
||||
|
||||
Other
|
||||
* use thread-safe resolver functions (either require BIND 8 or adns).
|
||||
* implement javadoc based function docs template system.
|
||||
* provide optional IPv6 support (seems to be done?).
|
||||
* provide optional IPv6 support.
|
||||
* find a better way to implement script timeouts. SIGVTALRM is used
|
||||
by some POSIX threads implementations (i.e. OpenBSD) and is not
|
||||
available in ZTS mode.
|
||||
* Implement flush feature suitable for nested output buffers.
|
||||
|
||||
Streams
|
||||
-------
|
||||
* Route filestat.c through the wrapper layer; isolate the statcache code
|
||||
so that it is independent of php functions and can be applied to any
|
||||
stream/path.
|
||||
* Implement generalized connection pool for stated protocols such as
|
||||
ftp and http/1.1 (using keep-alive) to avoid having to negotiate
|
||||
new command/request stream for each subsequent call; Possibly store
|
||||
resources in contexts (creating a default context if necessary) to
|
||||
allow segmentation of connection pools.
|
||||
* Add a method to take ownership of the memory buffer in memory streams so
|
||||
that generating string values for zvals doesn't require an estrdup.
|
||||
* bundle and use curl lib for fopen wrapper.
|
||||
|
||||
documentation
|
||||
-------------
|
||||
@@ -127,13 +140,24 @@ ext/session
|
||||
* Provide a callback facility which is executed upon encountering
|
||||
an unknown class name during deserialization
|
||||
|
||||
ext/sockets
|
||||
-----------
|
||||
* Implement IPv6
|
||||
* Review/Fix vectors
|
||||
|
||||
ext/standard
|
||||
------------
|
||||
* Add a version number to data serialized via serialize().
|
||||
* Possibly modify parsing of GPC data to automatically create arrays if
|
||||
variable name is seen more than once.
|
||||
* Implement regex-cache for url-functions.
|
||||
* stri_replace(). (Andrei)
|
||||
* Move socket related functions to fsock.c.
|
||||
* NOT binary safe:
|
||||
strtok()
|
||||
basename()
|
||||
dirname()
|
||||
strrpos()
|
||||
|
||||
ext/wddx
|
||||
--------
|
||||
@@ -149,5 +173,3 @@ ext/wddx
|
||||
other cool stuff
|
||||
----------------
|
||||
* PVM extension
|
||||
|
||||
vim:et:sw=4:ts=4
|
||||
@@ -1,5 +0,0 @@
|
||||
Zend Engine
|
||||
-----------
|
||||
- Look at making zend_constant value member be a zval* instead of zval. (Andi)
|
||||
- Implement inheritance rules for type hints. (Marcus)
|
||||
- Find a keyword for the if-set-or operator (apply the patch). (Marcus, all)
|
||||
@@ -1,109 +0,0 @@
|
||||
Component: Zend Engine 2
|
||||
|
||||
Important stuff to finish: PPP members/PPP methods,
|
||||
support of overloaded extensions, possibly differentiate
|
||||
between class and namespace as discussed with Stig in
|
||||
Germany.
|
||||
Responsibility: Zeev, Andi, Stas
|
||||
Time frame: Couple of months for first part and extensions will be
|
||||
ongoing while PHP is being fixed.
|
||||
Things to leave for later versions: Native aggregation
|
||||
support, accessing static members via object and not class.
|
||||
|
||||
|
||||
Component: Aggregation
|
||||
Responsibility: Andi, Stig?
|
||||
Time frame: ?
|
||||
|
||||
|
||||
Component: Redesign of API Versioning
|
||||
Responsibility: ?
|
||||
Time frame: 1 month
|
||||
|
||||
|
||||
Component: Thread Safety
|
||||
Identify the extensions that are not thread safe by design
|
||||
or due to dependant libraries and identify them as such.
|
||||
If possible try to resolve thread safety issue via code
|
||||
improvements (if php code or patches will be accepted by
|
||||
library maintainers). For situations where thread safety
|
||||
cannot easily be acheived a flag in the extension API is
|
||||
set so PHP can identify non-thread safe extensions. These
|
||||
extensions will not be loaded in a ZTS compiled binary
|
||||
(unless it is cli/cgi).
|
||||
|
||||
Responsibility: ?
|
||||
Time frame: ?
|
||||
|
||||
|
||||
Component: SAPI
|
||||
Environment variables defined in the CGI spec need to be
|
||||
verified in each SAPI module that they conform to the CGI
|
||||
spec correctly. If they do not, the SAPI module needs to
|
||||
fix the variable prior to script execution. Having this
|
||||
conformity will aid in having PHP scripts run correctly
|
||||
under different sapi modules.
|
||||
|
||||
Responsibility: Shane Caraveo & each sapi module owner
|
||||
Timeframe: ? (but shouldn't be much effort, most modules are probably ok)
|
||||
|
||||
|
||||
Component: Input Filtering
|
||||
- Implement a SAPI input filter hook that will get called
|
||||
just before registering a variable in the
|
||||
treat_data/post_handler hooks. (done)
|
||||
- Make sure this is also done in mbstring (done)
|
||||
- Provide access functions, or perhaps a new
|
||||
$_RAW_GET/POST/Cookie set of superglobals to get at the
|
||||
unfiltered data
|
||||
- Provide a .ini directive which allows people to set their
|
||||
input filter to one of the built-in strip_tags,
|
||||
htmlspecialchars or whatever other internal function might
|
||||
be useful here.
|
||||
- (The main benefit of this is to make it easier for people
|
||||
to solve the XSS problem once and for all without having
|
||||
to go through every line of their code and adding input
|
||||
validation/filtering everywhere)
|
||||
Responsibility: Rasmus
|
||||
Timeframe: Yesterday
|
||||
|
||||
|
||||
Component: RPC Abstraction Layer
|
||||
Porting java, com, dotnet, xmlrpc, corba, soap and python, srm
|
||||
(are there more ?) to work with the new oo api and preferably
|
||||
by using ext/rpc.
|
||||
Responsibility: Harald
|
||||
Time frame: 2 months (but i have to wait for a few engine features first)
|
||||
|
||||
|
||||
Component: OO Extensions
|
||||
Each OO extension has to be revised and rewritten to fit into
|
||||
the new OO model. We should decide which extensions are a must
|
||||
to have for the release and which can be ported by the maintainer
|
||||
later as a separate pecl release.
|
||||
A list of extensions to be extended that have to be investigated:
|
||||
* browscap
|
||||
* aggregate
|
||||
* all *sql extensions (*_fetch_object)
|
||||
* domxml (seems like christian is rewriting it anyways)
|
||||
* ming
|
||||
Responsibility: Harald (, extension maintainers)
|
||||
|
||||
|
||||
Component: Abstract Data Types (ADT)
|
||||
Responsibility: Sterling, Harald
|
||||
Time frame: ?
|
||||
|
||||
|
||||
Component: Test Suite
|
||||
Extending the test suite with atleast a test for every
|
||||
function in an extension that doesn't require external
|
||||
resources. Also developing an automated test thing which
|
||||
cvs ups's, compiles and tests the build on a daily base on
|
||||
as much platforms/extensions as possible.
|
||||
|
||||
The test suite will also be extended to support threaded
|
||||
testing and testing for differing sapi modules (via http
|
||||
calls or other methods).
|
||||
Reponsibility: Derick (, extension maintainers)
|
||||
Time frame: 3 months
|
||||
@@ -0,0 +1,3 @@
|
||||
- clean up .cvsignores
|
||||
- purge Makefile.ins and replace PHP_EXTENSION in config.m4s
|
||||
with appropiate calls to PHP_NEW_EXTENSION
|
||||
+114
@@ -0,0 +1,114 @@
|
||||
This is an overview over existing segfaults in the current PHP source
|
||||
tree.
|
||||
|
||||
|
||||
Fixed:
|
||||
|
||||
mb_convert_encoding (Moriyoshi)
|
||||
socket_iovec_alloc (Rasmus)
|
||||
exif_imagetype,exif_thumbnail (Rasmus)
|
||||
dbase_open (Rasmus)
|
||||
array_pad (Rasmus)
|
||||
setlocale (Rasmus)
|
||||
unregister_tick_function (Rasmus)
|
||||
bcsub (Rasmus)
|
||||
str_repeat (Ilia)
|
||||
imagecopyresized (Ilia)
|
||||
mhash_keygen_s2k (Ilia)
|
||||
bundled gd (Ilia)
|
||||
mb_ereg, mb_ereg_match, mb_eregi, mb_split (Moriyoshi)
|
||||
xml_parser_create (Moriyoshi)
|
||||
ob_start (Sascha)
|
||||
imagecreate/-truecolor (Sascha)
|
||||
flock (Sascha)
|
||||
register_shutdown_function (Sascha)
|
||||
mb_strcut('', [number greater than the length of first arg]) (Moriyoshi)
|
||||
ext/exif, ext/dba (Marcus)
|
||||
php_base64_encode (Moriyoshi)
|
||||
|
||||
Open:
|
||||
|
||||
the dbase extension (1)
|
||||
socket_select (2)
|
||||
pack (3)
|
||||
|
||||
(1) heap corruption, mostly visible in malloc-related calls. Whether you see
|
||||
this or not might depend on your libc/compiler. Hard to track down,
|
||||
because the result of the corruption might be quite delayed.
|
||||
|
||||
Reproducable with glibc-2.3/gcc 3.2.2 by:
|
||||
|
||||
cat <<X | php do_crash
|
||||
dbase_add_record
|
||||
dbase_close
|
||||
dbase_create
|
||||
dbase_delete_record
|
||||
dbase_get_record
|
||||
dbase_get_record_with_names
|
||||
dbase_numfields
|
||||
dbase_numrecords
|
||||
dbase_open
|
||||
X
|
||||
|
||||
(2) heap corruption, dies in efree()/execute()
|
||||
|
||||
Methodology
|
||||
|
||||
1. Use a plain PHP_4_3 tree
|
||||
2. Use the config.nice from ammendment 1.
|
||||
3. Download the test script from:
|
||||
|
||||
<URL:http://schumann.cx/do_crash.txt>
|
||||
|
||||
4a. Use the scripts funcparse.awk/genfunclist.sh from phpdoc/scripts
|
||||
for creating a plain text function list. Feed that list to
|
||||
the script. Avoid calls like pcntl_fork. Manually remove functions
|
||||
which take too long to finish/eat up all memory.
|
||||
|
||||
4b. For testing a single function, echo the name of the function to
|
||||
the script like this:
|
||||
|
||||
echo dbase_open | php do_crash.txt
|
||||
|
||||
(3) multiple integer overflows, ex. pack("d4294967297", 2);
|
||||
|
||||
Amendment 1.
|
||||
|
||||
CFLAGS='-O0 -g' \
|
||||
'../src/php4/configure' \
|
||||
'--enable-pcntl' \
|
||||
'--enable-shmop' \
|
||||
'--enable-sysvsem' \
|
||||
'--enable-sysvshm' \
|
||||
'--enable-wddx' \
|
||||
'--enable-yp' \
|
||||
'--enable-filepro' \
|
||||
'--enable-ftp' \
|
||||
'--enable-dba' \
|
||||
'--enable-dbase' \
|
||||
'--enable-dio' \
|
||||
'--enable-exif' \
|
||||
'--enable-mbstring' \
|
||||
'--enable-mbregex' \
|
||||
'--enable-sockets' \
|
||||
'--enable-bcmath' \
|
||||
'--enable-calendar' \
|
||||
'--enable-pcntl' \
|
||||
'--enable-shmop' \
|
||||
'--enable-sysvsem' \
|
||||
'--enable-sysvshm' \
|
||||
'--enable-wddx' \
|
||||
'--enable-yp' \
|
||||
'--enable-filepro' \
|
||||
'--enable-ftp' \
|
||||
'--enable-dba' \
|
||||
'--enable-dbase' \
|
||||
'--enable-dio' \
|
||||
'--enable-exif' \
|
||||
'--enable-mbstring' \
|
||||
'--enable-mbregex' \
|
||||
'--enable-sockets' \
|
||||
'--enable-bcmath' \
|
||||
'--enable-calendar' \
|
||||
"$@"
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
Copyright (c) 1999-2006, Andi Gutmans, Sascha Schumann, Zeev Suraski.
|
||||
Copyright (c) 1999, 2000, Andi Gutmans, Sascha Schumann, Zeev Suraski.
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
|
||||
+57
-208
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Thread Safe Resource Manager |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1999-2009, Andi Gutmans, Sascha Schumann, Zeev Suraski |
|
||||
| Copyright (c) 1999, 2000, Andi Gutmans, Sascha Schumann, Zeev Suraski|
|
||||
| This source file is subject to the TSRM license, that is bundled |
|
||||
| with this package in the file LICENSE |
|
||||
+----------------------------------------------------------------------+
|
||||
@@ -34,7 +34,6 @@ typedef struct {
|
||||
size_t size;
|
||||
ts_allocate_ctor ctor;
|
||||
ts_allocate_dtor dtor;
|
||||
int done;
|
||||
} tsrm_resource_type;
|
||||
|
||||
|
||||
@@ -92,28 +91,12 @@ static FILE *tsrm_error_file;
|
||||
#if defined(PTHREADS)
|
||||
/* Thread local storage */
|
||||
static pthread_key_t tls_key;
|
||||
# define tsrm_tls_set(what) pthread_setspecific(tls_key, (void*)(what))
|
||||
# define tsrm_tls_get() pthread_getspecific(tls_key)
|
||||
|
||||
#elif defined(TSRM_ST)
|
||||
static int tls_key;
|
||||
# define tsrm_tls_set(what) st_thread_setspecific(tls_key, (void*)(what))
|
||||
# define tsrm_tls_get() st_thread_getspecific(tls_key)
|
||||
|
||||
#elif defined(TSRM_WIN32)
|
||||
static DWORD tls_key;
|
||||
# define tsrm_tls_set(what) TlsSetValue(tls_key, (void*)(what))
|
||||
# define tsrm_tls_get() TlsGetValue(tls_key)
|
||||
|
||||
#elif defined(BETHREADS)
|
||||
static int32 tls_key;
|
||||
# define tsrm_tls_set(what) tls_set(tls_key, (void*)(what))
|
||||
# define tsrm_tls_get() (tsrm_tls_entry*)tls_get(tls_key)
|
||||
|
||||
#else
|
||||
# define tsrm_tls_set(what)
|
||||
# define tsrm_tls_get() NULL
|
||||
# warning tsrm_set_interpreter_context is probably broken on this platform
|
||||
#endif
|
||||
|
||||
/* Startup TSRM (call once for the entire process) */
|
||||
@@ -174,13 +157,8 @@ TSRM_API void tsrm_shutdown(void)
|
||||
int j;
|
||||
|
||||
next_p = p->next;
|
||||
for (j=0; j<p->count; j++) {
|
||||
if (p->storage[j]) {
|
||||
if (resource_types_table && !resource_types_table[j].done && resource_types_table[j].dtor) {
|
||||
resource_types_table[j].dtor(p->storage[j], &p->storage);
|
||||
}
|
||||
free(p->storage[j]);
|
||||
}
|
||||
for (j=0; j<id_count; j++) {
|
||||
free(p->storage[j]);
|
||||
}
|
||||
free(p->storage);
|
||||
free(p);
|
||||
@@ -238,7 +216,6 @@ TSRM_API ts_rsrc_id ts_allocate_id(ts_rsrc_id *rsrc_id, size_t size, ts_allocate
|
||||
resource_types_table[TSRM_UNSHUFFLE_RSRC_ID(*rsrc_id)].size = size;
|
||||
resource_types_table[TSRM_UNSHUFFLE_RSRC_ID(*rsrc_id)].ctor = ctor;
|
||||
resource_types_table[TSRM_UNSHUFFLE_RSRC_ID(*rsrc_id)].dtor = dtor;
|
||||
resource_types_table[TSRM_UNSHUFFLE_RSRC_ID(*rsrc_id)].done = 0;
|
||||
|
||||
/* enlarge the arrays for the already active threads */
|
||||
for (i=0; i<tsrm_tls_table_size; i++) {
|
||||
@@ -278,29 +255,32 @@ static void allocate_new_resource(tsrm_tls_entry **thread_resources_ptr, THREAD_
|
||||
(*thread_resources_ptr)->thread_id = thread_id;
|
||||
(*thread_resources_ptr)->next = NULL;
|
||||
|
||||
#if defined(PTHREADS)
|
||||
/* Set thread local storage to this new thread resources structure */
|
||||
tsrm_tls_set(*thread_resources_ptr);
|
||||
pthread_setspecific(tls_key, (void *) *thread_resources_ptr);
|
||||
#elif defined(TSRM_ST)
|
||||
st_thread_setspecific(tls_key, (void *) *thread_resources_ptr);
|
||||
#elif defined(TSRM_WIN32)
|
||||
TlsSetValue(tls_key, (void *) *thread_resources_ptr);
|
||||
#elif defined(BETHREADS)
|
||||
tls_set(tls_key, (void*) *thread_resources_ptr);
|
||||
#endif
|
||||
|
||||
if (tsrm_new_thread_begin_handler) {
|
||||
tsrm_new_thread_begin_handler(thread_id, &((*thread_resources_ptr)->storage));
|
||||
}
|
||||
for (i=0; i<id_count; i++) {
|
||||
if (resource_types_table[i].done) {
|
||||
(*thread_resources_ptr)->storage[i] = NULL;
|
||||
} else
|
||||
{
|
||||
(*thread_resources_ptr)->storage[i] = (void *) malloc(resource_types_table[i].size);
|
||||
if (resource_types_table[i].ctor) {
|
||||
resource_types_table[i].ctor((*thread_resources_ptr)->storage[i], &(*thread_resources_ptr)->storage);
|
||||
}
|
||||
(*thread_resources_ptr)->storage[i] = (void *) malloc(resource_types_table[i].size);
|
||||
if (resource_types_table[i].ctor) {
|
||||
resource_types_table[i].ctor((*thread_resources_ptr)->storage[i], &(*thread_resources_ptr)->storage);
|
||||
}
|
||||
}
|
||||
|
||||
tsrm_mutex_unlock(tsmm_mutex);
|
||||
|
||||
if (tsrm_new_thread_end_handler) {
|
||||
tsrm_new_thread_end_handler(thread_id, &((*thread_resources_ptr)->storage));
|
||||
}
|
||||
|
||||
tsrm_mutex_unlock(tsmm_mutex);
|
||||
}
|
||||
|
||||
|
||||
@@ -311,23 +291,23 @@ TSRM_API void *ts_resource_ex(ts_rsrc_id id, THREAD_T *th_id)
|
||||
int hash_value;
|
||||
tsrm_tls_entry *thread_resources;
|
||||
|
||||
#ifdef NETWARE
|
||||
/* The below if loop is added for NetWare to fix an abend while unloading PHP
|
||||
* when an Apache unload command is issued on the system console.
|
||||
* While exiting from PHP, at the end for some reason, this function is called
|
||||
* with tsrm_tls_table = NULL. When this happened, the server abends when
|
||||
* tsrm_tls_table is accessed since it is NULL.
|
||||
*/
|
||||
if(tsrm_tls_table) {
|
||||
#endif
|
||||
if (!th_id) {
|
||||
#if defined(PTHREADS)
|
||||
/* Fast path for looking up the resources for the current
|
||||
* thread. Its used by just about every call to
|
||||
* ts_resource_ex(). This avoids the need for a mutex lock
|
||||
* and our hashtable lookup.
|
||||
*/
|
||||
thread_resources = tsrm_tls_get();
|
||||
|
||||
thread_resources = pthread_getspecific(tls_key);
|
||||
#elif defined(TSRM_ST)
|
||||
thread_resources = st_thread_getspecific(tls_key);
|
||||
#elif defined(TSRM_WIN32)
|
||||
thread_resources = TlsGetValue(tls_key);
|
||||
#elif defined(BETHREADS)
|
||||
thread_resources = (tsrm_tls_entry*)tls_get(tls_key);
|
||||
#else
|
||||
thread_resources = NULL;
|
||||
#endif
|
||||
if (thread_resources) {
|
||||
TSRM_ERROR((TSRM_ERROR_LEVEL_INFO, "Fetching resource id %d for current thread %d", id, (long) thread_resources->thread_id));
|
||||
/* Read a specific resource from the thread's resources.
|
||||
@@ -373,68 +353,6 @@ TSRM_API void *ts_resource_ex(ts_rsrc_id id, THREAD_T *th_id)
|
||||
* changes to the structure as we read it.
|
||||
*/
|
||||
TSRM_SAFE_RETURN_RSRC(thread_resources->storage, id, thread_resources->count);
|
||||
#ifdef NETWARE
|
||||
} /* if(tsrm_tls_table) */
|
||||
#endif
|
||||
}
|
||||
|
||||
/* frees an interpreter context. You are responsible for making sure that
|
||||
* it is not linked into the TSRM hash, and not marked as the current interpreter */
|
||||
void tsrm_free_interpreter_context(void *context)
|
||||
{
|
||||
tsrm_tls_entry *next, *thread_resources = (tsrm_tls_entry*)context;
|
||||
int i;
|
||||
|
||||
while (thread_resources) {
|
||||
next = thread_resources->next;
|
||||
|
||||
for (i=0; i<thread_resources->count; i++) {
|
||||
if (resource_types_table[i].dtor) {
|
||||
resource_types_table[i].dtor(thread_resources->storage[i], &thread_resources->storage);
|
||||
}
|
||||
}
|
||||
for (i=0; i<thread_resources->count; i++) {
|
||||
free(thread_resources->storage[i]);
|
||||
}
|
||||
free(thread_resources->storage);
|
||||
free(thread_resources);
|
||||
thread_resources = next;
|
||||
}
|
||||
}
|
||||
|
||||
void *tsrm_set_interpreter_context(void *new_ctx)
|
||||
{
|
||||
tsrm_tls_entry *current;
|
||||
|
||||
current = tsrm_tls_get();
|
||||
|
||||
/* TODO: unlink current from the global linked list, and replace it
|
||||
* it with the new context, protected by mutex where/if appropriate */
|
||||
|
||||
/* Set thread local storage to this new thread resources structure */
|
||||
tsrm_tls_set(new_ctx);
|
||||
|
||||
/* return old context, so caller can restore it when they're done */
|
||||
return current;
|
||||
}
|
||||
|
||||
|
||||
/* allocates a new interpreter context */
|
||||
void *tsrm_new_interpreter_context(void)
|
||||
{
|
||||
tsrm_tls_entry *new_ctx, *current;
|
||||
THREAD_T thread_id;
|
||||
|
||||
thread_id = tsrm_thread_id();
|
||||
tsrm_mutex_lock(tsmm_mutex);
|
||||
|
||||
current = tsrm_tls_get();
|
||||
|
||||
allocate_new_resource(&new_ctx, thread_id);
|
||||
|
||||
/* switch back to the context that was in use prior to our creation
|
||||
* of the new one */
|
||||
return tsrm_set_interpreter_context(current);
|
||||
}
|
||||
|
||||
|
||||
@@ -467,7 +385,11 @@ void ts_free_thread(void)
|
||||
} else {
|
||||
tsrm_tls_table[hash_value] = thread_resources->next;
|
||||
}
|
||||
tsrm_tls_set(0);
|
||||
#if defined(PTHREADS)
|
||||
pthread_setspecific(tls_key, 0);
|
||||
#elif defined(TSRM_WIN32)
|
||||
TlsSetValue(tls_key, 0);
|
||||
#endif
|
||||
free(thread_resources);
|
||||
break;
|
||||
}
|
||||
@@ -480,83 +402,9 @@ void ts_free_thread(void)
|
||||
}
|
||||
|
||||
|
||||
/* frees all resources allocated for all threads except current */
|
||||
void ts_free_worker_threads(void)
|
||||
{
|
||||
tsrm_tls_entry *thread_resources;
|
||||
int i;
|
||||
THREAD_T thread_id = tsrm_thread_id();
|
||||
int hash_value;
|
||||
tsrm_tls_entry *last=NULL;
|
||||
|
||||
tsrm_mutex_lock(tsmm_mutex);
|
||||
hash_value = THREAD_HASH_OF(thread_id, tsrm_tls_table_size);
|
||||
thread_resources = tsrm_tls_table[hash_value];
|
||||
|
||||
while (thread_resources) {
|
||||
if (thread_resources->thread_id != thread_id) {
|
||||
for (i=0; i<thread_resources->count; i++) {
|
||||
if (resource_types_table[i].dtor) {
|
||||
resource_types_table[i].dtor(thread_resources->storage[i], &thread_resources->storage);
|
||||
}
|
||||
}
|
||||
for (i=0; i<thread_resources->count; i++) {
|
||||
free(thread_resources->storage[i]);
|
||||
}
|
||||
free(thread_resources->storage);
|
||||
if (last) {
|
||||
last->next = thread_resources->next;
|
||||
} else {
|
||||
tsrm_tls_table[hash_value] = thread_resources->next;
|
||||
}
|
||||
free(thread_resources);
|
||||
if (last) {
|
||||
thread_resources = last->next;
|
||||
} else {
|
||||
thread_resources = tsrm_tls_table[hash_value];
|
||||
}
|
||||
} else {
|
||||
if (thread_resources->next) {
|
||||
last = thread_resources;
|
||||
}
|
||||
thread_resources = thread_resources->next;
|
||||
}
|
||||
}
|
||||
tsrm_mutex_unlock(tsmm_mutex);
|
||||
}
|
||||
|
||||
|
||||
/* deallocates all occurrences of a given id */
|
||||
void ts_free_id(ts_rsrc_id id)
|
||||
{
|
||||
int i;
|
||||
int j = TSRM_UNSHUFFLE_RSRC_ID(id);
|
||||
|
||||
tsrm_mutex_lock(tsmm_mutex);
|
||||
|
||||
TSRM_ERROR((TSRM_ERROR_LEVEL_CORE, "Freeing resource id %d", id));
|
||||
|
||||
if (tsrm_tls_table) {
|
||||
for (i=0; i<tsrm_tls_table_size; i++) {
|
||||
tsrm_tls_entry *p = tsrm_tls_table[i];
|
||||
|
||||
while (p) {
|
||||
if (p->count > j && p->storage[j]) {
|
||||
if (resource_types_table && resource_types_table[j].dtor) {
|
||||
resource_types_table[j].dtor(p->storage[j], &p->storage);
|
||||
}
|
||||
free(p->storage[j]);
|
||||
p->storage[j] = NULL;
|
||||
}
|
||||
p = p->next;
|
||||
}
|
||||
}
|
||||
}
|
||||
resource_types_table[j].done = 1;
|
||||
|
||||
tsrm_mutex_unlock(tsmm_mutex);
|
||||
|
||||
TSRM_ERROR((TSRM_ERROR_LEVEL_CORE, "Successfully freed resource id %d", id));
|
||||
}
|
||||
|
||||
|
||||
@@ -571,6 +419,8 @@ TSRM_API THREAD_T tsrm_thread_id(void)
|
||||
{
|
||||
#ifdef TSRM_WIN32
|
||||
return GetCurrentThreadId();
|
||||
#elif defined(NETWARE)
|
||||
return NXThreadGetId();
|
||||
#elif defined(GNUPTH)
|
||||
return pth_self();
|
||||
#elif defined(PTHREADS)
|
||||
@@ -591,9 +441,17 @@ TSRM_API THREAD_T tsrm_thread_id(void)
|
||||
TSRM_API MUTEX_T tsrm_mutex_alloc(void)
|
||||
{
|
||||
MUTEX_T mutexp;
|
||||
#ifdef NETWARE
|
||||
long flags = 0; /* Don't require NX_MUTEX_RECURSIVE, I guess */
|
||||
NXHierarchy_t order = 0;
|
||||
NX_LOCK_INFO_ALLOC (lockInfo, "PHP-TSRM", 0);
|
||||
#endif
|
||||
|
||||
#ifdef TSRM_WIN32
|
||||
mutexp = malloc(sizeof(CRITICAL_SECTION));
|
||||
InitializeCriticalSection(mutexp);
|
||||
#elif defined(NETWARE)
|
||||
mutexp = NXMutexAlloc(flags, order, &lockInfo); /* return value ignored for now */
|
||||
#elif defined(GNUPTH)
|
||||
mutexp = (MUTEX_T) malloc(sizeof(*mutexp));
|
||||
pth_mutex_init(mutexp);
|
||||
@@ -624,7 +482,8 @@ TSRM_API void tsrm_mutex_free(MUTEX_T mutexp)
|
||||
if (mutexp) {
|
||||
#ifdef TSRM_WIN32
|
||||
DeleteCriticalSection(mutexp);
|
||||
free(mutexp);
|
||||
#elif defined(NETWARE)
|
||||
NXMutexFree(mutexp);
|
||||
#elif defined(GNUPTH)
|
||||
free(mutexp);
|
||||
#elif defined(PTHREADS)
|
||||
@@ -647,26 +506,21 @@ TSRM_API void tsrm_mutex_free(MUTEX_T mutexp)
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Lock a mutex.
|
||||
A return value of 0 indicates success
|
||||
*/
|
||||
/* Lock a mutex */
|
||||
TSRM_API int tsrm_mutex_lock(MUTEX_T mutexp)
|
||||
{
|
||||
TSRM_ERROR((TSRM_ERROR_LEVEL_INFO, "Mutex locked thread: %ld", tsrm_thread_id()));
|
||||
#ifdef TSRM_WIN32
|
||||
EnterCriticalSection(mutexp);
|
||||
return 0;
|
||||
return 1;
|
||||
#elif defined(NETWARE)
|
||||
return NXLock(mutexp);
|
||||
#elif defined(GNUPTH)
|
||||
if (pth_mutex_acquire(mutexp, 0, NULL)) {
|
||||
return 0;
|
||||
}
|
||||
return -1;
|
||||
return pth_mutex_acquire(mutexp, 0, NULL);
|
||||
#elif defined(PTHREADS)
|
||||
return pthread_mutex_lock(mutexp);
|
||||
#elif defined(NSAPI)
|
||||
crit_enter(mutexp);
|
||||
return 0;
|
||||
return crit_enter(mutexp);
|
||||
#elif defined(PI3WEB)
|
||||
return PISync_lock(mutexp);
|
||||
#elif defined(TSRM_ST)
|
||||
@@ -679,26 +533,21 @@ TSRM_API int tsrm_mutex_lock(MUTEX_T mutexp)
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Unlock a mutex.
|
||||
A return value of 0 indicates success
|
||||
*/
|
||||
/* Unlock a mutex */
|
||||
TSRM_API int tsrm_mutex_unlock(MUTEX_T mutexp)
|
||||
{
|
||||
TSRM_ERROR((TSRM_ERROR_LEVEL_INFO, "Mutex unlocked thread: %ld", tsrm_thread_id()));
|
||||
#ifdef TSRM_WIN32
|
||||
LeaveCriticalSection(mutexp);
|
||||
return 0;
|
||||
return 1;
|
||||
#elif defined(NETWARE)
|
||||
return NXUnlock(mutexp);
|
||||
#elif defined(GNUPTH)
|
||||
if (pth_mutex_release(mutexp)) {
|
||||
return 0;
|
||||
}
|
||||
return -1;
|
||||
return pth_mutex_release(mutexp);
|
||||
#elif defined(PTHREADS)
|
||||
return pthread_mutex_unlock(mutexp);
|
||||
#elif defined(NSAPI)
|
||||
crit_exit(mutexp);
|
||||
return 0;
|
||||
return crit_exit(mutexp);
|
||||
#elif defined(PI3WEB)
|
||||
return PISync_unlock(mutexp);
|
||||
#elif defined(TSRM_ST)
|
||||
|
||||
+15
-33
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Thread Safe Resource Manager |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1999-2009, Andi Gutmans, Sascha Schumann, Zeev Suraski |
|
||||
| Copyright (c) 1999, 2000, Andi Gutmans, Sascha Schumann, Zeev Suraski|
|
||||
| This source file is subject to the TSRM license, that is bundled |
|
||||
| with this package in the file LICENSE |
|
||||
+----------------------------------------------------------------------+
|
||||
@@ -13,42 +13,34 @@
|
||||
#ifndef TSRM_H
|
||||
#define TSRM_H
|
||||
|
||||
#if !defined(__CYGWIN__) && defined(WIN32)
|
||||
/* #ifndef WIN32 */
|
||||
#if !defined(WIN32) && !defined(NETWARE)
|
||||
# include "tsrm_config.h"
|
||||
#endif
|
||||
|
||||
#ifdef WIN32
|
||||
# define TSRM_WIN32
|
||||
# include "tsrm_config.w32.h"
|
||||
#else
|
||||
# include <tsrm_config.h>
|
||||
#endif
|
||||
|
||||
#ifdef TSRM_WIN32
|
||||
# ifdef TSRM_EXPORTS
|
||||
# define TSRM_API __declspec(dllexport)
|
||||
# define TSRM_API __declspec(dllexport)
|
||||
# else
|
||||
# define TSRM_API __declspec(dllimport)
|
||||
# define TSRM_API __declspec(dllimport)
|
||||
# endif
|
||||
#elif defined(__GNUC__) && __GNUC__ >= 4
|
||||
# define TSRM_API __attribute__ ((visibility("default")))
|
||||
#else
|
||||
# define TSRM_API
|
||||
#endif
|
||||
|
||||
#ifdef _WIN64
|
||||
typedef __int64 tsrm_intptr_t;
|
||||
typedef unsigned __int64 tsrm_uintptr_t;
|
||||
#else
|
||||
typedef long tsrm_intptr_t;
|
||||
typedef unsigned long tsrm_uintptr_t;
|
||||
#endif
|
||||
|
||||
/* Only compile multi-threading functions if we're in ZTS mode */
|
||||
#ifdef ZTS
|
||||
|
||||
#ifdef TSRM_WIN32
|
||||
# ifndef TSRM_INCLUDE_FULL_WINDOWS_HEADERS
|
||||
# define WIN32_LEAN_AND_MEAN
|
||||
# endif
|
||||
# include <windows.h>
|
||||
# include <shellapi.h>
|
||||
#elif defined(NETWARE)
|
||||
# include <nks/thread.h>
|
||||
# include <nks/synch.h>
|
||||
#elif defined(GNUPTH)
|
||||
# include <pth.h>
|
||||
#elif defined(PTHREADS)
|
||||
@@ -66,6 +58,9 @@ typedef int ts_rsrc_id;
|
||||
#ifdef TSRM_WIN32
|
||||
# define THREAD_T DWORD
|
||||
# define MUTEX_T CRITICAL_SECTION *
|
||||
#elif defined(NETWARE)
|
||||
# define THREAD_T NXThreadId_t
|
||||
# define MUTEX_T NXMutex_t *
|
||||
#elif defined(GNUPTH)
|
||||
# define THREAD_T pth_t
|
||||
# define MUTEX_T pth_mutex_t *
|
||||
@@ -113,9 +108,6 @@ TSRM_API void *ts_resource_ex(ts_rsrc_id id, THREAD_T *th_id);
|
||||
/* frees all resources allocated for the current thread */
|
||||
TSRM_API void ts_free_thread(void);
|
||||
|
||||
/* frees all resources allocated for all threads except current */
|
||||
void ts_free_worker_threads(void);
|
||||
|
||||
/* deallocates all occurrences of a given id */
|
||||
TSRM_API void ts_free_id(ts_rsrc_id id);
|
||||
|
||||
@@ -142,18 +134,10 @@ TSRM_API int tsrm_mutex_unlock(MUTEX_T mutexp);
|
||||
TSRM_API void *tsrm_set_new_thread_begin_handler(tsrm_thread_begin_func_t new_thread_begin_handler);
|
||||
TSRM_API void *tsrm_set_new_thread_end_handler(tsrm_thread_end_func_t new_thread_end_handler);
|
||||
|
||||
/* these 3 APIs should only be used by people that fully understand the threading model
|
||||
* used by PHP/Zend and the selected SAPI. */
|
||||
TSRM_API void *tsrm_new_interpreter_context(void);
|
||||
TSRM_API void *tsrm_set_interpreter_context(void *new_ctx);
|
||||
TSRM_API void tsrm_free_interpreter_context(void *context);
|
||||
|
||||
#define TSRM_SHUFFLE_RSRC_ID(rsrc_id) ((rsrc_id)+1)
|
||||
#define TSRM_UNSHUFFLE_RSRC_ID(rsrc_id) ((rsrc_id)-1)
|
||||
|
||||
#define TSRMLS_FETCH() void ***tsrm_ls = (void ***) ts_resource_ex(0, NULL)
|
||||
#define TSRMLS_FETCH_FROM_CTX(ctx) void ***tsrm_ls = (void ***) ctx
|
||||
#define TSRMLS_SET_CTX(ctx) ctx = (void ***) tsrm_ls
|
||||
#define TSRMG(id, type, element) (((type) (*((void ***) tsrm_ls))[TSRM_UNSHUFFLE_RSRC_ID(id)])->element)
|
||||
#define TSRMLS_D void ***tsrm_ls
|
||||
#define TSRMLS_DC , TSRMLS_D
|
||||
@@ -167,8 +151,6 @@ TSRM_API void tsrm_free_interpreter_context(void *context);
|
||||
#else /* non ZTS */
|
||||
|
||||
#define TSRMLS_FETCH()
|
||||
#define TSRMLS_FETCH_FROM_CTX(ctx)
|
||||
#define TSRMLS_SET_CTX(ctx)
|
||||
#define TSRMLS_D void
|
||||
#define TSRMLS_DC
|
||||
#define TSRMLS_C
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
|
||||
AC_DEFUN([AM_SET_LIBTOOL_VARIABLE],[
|
||||
AC_DEFUN(AM_SET_LIBTOOL_VARIABLE,[
|
||||
LIBTOOL='$(SHELL) $(top_builddir)/libtool $1'
|
||||
])
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
// vim:ft=javascript
|
||||
// $Id$
|
||||
|
||||
if (CHECK_HEADER_ADD_INCLUDE("NewAPIs.h", "CFLAGS_PHP", php_usual_include_suspects)) {
|
||||
// Need to add the flag directly, since TSRM doesn't include the config
|
||||
// header
|
||||
ADD_FLAG("CFLAGS_PHP", "/DHAVE_NEWAPIS_H=1");
|
||||
}
|
||||
ADD_SOURCES("TSRM", "TSRM.c tsrm_strtok_r.c tsrm_virtual_cwd.c tsrm_win32.c");
|
||||
|
||||
+5
-6
@@ -7,13 +7,11 @@
|
||||
* on Windows 95/NT.
|
||||
*/
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
#include <io.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
#include <direct.h>
|
||||
|
||||
|
||||
/* struct dirent - same as Unix */
|
||||
|
||||
@@ -27,10 +25,10 @@ struct dirent {
|
||||
|
||||
/* typedef DIR - not the same as Unix */
|
||||
typedef struct {
|
||||
HANDLE handle; /* _findfirst/_findnext handle */
|
||||
long handle; /* _findfirst/_findnext handle */
|
||||
short offset; /* offset into directory */
|
||||
short finished; /* 1 if there are not more files */
|
||||
WIN32_FIND_DATA fileinfo; /* from _findfirst/_findnext */
|
||||
struct _finddata_t fileinfo; /* from _findfirst/_findnext */
|
||||
char *dir; /* the dir we are reading */
|
||||
struct dirent dent; /* the dirent to return */
|
||||
} DIR;
|
||||
@@ -40,6 +38,7 @@ DIR *opendir(const char *);
|
||||
struct dirent *readdir(DIR *);
|
||||
int readdir_r(DIR *, struct dirent *, struct dirent **);
|
||||
int closedir(DIR *);
|
||||
int rewinddir(DIR *);
|
||||
void rewinddir(DIR *);
|
||||
|
||||
|
||||
#endif /* READDIR_H */
|
||||
+5
-13
@@ -30,7 +30,7 @@ dnl PTHREADS_FLAGS
|
||||
dnl
|
||||
dnl Set some magic defines to achieve POSIX threads conformance
|
||||
dnl
|
||||
AC_DEFUN([PTHREADS_FLAGS],[
|
||||
AC_DEFUN(PTHREADS_FLAGS,[
|
||||
if test -z "$host_alias" && test -n "$host"; then
|
||||
host_alias=$host
|
||||
fi
|
||||
@@ -65,7 +65,7 @@ dnl PTHREADS_CHECK_COMPILE
|
||||
dnl
|
||||
dnl Check whether the current setup can use POSIX threads calls
|
||||
dnl
|
||||
AC_DEFUN([PTHREADS_CHECK_COMPILE], [
|
||||
AC_DEFUN(PTHREADS_CHECK_COMPILE, [
|
||||
AC_TRY_RUN( [
|
||||
#include <pthread.h>
|
||||
#include <stddef.h>
|
||||
@@ -84,15 +84,7 @@ int main() {
|
||||
pthreads_working=yes
|
||||
], [
|
||||
pthreads_working=no
|
||||
], [
|
||||
dnl For cross compiling running this test is of no use. NetWare supports pthreads
|
||||
pthreads_working=no
|
||||
case $host_alias in
|
||||
*netware*)
|
||||
pthreads_working=yes
|
||||
esac
|
||||
]
|
||||
) ] )dnl
|
||||
], pthreads_working=no ) ] )dnl
|
||||
dnl
|
||||
dnl PTHREADS_CHECK()
|
||||
dnl
|
||||
@@ -108,7 +100,7 @@ dnl -pthreads gcc (Solaris)
|
||||
dnl -qthreaded AIX cc V5
|
||||
dnl -threads gcc (HP-UX)
|
||||
dnl
|
||||
AC_DEFUN([PTHREADS_CHECK],[
|
||||
AC_DEFUN(PTHREADS_CHECK,[
|
||||
|
||||
if test "$beos_threads" = "1"; then
|
||||
pthreads_working="yes"
|
||||
@@ -162,7 +154,7 @@ fi
|
||||
])dnl
|
||||
dnl
|
||||
dnl
|
||||
AC_DEFUN([PTHREADS_ASSIGN_VARS],[
|
||||
AC_DEFUN(PTHREADS_ASSIGN_VARS,[
|
||||
if test -n "$ac_cv_pthreads_lib"; then
|
||||
LIBS="$LIBS -l$ac_cv_pthreads_lib"
|
||||
fi
|
||||
|
||||
+8
-7
@@ -1,6 +1,6 @@
|
||||
|
||||
dnl TSRM_CHECK_GCC_ARG(ARG, ACTION-IF-FOUND, ACTION-IF-NOT_FOUND)
|
||||
AC_DEFUN([TSRM_CHECK_GCC_ARG],[
|
||||
AC_DEFUN(TSRM_CHECK_GCC_ARG,[
|
||||
gcc_arg_name=[ac_cv_gcc_arg]translit($1,A-Z-,a-z_)
|
||||
AC_CACHE_CHECK([whether $CC supports $1], [ac_cv_gcc_arg]translit($1,A-Z-,a-z_), [
|
||||
echo 'void somefunc() { };' > conftest.c
|
||||
@@ -21,7 +21,7 @@ AC_DEFUN([TSRM_CHECK_GCC_ARG],[
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN([TSRM_BASIC_CHECKS],[
|
||||
AC_DEFUN(TSRM_BASIC_CHECKS,[
|
||||
|
||||
AC_REQUIRE([AC_PROG_CC])dnl
|
||||
dnl AC_REQUIRE([AM_PROG_CC_STDC])dnl
|
||||
@@ -33,7 +33,7 @@ AC_CHECK_HEADERS(stdarg.h)
|
||||
])
|
||||
|
||||
|
||||
AC_DEFUN([TSRM_CHECK_PTH],[
|
||||
AC_DEFUN(TSRM_CHECK_PTH,[
|
||||
|
||||
AC_MSG_CHECKING(for GNU Pth)
|
||||
PTH_PREFIX="`$1 --prefix`"
|
||||
@@ -50,7 +50,7 @@ AC_MSG_RESULT(yes - installed in $PTH_PREFIX)
|
||||
|
||||
])
|
||||
|
||||
AC_DEFUN([TSRM_CHECK_ST],[
|
||||
AC_DEFUN(TSRM_CHECK_ST,[
|
||||
if test -r "$1/include/st.h"; then
|
||||
CPPFLAGS="$CPPFLAGS -I$1/include"
|
||||
LDFLAGS="$LDFLAGS -L$1/lib"
|
||||
@@ -68,8 +68,9 @@ AC_DEFUN([TSRM_CHECK_ST],[
|
||||
])
|
||||
|
||||
sinclude(threads.m4)
|
||||
sinclude(TSRM/threads.m4)
|
||||
|
||||
AC_DEFUN([TSRM_CHECK_PTHREADS],[
|
||||
AC_DEFUN(TSRM_CHECK_PTHREADS,[
|
||||
|
||||
PTHREADS_CHECK
|
||||
|
||||
@@ -88,14 +89,14 @@ fi
|
||||
])
|
||||
|
||||
|
||||
AC_DEFUN([TSRM_THREADS_CHECKS],[
|
||||
AC_DEFUN(TSRM_THREADS_CHECKS,[
|
||||
|
||||
dnl For the thread implementations, we always use --with-*
|
||||
dnl to maintain consistency
|
||||
|
||||
AC_ARG_WITH(tsrm-pth,
|
||||
[ --with-tsrm-pth[=pth-config]
|
||||
Use GNU Pth],[
|
||||
Use GNU Pth.],[
|
||||
TSRM_PTH=$withval
|
||||
],[
|
||||
TSRM_PTH=no
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
#ifndef TSRM_CONFIG_NW_H
|
||||
#define TSRM_CONFIG_NW_H
|
||||
|
||||
#define HAVE_UTIME 1
|
||||
|
||||
/* Though we have alloca(), this seems to be causing some problem with the stack pointer -- hence not using it */
|
||||
/* #define HAVE_ALLOCA 1 */
|
||||
|
||||
#endif
|
||||
@@ -1,8 +1,6 @@
|
||||
#ifndef TSRM_CONFIG_W32_H
|
||||
#define TSRM_CONFIG_W32_H
|
||||
|
||||
#include <../main/config.w32.h>
|
||||
|
||||
#define HAVE_UTIME 1
|
||||
#define HAVE_ALLOCA 1
|
||||
#define HAVE_REALPATH 1
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
#ifndef TSRM_CONFIG_COMMON_H
|
||||
#define TSRM_CONFIG_COMMON_H
|
||||
|
||||
#ifndef __CYGWIN__
|
||||
# if WINNT|WIN32
|
||||
# define TSRM_WIN32
|
||||
# endif
|
||||
#if WINNT|WIN32
|
||||
# define TSRM_WIN32
|
||||
#endif
|
||||
|
||||
#ifdef TSRM_WIN32
|
||||
# include "tsrm_config.w32.h"
|
||||
#elif defined(NETWARE)
|
||||
# include "tsrm_config.nw.h"
|
||||
#else
|
||||
# include <tsrm_config.h>
|
||||
# include "tsrm_config.h"
|
||||
# include <sys/param.h>
|
||||
#endif
|
||||
|
||||
@@ -25,9 +25,7 @@
|
||||
#pragma alloca
|
||||
# else
|
||||
# ifndef alloca /* predefined by HP cc +Olibcalls */
|
||||
# ifndef NETWARE
|
||||
char *alloca ();
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
@@ -44,27 +42,17 @@ char *alloca ();
|
||||
#ifndef MAXPATHLEN
|
||||
# ifdef PATH_MAX
|
||||
# define MAXPATHLEN PATH_MAX
|
||||
# elif defined(MAX_PATH)
|
||||
# define MAXPATHLEN MAX_PATH
|
||||
# else
|
||||
# define MAXPATHLEN 256
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if (HAVE_ALLOCA || (defined (__GNUC__) && __GNUC__ >= 2))
|
||||
# define TSRM_ALLOCA_MAX_SIZE 4096
|
||||
# define TSRM_ALLOCA_FLAG(name) \
|
||||
int name;
|
||||
# define tsrm_do_alloca_ex(size, limit, use_heap) \
|
||||
((use_heap = ((size) > (limit))) ? malloc(size) : alloca(size))
|
||||
# define tsrm_do_alloca(size, use_heap) \
|
||||
tsrm_do_alloca_ex(size, TSRM_ALLOCA_MAX_SIZE, use_heap)
|
||||
# define tsrm_free_alloca(p, use_heap) \
|
||||
do { if (use_heap) free(p); } while (0)
|
||||
# define tsrm_do_alloca(p) alloca(p)
|
||||
# define tsrm_free_alloca(p)
|
||||
#else
|
||||
# define TSRM_ALLOCA_FLAG(name)
|
||||
# define tsrm_do_alloca(p, use_heap) malloc(p)
|
||||
# define tsrm_free_alloca(p, use_heap) free(p)
|
||||
# define tsrm_do_alloca(p) malloc(p)
|
||||
# define tsrm_free_alloca(p) free(p)
|
||||
#endif
|
||||
|
||||
#endif /* TSRM_CONFIG_COMMON_H */
|
||||
+157
-137
@@ -1,19 +1,18 @@
|
||||
/*
|
||||
+----------------------------------------------------------------------+
|
||||
| PHP Version 6 |
|
||||
| PHP Version 4 |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1997-2010 The PHP Group |
|
||||
| Copyright (c) 1997-2003 The PHP Group |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 3.01 of the PHP license, |
|
||||
| This source file is subject to version 2.02 of the PHP license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available through the world-wide-web at the following url: |
|
||||
| http://www.php.net/license/3_01.txt |
|
||||
| available at through the world-wide-web at |
|
||||
| http://www.php.net/license/2_02.txt. |
|
||||
| If you did not receive a copy of the PHP license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@php.net so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Venkat Raghavan S <rvenkat@novell.com> |
|
||||
| Anantha Kesari H Y <hyanantha@novell.com> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
@@ -40,9 +39,8 @@
|
||||
|
||||
#include "mktemp.h"
|
||||
|
||||
/* strtok() call in LibC is abending when used in a different address space
|
||||
* -- hence using PHP's version itself for now
|
||||
*/
|
||||
/* strtok() call in LibC is abending when used in a different address space -- hence using
|
||||
PHP's version itself for now : Venkat (30/4/02) */
|
||||
#include "tsrm_strtok_r.h"
|
||||
#define tsrm_strtok_r(a,b,c) strtok((a),(b))
|
||||
|
||||
@@ -52,189 +50,211 @@
|
||||
|
||||
TSRM_API FILE* popen(const char *commandline, const char *type)
|
||||
{
|
||||
char *command = NULL, *argv[MAX_ARGS] = {'\0'}, **env = NULL;
|
||||
char *command = NULL, *argv[MAX_ARGS] = {'\0'}, **env = NULL;
|
||||
char *tempName = "sys:/php/temp/phpXXXXXX.tmp";
|
||||
char *filePath = NULL;
|
||||
char *ptr = NULL;
|
||||
int ptrLen = 0, argc = 0, i = 0, envCount = 0, err = 0;
|
||||
char *filePath = NULL;
|
||||
char *ptr = NULL;
|
||||
int ptrLen = 0, argc = 0, i = 0, envCount = 0, err = 0;
|
||||
FILE *stream = NULL;
|
||||
#if defined(USE_PIPE_OPEN) || defined(USE_MKFIFO)
|
||||
int pipe_handle;
|
||||
int mode = O_RDONLY;
|
||||
int pipe_handle;
|
||||
int mode = O_RDONLY;
|
||||
#else
|
||||
NXHandle_t pipe_handle;
|
||||
NXMode_t mode = NX_O_RDONLY;
|
||||
NXHandle_t pipe_handle;
|
||||
NXMode_t mode = NX_O_RDONLY;
|
||||
#endif
|
||||
NXExecEnvSpec_t envSpec;
|
||||
NXNameSpec_t nameSpec;
|
||||
NXVmId_t newVM = 0;
|
||||
NXExecEnvSpec_t envSpec;
|
||||
NXNameSpec_t nameSpec;
|
||||
NXVmId_t newVM = 0;
|
||||
|
||||
/* Check for validity of input parameters */
|
||||
if (!commandline || !type)
|
||||
return NULL;
|
||||
/* Check for validity of input parameters */
|
||||
if (!commandline || !type)
|
||||
return NULL;
|
||||
|
||||
/* Get temporary file name */
|
||||
filePath = mktemp(tempName);
|
||||
/* Get temporary file name */
|
||||
filePath = mktemp(tempName);
|
||||
/*consoleprintf ("PHP | popen: file path = %s, mode = %s\n", filePath, type);*/
|
||||
if (!filePath)
|
||||
return NULL;
|
||||
|
||||
/* Set pipe mode according to type -- for now allow only "r" or "w" */
|
||||
if (strcmp(type, "r") == 0)
|
||||
/* Set pipe mode according to type -- for now allow only "r" or "w" */
|
||||
if (strcmp(type, "r") == 0)
|
||||
#if defined(USE_PIPE_OPEN) || defined(USE_MKFIFO)
|
||||
mode = O_RDONLY;
|
||||
mode = O_RDONLY;
|
||||
#else
|
||||
mode = NX_O_RDONLY;
|
||||
mode = NX_O_RDONLY;
|
||||
#endif
|
||||
else if (strcmp(type, "w") == 0)
|
||||
else if (strcmp(type, "w") == 0)
|
||||
#if defined(USE_PIPE_OPEN) || defined(USE_MKFIFO)
|
||||
mode = O_WRONLY;
|
||||
mode = O_WRONLY;
|
||||
#else
|
||||
mode = NX_O_WRONLY;
|
||||
mode = NX_O_WRONLY;
|
||||
#endif
|
||||
else
|
||||
return NULL;
|
||||
else
|
||||
return NULL;
|
||||
|
||||
#ifdef USE_PIPE_OPEN
|
||||
pipe_handle = pipe_open(filePath, mode);
|
||||
if (pipe_handle == -1)
|
||||
return NULL;
|
||||
pipe_handle = pipe_open(filePath, mode);
|
||||
/*consoleprintf ("PHP | popen: pipe_open() returned %d\n", pipe_handle);*/
|
||||
if (pipe_handle == -1)
|
||||
return NULL;
|
||||
#elif defined(USE_MKFIFO)
|
||||
pipe_handle = mkfifo(filePath, mode);
|
||||
if (pipe_handle == -1)
|
||||
return NULL;
|
||||
pipe_handle = mkfifo(filePath, mode);
|
||||
consoleprintf ("PHP | popen: mkfifo() returned %d\n", pipe_handle);
|
||||
if (pipe_handle == -1)
|
||||
return NULL;
|
||||
#else
|
||||
/* - NetWare doesn't require first parameter
|
||||
* - Allowing LibC to choose the buffer size for now
|
||||
*/
|
||||
err = NXFifoOpen(0, filePath, mode, 0, &pipe_handle);
|
||||
if (err)
|
||||
return NULL;
|
||||
/*
|
||||
- NetWare doesn't require first parameter
|
||||
- Allowing LibC to choose the buffer size for now
|
||||
*/
|
||||
err = NXFifoOpen(0, filePath, mode, 0, &pipe_handle);
|
||||
/*consoleprintf ("PHP | popen: NXFifoOpen() returned %d\n", err);*/
|
||||
if (err)
|
||||
return NULL;
|
||||
#endif
|
||||
|
||||
/* Copy the environment variables in preparation for the spawn call */
|
||||
envCount = NXGetEnvCount() + 1; /* add one for NULL */
|
||||
env = (char **) NXMemAlloc(sizeof(char *) * envCount, 0);
|
||||
if (!env)
|
||||
return NULL;
|
||||
/* Copy the environment variables in preparation for the spawn call */
|
||||
|
||||
err = NXCopyEnv(env, envCount);
|
||||
if (err) {
|
||||
NXMemFree (env);
|
||||
return NULL;
|
||||
}
|
||||
envCount = NXGetEnvCount() + 1; /* add one for NULL */
|
||||
env = (char**)NXMemAlloc(sizeof(char*) * envCount, 0);
|
||||
if (!env)
|
||||
return NULL;
|
||||
|
||||
/* Separate commandline string into words */
|
||||
ptr = tsrm_strtok_r((char*)commandline, WHITESPACE, NULL);
|
||||
ptrLen = strlen(ptr);
|
||||
err = NXCopyEnv(env, envCount);
|
||||
consoleprintf ("PHP | popen: NXCopyEnv() returned %d\n", err);
|
||||
if (err)
|
||||
{
|
||||
NXMemFree (env);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
command = (char*)malloc(ptrLen + 1);
|
||||
if (!command) {
|
||||
NXMemFree (env);
|
||||
return NULL;
|
||||
}
|
||||
/* Separate commandline string into words */
|
||||
consoleprintf ("PHP | popen: commandline = %s\n", commandline);
|
||||
ptr = tsrm_strtok_r((char*)commandline, WHITESPACE, NULL);
|
||||
ptrLen = strlen(ptr);
|
||||
|
||||
strcpy (command, ptr);
|
||||
command = (char*)malloc(ptrLen + 1);
|
||||
if (!command)
|
||||
{
|
||||
NXMemFree (env);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
ptr = tsrm_strtok_r(NULL, WHITESPACE, NULL);
|
||||
while (ptr && (argc < MAX_ARGS)) {
|
||||
ptrLen = strlen(ptr);
|
||||
strcpy (command, ptr);
|
||||
|
||||
argv[argc] = (char*)malloc(ptrLen + 1);
|
||||
if (!argv[argc]) {
|
||||
NXMemFree (env);
|
||||
if (command)
|
||||
free (command);
|
||||
ptr = tsrm_strtok_r(NULL, WHITESPACE, NULL);
|
||||
while (ptr && (argc < MAX_ARGS))
|
||||
{
|
||||
ptrLen = strlen(ptr);
|
||||
|
||||
for (i = 0; i < argc; i++) {
|
||||
if (argv[i])
|
||||
free (argv[i]);
|
||||
}
|
||||
argv[argc] = (char*)malloc(ptrLen + 1);
|
||||
if (!argv[argc])
|
||||
{
|
||||
NXMemFree (env);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
if (command)
|
||||
free (command);
|
||||
|
||||
strcpy (argv[argc], ptr);
|
||||
argc++;
|
||||
ptr = tsrm_strtok_r(NULL, WHITESPACE, NULL);
|
||||
}
|
||||
for (i = 0; i < argc; i++)
|
||||
{
|
||||
if (argv[i])
|
||||
free (argv[i]);
|
||||
}
|
||||
|
||||
/* Setup the execution environment and spawn new process */
|
||||
envSpec.esFlags = 0; /* Not used */
|
||||
envSpec.esArgc = argc;
|
||||
envSpec.esArgv = (void **) argv;
|
||||
envSpec.esEnv = (void **) env;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* envSpec.esStdin.ssType = */
|
||||
envSpec.esStdout.ssType = NX_OBJ_FIFO;
|
||||
envSpec.esStderr.ssType = NX_OBJ_FILE;
|
||||
strcpy (argv[argc], ptr);
|
||||
|
||||
/* 'ssHandle' is not a struct/union/class member */
|
||||
argc++;
|
||||
|
||||
ptr = tsrm_strtok_r(NULL, WHITESPACE, NULL);
|
||||
}
|
||||
consoleprintf ("PHP | popen: commandline string parsed into tokens\n");
|
||||
/* Setup the execution environment and spawn new process */
|
||||
|
||||
envSpec.esFlags = 0; /* Not used */
|
||||
envSpec.esArgc = argc;
|
||||
envSpec.esArgv = (void**)argv;
|
||||
envSpec.esEnv = (void**)env;
|
||||
|
||||
envSpec.esStdin.ssType =
|
||||
envSpec.esStdout.ssType = NX_OBJ_FIFO;
|
||||
envSpec.esStderr.ssType = NX_OBJ_FILE;
|
||||
/*
|
||||
envSpec.esStdin.ssHandle =
|
||||
envSpec.esStdout.ssHandle =
|
||||
envSpec.esStderr.ssHandle = -1;
|
||||
envSpec.esStdin.ssHandle =
|
||||
envSpec.esStdout.ssHandle =
|
||||
envSpec.esStderr.ssHandle = -1;
|
||||
*/
|
||||
envSpec.esStdin.ssPathCtx = NULL;
|
||||
envSpec.esStdout.ssPathCtx = NULL;
|
||||
envSpec.esStderr.ssPathCtx = NULL;
|
||||
envSpec.esStdin.ssPathCtx =
|
||||
envSpec.esStdout.ssPathCtx =
|
||||
envSpec.esStderr.ssPathCtx = NULL;
|
||||
|
||||
#if defined(USE_PIPE_OPEN) || defined(USE_MKFIFO)
|
||||
if (mode == O_RDONLY) {
|
||||
if (mode == O_RDONLY)
|
||||
#else
|
||||
if (mode == NX_O_RDONLY) {
|
||||
if (mode == NX_O_RDONLY)
|
||||
#endif
|
||||
envSpec.esStdin.ssPath = filePath;
|
||||
envSpec.esStdout.ssPath = stdout;
|
||||
} else { /* Write Only */
|
||||
envSpec.esStdin.ssPath = stdin;
|
||||
envSpec.esStdout.ssPath = filePath;
|
||||
}
|
||||
{
|
||||
envSpec.esStdin.ssPath = filePath;
|
||||
envSpec.esStdout.ssPath = stdout;
|
||||
}
|
||||
else /* Write Only */
|
||||
{
|
||||
envSpec.esStdin.ssPath = stdin;
|
||||
envSpec.esStdout.ssPath = filePath;
|
||||
}
|
||||
|
||||
envSpec.esStderr.ssPath = stdout;
|
||||
envSpec.esStderr.ssPath = stdout;
|
||||
|
||||
nameSpec.ssType = NX_OBJ_FIFO;
|
||||
/* nameSpec.ssHandle = 0; */ /* 'ssHandle' is not a struct/union/class member */
|
||||
nameSpec.ssPathCtx = NULL; /* Not used */
|
||||
nameSpec.ssPath = argv[0];
|
||||
err = NXVmSpawn(&nameSpec, &envSpec, 0, &newVM);
|
||||
if (!err)
|
||||
/* Get file pointer corresponding to the pipe (file) opened */
|
||||
stream = fdopen(pipe_handle, type);
|
||||
nameSpec.ssType = NX_OBJ_FIFO;
|
||||
/* nameSpec.ssHandle = 0; */ /* Not used */
|
||||
nameSpec.ssPathCtx = NULL; /* Not used */
|
||||
nameSpec.ssPath = argv[0];
|
||||
consoleprintf ("PHP | popen: environment setup\n");
|
||||
err = NXVmSpawn(&nameSpec, &envSpec, 0, &newVM);
|
||||
consoleprintf ("PHP | popen: NXVmSpawn() returned %d\n", err);
|
||||
if (!err)
|
||||
/* Get file pointer corresponding to the pipe (file) opened */
|
||||
stream = fdopen(pipe_handle, type);
|
||||
|
||||
/* Clean-up */
|
||||
if (env)
|
||||
NXMemFree (env);
|
||||
/* Clean-up */
|
||||
|
||||
if (pipe_handle)
|
||||
if (env)
|
||||
NXMemFree (env);
|
||||
|
||||
if (pipe_handle)
|
||||
#if defined(USE_PIPE_OPEN) || defined(USE_MKFIFO)
|
||||
close(pipe_handle);
|
||||
close(pipe_handle);
|
||||
#else
|
||||
NXClose(pipe_handle);
|
||||
NXClose(pipe_handle);
|
||||
#endif
|
||||
|
||||
if (command)
|
||||
free (command);
|
||||
if (command)
|
||||
free (command);
|
||||
|
||||
for (i = 0; i < argc; i++) {
|
||||
if (argv[i])
|
||||
free (argv[i]);
|
||||
}
|
||||
|
||||
return stream;
|
||||
for (i = 0; i < argc; i++)
|
||||
{
|
||||
if (argv[i])
|
||||
free (argv[i]);
|
||||
}
|
||||
consoleprintf ("PHP | popen: all clean-up done, returning...\n");
|
||||
return stream;
|
||||
}
|
||||
|
||||
TSRM_API int pclose(FILE* stream)
|
||||
{
|
||||
int err = 0;
|
||||
NXHandle_t fd = 0;
|
||||
int err = 0;
|
||||
NXHandle_t fd = 0;
|
||||
|
||||
/* Get the process associated with this pipe (file) handle and terminate it */
|
||||
fd = fileno(stream);
|
||||
NXClose (fd);
|
||||
/* Get the process associated with this pipe (file) handle and terminate it */
|
||||
fd = fileno(stream);
|
||||
NXClose (fd);
|
||||
|
||||
err = fclose(stream);
|
||||
err = fclose(stream);
|
||||
|
||||
return err;
|
||||
return err;
|
||||
}
|
||||
|
||||
#endif /* NETWARE */
|
||||
#endif
|
||||
+5
-6
@@ -1,19 +1,18 @@
|
||||
/*
|
||||
+----------------------------------------------------------------------+
|
||||
| PHP Version 6 |
|
||||
| PHP Version 4 |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1997-2010 The PHP Group |
|
||||
| Copyright (c) 1997-2003 The PHP Group |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 3.01 of the PHP license, |
|
||||
| This source file is subject to version 2.02 of the PHP license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available through the world-wide-web at the following url: |
|
||||
| http://www.php.net/license/3_01.txt |
|
||||
| available at through the world-wide-web at |
|
||||
| http://www.php.net/license/2_02.txt. |
|
||||
| If you did not receive a copy of the PHP license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@php.net so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Venkat Raghavan S <rvenkat@novell.com> |
|
||||
| Anantha Kesari H Y <hyanantha@novell.com> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
|
||||
+265
-1205
File diff suppressed because it is too large.
Load diff
+60
-134
@@ -1,13 +1,13 @@
|
||||
/*
|
||||
+----------------------------------------------------------------------+
|
||||
| PHP Version 6 |
|
||||
| PHP Version 4 |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1997-2010 The PHP Group |
|
||||
| Copyright (c) 1997-2003 The PHP Group |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 3.01 of the PHP license, |
|
||||
| This source file is subject to version 2.02 of the PHP license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available through the world-wide-web at the following url: |
|
||||
| http://www.php.net/license/3_01.txt |
|
||||
| available at through the world-wide-web at |
|
||||
| http://www.php.net/license/2_02.txt. |
|
||||
| If you did not receive a copy of the PHP license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@php.net so we can mail you a copy immediately. |
|
||||
@@ -37,14 +37,8 @@
|
||||
#include <stdarg.h>
|
||||
#endif
|
||||
|
||||
#ifdef ZTS
|
||||
#define VIRTUAL_DIR
|
||||
#endif
|
||||
|
||||
#ifndef TSRM_WIN32
|
||||
#include <unistd.h>
|
||||
#else
|
||||
#include <direct.h>
|
||||
#endif
|
||||
|
||||
#if defined(__osf__) || defined(_AIX)
|
||||
@@ -63,13 +57,9 @@ typedef unsigned short mode_t;
|
||||
#define IS_SLASH_P(c) (*(c) == '/' || \
|
||||
(*(c) == '\\' && !IsDBCSLeadByte(*(c-1))))
|
||||
|
||||
#define DEFAULT_U_SLASH ((UChar)0x5c) /*'\\'*/
|
||||
#define DEFAULT_U_DIR_SEPARATOR ((UChar)0x3b) /*';'*/
|
||||
#define IS_U_SLASH(c) ((UChar32)(c) == (UChar32)0x2f /*'/'*/ || (UChar32)(c) == (UChar32)0x5c /*'\\'*/)
|
||||
#define IS_U_SLASH_P(c) IS_SLASH(*(c))
|
||||
|
||||
/* COPY_WHEN_ABSOLUTE is 2 under Win32 because by chance both regular absolute paths
|
||||
in the file system and UNC paths need copying of two characters */
|
||||
/* COPY_WHEN_ABSOLUTE also takes path as argument because netware needs it
|
||||
* to account for volume name that is unique to NetWare absolute paths
|
||||
*/
|
||||
#define COPY_WHEN_ABSOLUTE(path) 2
|
||||
#define IS_UNC_PATH(path, len) \
|
||||
(len >= 2 && IS_SLASH(path[0]) && IS_SLASH(path[1]))
|
||||
@@ -84,16 +74,10 @@ typedef unsigned short mode_t;
|
||||
#define DEFAULT_SLASH '/'
|
||||
#define DEFAULT_DIR_SEPARATOR ';'
|
||||
#define IS_SLASH(c) ((c) == '/' || (c) == '\\')
|
||||
#define IS_SLASH_P(c) IS_SLASH(*(c))
|
||||
|
||||
#define DEFAULT_U_SLASH ((UChar)0x2f) /*'/'*/
|
||||
#define DEFAULT_U_DIR_SEPARATOR ((UChar)0x3b) /*';'*/
|
||||
#define IS_U_SLASH(c) ((UChar32)(c) == (UChar32)0x2f /*'/'*/ || (UChar32)(c) == (UChar32)0x5c /*'\\'*/)
|
||||
#define IS_U_SLASH_P(c) IS_U_SLASH(*(c))
|
||||
|
||||
/* Colon indicates volume name, either first character should be forward slash or backward slash */
|
||||
#define COPY_WHEN_ABSOLUTE(path) \
|
||||
(strchr(path, ':') - path + 1) /* Take the volume name which ends with a colon */
|
||||
#define IS_ABSOLUTE_PATH(path, len) \
|
||||
((strchr(path, ':') != NULL) || ((len >= 1) && ((path[0] == '/') || (path[0] == '\\'))))
|
||||
(strchr(path, ':') != NULL) /* Colon indicates volume name */
|
||||
|
||||
#else
|
||||
#ifdef HAVE_DIRENT_H
|
||||
@@ -104,18 +88,12 @@ typedef unsigned short mode_t;
|
||||
|
||||
#ifdef __riscos__
|
||||
#define DEFAULT_DIR_SEPARATOR ';'
|
||||
#define DEFAULT_U_DIR_SEPARATOR ((UChar)0x3b) /*';'*/
|
||||
#else
|
||||
#define DEFAULT_DIR_SEPARATOR ':'
|
||||
#define DEFAULT_U_DIR_SEPARATOR ((UChar)0x3a) /*':'*/
|
||||
#endif
|
||||
|
||||
#define IS_SLASH(c) ((c) == '/')
|
||||
#define IS_SLASH_P(c) IS_SLASH(*(c))
|
||||
|
||||
#define DEFAULT_U_SLASH ((UChar)0x2f) /*'/'*/
|
||||
#define IS_U_SLASH(c) ((UChar32)(c) == (UChar32)0x2f /*'/'*/)
|
||||
#define IS_U_SLASH_P(c) IS_U_SLASH(*(c))
|
||||
#define IS_SLASH(c) ((c) == '/')
|
||||
#define IS_SLASH_P(c) (*(c) == '/')
|
||||
|
||||
#endif
|
||||
|
||||
@@ -134,21 +112,13 @@ typedef unsigned short mode_t;
|
||||
#endif
|
||||
|
||||
#ifdef TSRM_WIN32
|
||||
# ifdef CWD_EXPORTS
|
||||
# define CWD_API __declspec(dllexport)
|
||||
# else
|
||||
# define CWD_API __declspec(dllimport)
|
||||
# endif
|
||||
#elif defined(__GNUC__) && __GNUC__ >= 4
|
||||
# define CWD_API __attribute__ ((visibility("default")))
|
||||
# ifdef CWD_EXPORTS
|
||||
# define CWD_API __declspec(dllexport)
|
||||
# else
|
||||
# define CWD_API __declspec(dllimport)
|
||||
# endif
|
||||
#else
|
||||
# define CWD_API
|
||||
#endif
|
||||
|
||||
#ifdef TSRM_WIN32
|
||||
CWD_API int php_sys_stat(const char *path, struct stat *buf);
|
||||
#else
|
||||
# define php_sys_stat stat
|
||||
#define CWD_API
|
||||
#endif
|
||||
|
||||
typedef struct _cwd_state {
|
||||
@@ -171,8 +141,12 @@ CWD_API FILE *virtual_fopen(const char *path, const char *mode TSRMLS_DC);
|
||||
CWD_API int virtual_open(const char *path TSRMLS_DC, int flags, ...);
|
||||
CWD_API int virtual_creat(const char *path, mode_t mode TSRMLS_DC);
|
||||
CWD_API int virtual_rename(char *oldname, char *newname TSRMLS_DC);
|
||||
#if !(defined(NETWARE) && defined(CLIB_STAT_PATCH))
|
||||
CWD_API int virtual_stat(const char *path, struct stat *buf TSRMLS_DC);
|
||||
#if !defined(TSRM_WIN32)
|
||||
#else
|
||||
CWD_API int virtual_stat(const char *path, struct stat_libc *buf TSRMLS_DC);
|
||||
#endif
|
||||
#if !defined(TSRM_WIN32) && !defined(NETWARE)
|
||||
CWD_API int virtual_lstat(const char *path, struct stat *buf TSRMLS_DC);
|
||||
#endif
|
||||
CWD_API int virtual_unlink(const char *path TSRMLS_DC);
|
||||
@@ -180,21 +154,28 @@ CWD_API int virtual_mkdir(const char *pathname, mode_t mode TSRMLS_DC);
|
||||
CWD_API int virtual_rmdir(const char *pathname TSRMLS_DC);
|
||||
CWD_API DIR *virtual_opendir(const char *pathname TSRMLS_DC);
|
||||
CWD_API FILE *virtual_popen(const char *command, const char *type TSRMLS_DC);
|
||||
|
||||
#if !defined(TSRM_WIN32)
|
||||
CWD_API int virtual_access(const char *pathname, int mode TSRMLS_DC);
|
||||
#if defined(TSRM_WIN32)
|
||||
/* these are not defined in win32 headers */
|
||||
#ifndef W_OK
|
||||
#define W_OK 0x02
|
||||
#endif
|
||||
#ifndef R_OK
|
||||
#define R_OK 0x04
|
||||
#endif
|
||||
#ifndef X_OK
|
||||
#define X_OK 0x01
|
||||
#endif
|
||||
#ifndef F_OK
|
||||
#define F_OK 0x00
|
||||
#endif
|
||||
|
||||
/* On AIX & Tru64 when a file does not exist realpath() returns
|
||||
* NULL, and sets errno to ENOENT. Unlike in other libc implementations
|
||||
* the destination is not filled and remains undefined. Therefor, we
|
||||
* must populate it manually using strcpy as done on systems with no
|
||||
* realpath() function.
|
||||
*/
|
||||
#if defined(__osf__) || defined(_AIX)
|
||||
static char *php_realpath_hack(char *src, char *dest)
|
||||
{
|
||||
char *ret;
|
||||
|
||||
if ((ret = realpath(src, dest)) == NULL && errno == ENOENT) {
|
||||
return strcpy(dest, src);
|
||||
} else {
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#if HAVE_UTIME
|
||||
@@ -202,63 +183,21 @@ CWD_API int virtual_utime(const char *filename, struct utimbuf *buf TSRMLS_DC);
|
||||
#endif
|
||||
CWD_API int virtual_chmod(const char *filename, mode_t mode TSRMLS_DC);
|
||||
#if !defined(TSRM_WIN32) && !defined(NETWARE)
|
||||
CWD_API int virtual_chown(const char *filename, uid_t owner, gid_t group, int link TSRMLS_DC);
|
||||
CWD_API int virtual_chown(const char *filename, uid_t owner, gid_t group TSRMLS_DC);
|
||||
#endif
|
||||
|
||||
/* One of the following constants must be used as the last argument
|
||||
in virtual_file_ex() call. */
|
||||
|
||||
#define CWD_EXPAND 0 /* expand "." and ".." but dont resolve symlinks */
|
||||
#define CWD_FILEPATH 1 /* resolve symlinks if file is exist otherwise expand */
|
||||
#define CWD_REALPATH 2 /* call realpath(), resolve symlinks. File must exist */
|
||||
|
||||
CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func verify_path, int use_realpath);
|
||||
|
||||
CWD_API char *tsrm_realpath(const char *path, char *real_path TSRMLS_DC);
|
||||
|
||||
#define REALPATH_CACHE_TTL (2*60) /* 2 minutes */
|
||||
#define REALPATH_CACHE_SIZE 0 /* disabled while php.ini isn't loaded */
|
||||
|
||||
typedef struct _realpath_cache_bucket {
|
||||
unsigned long key;
|
||||
char *path;
|
||||
int path_len;
|
||||
char *realpath;
|
||||
int realpath_len;
|
||||
int is_dir;
|
||||
time_t expires;
|
||||
#ifdef PHP_WIN32
|
||||
unsigned char is_rvalid;
|
||||
unsigned char is_readable;
|
||||
unsigned char is_wvalid;
|
||||
unsigned char is_writable;
|
||||
#endif
|
||||
struct _realpath_cache_bucket *next;
|
||||
} realpath_cache_bucket;
|
||||
|
||||
typedef struct _virtual_cwd_globals {
|
||||
cwd_state cwd;
|
||||
long realpath_cache_size;
|
||||
long realpath_cache_size_limit;
|
||||
long realpath_cache_ttl;
|
||||
realpath_cache_bucket *realpath_cache[1024];
|
||||
} virtual_cwd_globals;
|
||||
|
||||
#ifdef ZTS
|
||||
extern ts_rsrc_id cwd_globals_id;
|
||||
# define CWDG(v) TSRMG(cwd_globals_id, virtual_cwd_globals *, v)
|
||||
#else
|
||||
extern virtual_cwd_globals cwd_globals;
|
||||
# define CWDG(v) (cwd_globals.v)
|
||||
#endif
|
||||
|
||||
CWD_API void realpath_cache_clean(TSRMLS_D);
|
||||
CWD_API void realpath_cache_del(const char *path, int path_len TSRMLS_DC);
|
||||
CWD_API realpath_cache_bucket* realpath_cache_lookup(const char *path, int path_len, time_t t TSRMLS_DC);
|
||||
CWD_API int realpath_cache_size(TSRMLS_D);
|
||||
CWD_API int realpath_cache_max_buckets(TSRMLS_D);
|
||||
CWD_API realpath_cache_bucket** realpath_cache_get_buckets(TSRMLS_D);
|
||||
|
||||
/* The actual macros to be used in programs using TSRM
|
||||
* If the program defines VIRTUAL_DIR it will use the
|
||||
* virtual_* functions
|
||||
@@ -278,8 +217,8 @@ CWD_API realpath_cache_bucket** realpath_cache_get_buckets(TSRMLS_D);
|
||||
#define VCWD_REALPATH(path, real_path) virtual_realpath(path, real_path TSRMLS_CC)
|
||||
#define VCWD_RENAME(oldname, newname) virtual_rename(oldname, newname TSRMLS_CC)
|
||||
#define VCWD_STAT(path, buff) virtual_stat(path, buff TSRMLS_CC)
|
||||
#if !defined(TSRM_WIN32)
|
||||
# define VCWD_LSTAT(path, buff) virtual_lstat(path, buff TSRMLS_CC)
|
||||
#if !defined(TSRM_WIN32) && !defined(NETWARE)
|
||||
#define VCWD_LSTAT(path, buff) virtual_lstat(path, buff TSRMLS_CC)
|
||||
#endif
|
||||
#define VCWD_UNLINK(path) virtual_unlink(path TSRMLS_CC)
|
||||
#define VCWD_MKDIR(pathname, mode) virtual_mkdir(pathname, mode TSRMLS_CC)
|
||||
@@ -292,10 +231,7 @@ CWD_API realpath_cache_bucket** realpath_cache_get_buckets(TSRMLS_D);
|
||||
#endif
|
||||
#define VCWD_CHMOD(path, mode) virtual_chmod(path, mode TSRMLS_CC)
|
||||
#if !defined(TSRM_WIN32) && !defined(NETWARE)
|
||||
#define VCWD_CHOWN(path, owner, group) virtual_chown(path, owner, group, 0 TSRMLS_CC)
|
||||
#if HAVE_LCHOWN
|
||||
#define VCWD_LCHOWN(path, owner, group) virtual_chown(path, owner, group, 1 TSRMLS_CC)
|
||||
#endif
|
||||
#define VCWD_CHOWN(path, owner, group) virtual_chown(path, owner, group TSRMLS_CC)
|
||||
#endif
|
||||
|
||||
#else
|
||||
@@ -305,45 +241,35 @@ CWD_API realpath_cache_bucket** realpath_cache_get_buckets(TSRMLS_D);
|
||||
#define VCWD_OPEN(path, flags) open(path, flags)
|
||||
#define VCWD_OPEN_MODE(path, flags, mode) open(path, flags, mode)
|
||||
#define VCWD_CREAT(path, mode) creat(path, mode)
|
||||
/* rename on windows will fail if newname already exists.
|
||||
MoveFileEx has to be used */
|
||||
#if defined(TSRM_WIN32)
|
||||
# define VCWD_RENAME(oldname, newname) (MoveFileEx(oldname, newname, MOVEFILE_REPLACE_EXISTING|MOVEFILE_COPY_ALLOWED) == 0 ? -1 : 0)
|
||||
#else
|
||||
# define VCWD_RENAME(oldname, newname) rename(oldname, newname)
|
||||
#endif
|
||||
#define VCWD_RENAME(oldname, newname) rename(oldname, newname)
|
||||
#define VCWD_CHDIR(path) chdir(path)
|
||||
#define VCWD_CHDIR_FILE(path) virtual_chdir_file(path, chdir)
|
||||
#define VCWD_GETWD(buf) getwd(buf)
|
||||
#define VCWD_STAT(path, buff) php_sys_stat(path, buff)
|
||||
#define VCWD_STAT(path, buff) stat(path, buff)
|
||||
#define VCWD_LSTAT(path, buff) lstat(path, buff)
|
||||
#define VCWD_UNLINK(path) unlink(path)
|
||||
#define VCWD_MKDIR(pathname, mode) mkdir(pathname, mode)
|
||||
#define VCWD_RMDIR(pathname) rmdir(pathname)
|
||||
#define VCWD_OPENDIR(pathname) opendir(pathname)
|
||||
#define VCWD_POPEN(command, type) popen(command, type)
|
||||
#if defined(TSRM_WIN32)
|
||||
#define VCWD_ACCESS(pathname, mode) tsrm_win32_access(pathname, mode)
|
||||
#else
|
||||
#define VCWD_ACCESS(pathname, mode) access(pathname, mode)
|
||||
#endif
|
||||
|
||||
#define VCWD_REALPATH(path, real_path) tsrm_realpath(path, real_path TSRMLS_CC)
|
||||
#ifdef HAVE_REALPATH
|
||||
#if defined(__osf__) || defined(_AIX)
|
||||
#define VCWD_REALPATH(path, real_path) php_realpath_hack(path, real_path)
|
||||
#else
|
||||
#define VCWD_REALPATH(path, real_path) realpath(path, real_path)
|
||||
#endif
|
||||
#else
|
||||
#define VCWD_REALPATH(path, real_path) strcpy(real_path, path)
|
||||
#endif
|
||||
|
||||
#if HAVE_UTIME
|
||||
# ifdef TSRM_WIN32
|
||||
# define VCWD_UTIME(path, time) win32_utime(path, time)
|
||||
# else
|
||||
# define VCWD_UTIME(path, time) utime(path, time)
|
||||
# endif
|
||||
#define VCWD_UTIME(path, time) utime(path, time)
|
||||
#endif
|
||||
|
||||
#define VCWD_CHMOD(path, mode) chmod(path, mode)
|
||||
#if !defined(TSRM_WIN32) && !defined(NETWARE)
|
||||
#define VCWD_CHOWN(path, owner, group) chown(path, owner, group)
|
||||
#if HAVE_LCHOWN
|
||||
#define VCWD_LCHOWN(path, owner, group) lchown(path, owner, group)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
+29
-376
@@ -1,13 +1,13 @@
|
||||
/*
|
||||
+----------------------------------------------------------------------+
|
||||
| PHP Version 6 |
|
||||
| PHP Version 4 |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1997-2010 The PHP Group |
|
||||
| Copyright (c) 1997-2003 The PHP Group |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 3.01 of the PHP license, |
|
||||
| This source file is subject to version 2.02 of the PHP license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available through the world-wide-web at the following url: |
|
||||
| http://www.php.net/license/3_01.txt |
|
||||
| available at through the world-wide-web at |
|
||||
| http://www.php.net/license/2_02.txt. |
|
||||
| If you did not receive a copy of the PHP license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@php.net so we can mail you a copy immediately. |
|
||||
@@ -23,16 +23,11 @@
|
||||
#include <io.h>
|
||||
#include <process.h>
|
||||
#include <time.h>
|
||||
#include <errno.h>
|
||||
|
||||
#define TSRM_INCLUDE_FULL_WINDOWS_HEADERS
|
||||
#include "SAPI.h"
|
||||
#include "TSRM.h"
|
||||
|
||||
#ifdef TSRM_WIN32
|
||||
#include <Sddl.h>
|
||||
#include "tsrm_win32.h"
|
||||
#include "tsrm_virtual_cwd.h"
|
||||
|
||||
#ifdef ZTS
|
||||
static ts_rsrc_id win32_globals_id;
|
||||
@@ -47,16 +42,6 @@ static void tsrm_win32_ctor(tsrm_win32_globals *globals TSRMLS_DC)
|
||||
globals->process_size = 0;
|
||||
globals->shm_size = 0;
|
||||
globals->comspec = _strdup((GetVersion()<0x80000000)?"cmd.exe":"command.com");
|
||||
|
||||
/* Set it to INVALID_HANDLE_VALUE
|
||||
* It will be initialized correctly in tsrm_win32_access or set to
|
||||
* NULL if no impersonation has been done.
|
||||
* the impersonated token can't be set here as the impersonation
|
||||
* will happen later, in fcgi_accept_request (or whatever is the
|
||||
* SAPI being used).
|
||||
*/
|
||||
globals->impersonation_token = INVALID_HANDLE_VALUE;
|
||||
globals->impersonation_token_sid = NULL;
|
||||
}
|
||||
|
||||
static void tsrm_win32_dtor(tsrm_win32_globals *globals TSRMLS_DC)
|
||||
@@ -78,13 +63,6 @@ static void tsrm_win32_dtor(tsrm_win32_globals *globals TSRMLS_DC)
|
||||
}
|
||||
|
||||
free(globals->comspec);
|
||||
|
||||
if (globals->impersonation_token && globals->impersonation_token != INVALID_HANDLE_VALUE ) {
|
||||
CloseHandle(globals->impersonation_token);
|
||||
}
|
||||
if (globals->impersonation_token_sid) {
|
||||
free(globals->impersonation_token_sid);
|
||||
}
|
||||
}
|
||||
|
||||
TSRM_API void tsrm_win32_startup(void)
|
||||
@@ -103,303 +81,26 @@ TSRM_API void tsrm_win32_shutdown(void)
|
||||
#endif
|
||||
}
|
||||
|
||||
char * tsrm_win32_get_path_sid_key(const char *pathname TSRMLS_DC)
|
||||
{
|
||||
PSID pSid = TWG(impersonation_token_sid);
|
||||
DWORD sid_len = pSid ? GetLengthSid(pSid) : 0;
|
||||
TCHAR *ptcSid = NULL;
|
||||
char *bucket_key = NULL;
|
||||
|
||||
if (!pSid) {
|
||||
bucket_key = (char *)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, strlen(pathname) + 1);
|
||||
if (!bucket_key) {
|
||||
return NULL;
|
||||
}
|
||||
memcpy(bucket_key, pathname, strlen(pathname));
|
||||
return bucket_key;
|
||||
}
|
||||
|
||||
if (!ConvertSidToStringSid(pSid, &ptcSid)) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
bucket_key = (char *)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, strlen(pathname) + strlen(ptcSid) + 1);
|
||||
if (!bucket_key) {
|
||||
LocalFree(ptcSid);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
memcpy(bucket_key, ptcSid, strlen(ptcSid));
|
||||
memcpy(bucket_key + strlen(ptcSid), pathname, strlen(pathname) + 1);
|
||||
|
||||
LocalFree(ptcSid);
|
||||
return bucket_key;
|
||||
}
|
||||
|
||||
|
||||
PSID tsrm_win32_get_token_sid(HANDLE hToken)
|
||||
{
|
||||
BOOL bSuccess = FALSE;
|
||||
DWORD dwLength = 0;
|
||||
PTOKEN_USER pTokenUser = NULL;
|
||||
PSID sid;
|
||||
PSID *ppsid = &sid;
|
||||
DWORD sid_len;
|
||||
PSID pResultSid = NULL;
|
||||
|
||||
/* Get the actual size of the TokenUser structure */
|
||||
if (!GetTokenInformation(
|
||||
hToken, TokenUser, (LPVOID) pTokenUser, 0, &dwLength)) {
|
||||
if (GetLastError() != ERROR_INSUFFICIENT_BUFFER) {
|
||||
goto Finished;
|
||||
}
|
||||
|
||||
pTokenUser = (PTOKEN_USER)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, dwLength);
|
||||
if (pTokenUser == NULL) {
|
||||
goto Finished;
|
||||
}
|
||||
}
|
||||
|
||||
/* and fetch it now */
|
||||
if (!GetTokenInformation(
|
||||
hToken, TokenUser, (LPVOID) pTokenUser, dwLength, &dwLength)) {
|
||||
goto Finished;
|
||||
}
|
||||
|
||||
sid_len = GetLengthSid(pTokenUser->User.Sid);
|
||||
|
||||
/* ConvertSidToStringSid(pTokenUser->User.Sid, &ptcSidOwner); */
|
||||
pResultSid = malloc(sid_len);
|
||||
if (!pResultSid) {
|
||||
goto Finished;
|
||||
}
|
||||
if (!CopySid(sid_len, pResultSid, pTokenUser->User.Sid)) {
|
||||
goto Finished;
|
||||
}
|
||||
HeapFree(GetProcessHeap(), 0, (LPVOID)pTokenUser);
|
||||
return pResultSid;
|
||||
|
||||
Finished:
|
||||
if (pResultSid) {
|
||||
free(pResultSid);
|
||||
}
|
||||
/* Free the buffer for the token groups. */
|
||||
if (pTokenUser != NULL) {
|
||||
HeapFree(GetProcessHeap(), 0, (LPVOID)pTokenUser);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
TSRM_API int tsrm_win32_access(const char *pathname, int mode)
|
||||
{
|
||||
time_t t;
|
||||
HANDLE thread_token;
|
||||
PSID token_sid;
|
||||
SECURITY_INFORMATION sec_info = OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION | DACL_SECURITY_INFORMATION;
|
||||
GENERIC_MAPPING gen_map = { FILE_GENERIC_READ, FILE_GENERIC_WRITE, FILE_GENERIC_EXECUTE, FILE_ALL_ACCESS };
|
||||
DWORD priv_set_length = sizeof(PRIVILEGE_SET);
|
||||
|
||||
PRIVILEGE_SET privilege_set = {0};
|
||||
DWORD sec_desc_length = 0, desired_access = 0, granted_access = 0;
|
||||
BYTE * psec_desc = NULL;
|
||||
BOOL fAccess = FALSE;
|
||||
|
||||
BOOL bucket_key_alloc = FALSE;
|
||||
realpath_cache_bucket * bucket = NULL;
|
||||
char * real_path = NULL;
|
||||
|
||||
TSRMLS_FETCH();
|
||||
|
||||
if (mode == 1 /*X_OK*/) {
|
||||
DWORD type;
|
||||
return GetBinaryType(pathname, &type) ? 0 : -1;
|
||||
} else {
|
||||
if(!IS_ABSOLUTE_PATH(pathname, strlen(pathname)+1)) {
|
||||
real_path = (char *)malloc(MAX_PATH);
|
||||
if(tsrm_realpath(pathname, real_path TSRMLS_CC) == NULL) {
|
||||
goto Finished;
|
||||
}
|
||||
pathname = real_path;
|
||||
}
|
||||
|
||||
if(access(pathname, mode)) {
|
||||
free(real_path);
|
||||
return errno;
|
||||
}
|
||||
|
||||
/* If only existence check is made, return now */
|
||||
if (mode == 0) {
|
||||
free(real_path);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Only in NTS when impersonate==1 (aka FastCGI) */
|
||||
|
||||
/*
|
||||
AccessCheck() requires an impersonation token. We first get a primary
|
||||
token and then create a duplicate impersonation token. The
|
||||
impersonation token is not actually assigned to the thread, but is
|
||||
used in the call to AccessCheck. Thus, this function itself never
|
||||
impersonates, but does use the identity of the thread. If the thread
|
||||
was impersonating already, this function uses that impersonation context.
|
||||
*/
|
||||
if(!OpenThreadToken(GetCurrentThread(), TOKEN_ALL_ACCESS, TRUE, &thread_token)) {
|
||||
DWORD err = GetLastError();
|
||||
if (GetLastError() == ERROR_NO_TOKEN) {
|
||||
if (!OpenProcessToken(GetCurrentProcess(), TOKEN_ALL_ACCESS, &thread_token)) {
|
||||
TWG(impersonation_token) = NULL;
|
||||
goto Finished;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* token_sid will be freed in tsrmwin32_dtor */
|
||||
token_sid = tsrm_win32_get_token_sid(thread_token);
|
||||
if (!token_sid) {
|
||||
if (TWG(impersonation_token_sid)) {
|
||||
free(TWG(impersonation_token_sid));
|
||||
}
|
||||
TWG(impersonation_token_sid) = NULL;
|
||||
goto Finished;
|
||||
}
|
||||
|
||||
/* Different identity, we need a new impersontated token as well */
|
||||
if (!TWG(impersonation_token_sid) || !EqualSid(token_sid, TWG(impersonation_token_sid))) {
|
||||
if (TWG(impersonation_token_sid)) {
|
||||
free(TWG(impersonation_token_sid));
|
||||
}
|
||||
TWG(impersonation_token_sid) = token_sid;
|
||||
|
||||
/* Duplicate the token as impersonated token */
|
||||
if (!DuplicateToken(thread_token, SecurityImpersonation, &TWG(impersonation_token))) {
|
||||
goto Finished;
|
||||
}
|
||||
} else {
|
||||
/* we already have it, free it then */
|
||||
free(token_sid);
|
||||
}
|
||||
|
||||
if (CWDG(realpath_cache_size_limit)) {
|
||||
t = time(0);
|
||||
bucket = realpath_cache_lookup(pathname, strlen(pathname), t TSRMLS_CC);
|
||||
if(bucket == NULL && real_path == NULL) {
|
||||
/* We used the pathname directly. Call tsrm_realpath */
|
||||
/* so that entry is created in realpath cache */
|
||||
real_path = (char *)malloc(MAX_PATH);
|
||||
if(tsrm_realpath(pathname, real_path TSRMLS_CC) != NULL) {
|
||||
pathname = real_path;
|
||||
bucket = realpath_cache_lookup(pathname, strlen(pathname), t TSRMLS_CC);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Do a full access check because access() will only check read-only attribute */
|
||||
if(mode == 0 || mode > 6) {
|
||||
if(bucket != NULL && bucket->is_rvalid) {
|
||||
fAccess = bucket->is_readable;
|
||||
goto Finished;
|
||||
}
|
||||
desired_access = FILE_GENERIC_READ;
|
||||
} else if(mode <= 2) {
|
||||
if(bucket != NULL && bucket->is_wvalid) {
|
||||
fAccess = bucket->is_writable;
|
||||
goto Finished;
|
||||
}
|
||||
desired_access = FILE_GENERIC_WRITE;
|
||||
} else if(mode <= 4) {
|
||||
if(bucket != NULL && bucket->is_rvalid) {
|
||||
fAccess = bucket->is_readable;
|
||||
goto Finished;
|
||||
}
|
||||
desired_access = FILE_GENERIC_READ|FILE_FLAG_BACKUP_SEMANTICS;
|
||||
} else { // if(mode <= 6)
|
||||
if(bucket != NULL && bucket->is_rvalid && bucket->is_wvalid) {
|
||||
fAccess = bucket->is_readable & bucket->is_writable;
|
||||
goto Finished;
|
||||
}
|
||||
desired_access = FILE_GENERIC_READ | FILE_GENERIC_WRITE;
|
||||
}
|
||||
|
||||
if(TWG(impersonation_token) == NULL) {
|
||||
goto Finished;
|
||||
}
|
||||
|
||||
/* Get size of security buffer. Call is expected to fail */
|
||||
if(GetFileSecurity(pathname, sec_info, NULL, 0, &sec_desc_length)) {
|
||||
goto Finished;
|
||||
}
|
||||
|
||||
psec_desc = (BYTE *)malloc(sec_desc_length);
|
||||
if(psec_desc == NULL ||
|
||||
!GetFileSecurity(pathname, sec_info, (PSECURITY_DESCRIPTOR)psec_desc, sec_desc_length, &sec_desc_length)) {
|
||||
goto Finished;
|
||||
}
|
||||
|
||||
MapGenericMask(&desired_access, &gen_map);
|
||||
|
||||
if(!AccessCheck((PSECURITY_DESCRIPTOR)psec_desc, TWG(impersonation_token), desired_access, &gen_map, &privilege_set, &priv_set_length, &granted_access, &fAccess)) {
|
||||
goto Finished_Impersonate;
|
||||
}
|
||||
|
||||
/* Keep the result in realpath_cache */
|
||||
if(bucket != NULL) {
|
||||
if(desired_access == (FILE_GENERIC_READ|FILE_FLAG_BACKUP_SEMANTICS)) {
|
||||
bucket->is_rvalid = 1;
|
||||
bucket->is_readable = fAccess;
|
||||
}
|
||||
else if(desired_access == FILE_GENERIC_WRITE) {
|
||||
bucket->is_wvalid = 1;
|
||||
bucket->is_writable = fAccess;
|
||||
} else if (desired_access == (FILE_GENERIC_READ | FILE_GENERIC_WRITE)) {
|
||||
bucket->is_rvalid = 1;
|
||||
bucket->is_readable = fAccess;
|
||||
bucket->is_wvalid = 1;
|
||||
bucket->is_writable = fAccess;
|
||||
}
|
||||
}
|
||||
|
||||
Finished_Impersonate:
|
||||
if(psec_desc != NULL) {
|
||||
free(psec_desc);
|
||||
psec_desc = NULL;
|
||||
}
|
||||
|
||||
Finished:
|
||||
if(real_path != NULL) {
|
||||
free(real_path);
|
||||
real_path = NULL;
|
||||
}
|
||||
|
||||
if(fAccess == FALSE) {
|
||||
errno = EACCES;
|
||||
return errno;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static process_pair *process_get(FILE *stream TSRMLS_DC)
|
||||
{
|
||||
process_pair *ptr;
|
||||
process_pair *newptr;
|
||||
|
||||
|
||||
for (ptr = TWG(process); ptr < (TWG(process) + TWG(process_size)); ptr++) {
|
||||
if (ptr->stream == stream) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (ptr < (TWG(process) + TWG(process_size))) {
|
||||
return ptr;
|
||||
}
|
||||
|
||||
|
||||
newptr = (process_pair*)realloc((void*)TWG(process), (TWG(process_size)+1)*sizeof(process_pair));
|
||||
if (newptr == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
TWG(process) = newptr;
|
||||
ptr = newptr + TWG(process_size);
|
||||
TWG(process_size)++;
|
||||
@@ -411,7 +112,7 @@ static shm_pair *shm_get(int key, void *addr)
|
||||
shm_pair *ptr;
|
||||
shm_pair *newptr;
|
||||
TSRMLS_FETCH();
|
||||
|
||||
|
||||
for (ptr = TWG(shm); ptr < (TWG(shm) + TWG(shm_size)); ptr++) {
|
||||
if (!ptr->descriptor) {
|
||||
continue;
|
||||
@@ -426,12 +127,12 @@ static shm_pair *shm_get(int key, void *addr)
|
||||
if (ptr < (TWG(shm) + TWG(shm_size))) {
|
||||
return ptr;
|
||||
}
|
||||
|
||||
|
||||
newptr = (shm_pair*)realloc((void*)TWG(shm), (TWG(shm_size)+1)*sizeof(shm_pair));
|
||||
if (newptr == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
TWG(shm) = newptr;
|
||||
ptr = newptr + TWG(shm_size);
|
||||
TWG(shm_size)++;
|
||||
@@ -454,48 +155,23 @@ TSRM_API FILE *popen(const char *command, const char *type)
|
||||
TSRM_API FILE *popen_ex(const char *command, const char *type, const char *cwd, char *env)
|
||||
{
|
||||
FILE *stream = NULL;
|
||||
int fno, type_len = strlen(type), read, mode;
|
||||
int fno, str_len = strlen(type), read, mode;
|
||||
STARTUPINFO startup;
|
||||
PROCESS_INFORMATION process;
|
||||
SECURITY_ATTRIBUTES security;
|
||||
HANDLE in, out;
|
||||
DWORD dwCreateFlags = 0;
|
||||
BOOL res;
|
||||
process_pair *proc;
|
||||
char *cmd;
|
||||
int i;
|
||||
char *ptype = (char *)type;
|
||||
HANDLE thread_token = NULL;
|
||||
HANDLE token_user = NULL;
|
||||
BOOL asuser = TRUE;
|
||||
|
||||
process_pair *proc;
|
||||
TSRMLS_FETCH();
|
||||
|
||||
if (!type) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*The following two checks can be removed once we drop XP support */
|
||||
type_len = strlen(type);
|
||||
if (type_len <1 || type_len > 2) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
for (i=0; i < type_len; i++) {
|
||||
if (!(*ptype == 'r' || *ptype == 'w' || *ptype == 'b' || *ptype == 't')) {
|
||||
return NULL;
|
||||
}
|
||||
ptype++;
|
||||
}
|
||||
|
||||
security.nLength = sizeof(SECURITY_ATTRIBUTES);
|
||||
security.bInheritHandle = TRUE;
|
||||
security.lpSecurityDescriptor = NULL;
|
||||
|
||||
if (!type_len || !CreatePipe(&in, &out, &security, 2048L)) {
|
||||
if (!str_len || !CreatePipe(&in, &out, &security, 2048L)) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
memset(&startup, 0, sizeof(STARTUPINFO));
|
||||
memset(&process, 0, sizeof(PROCESS_INFORMATION));
|
||||
|
||||
@@ -504,7 +180,8 @@ TSRM_API FILE *popen_ex(const char *command, const char *type, const char *cwd,
|
||||
startup.hStdError = GetStdHandle(STD_ERROR_HANDLE);
|
||||
|
||||
read = (type[0] == 'r') ? TRUE : FALSE;
|
||||
mode = ((type_len == 2) && (type[1] == 'b')) ? O_BINARY : O_TEXT;
|
||||
mode = ((str_len == 2) && (type[1] == 'b')) ? O_BINARY : O_TEXT;
|
||||
|
||||
|
||||
if (read) {
|
||||
in = dupHandle(in, FALSE);
|
||||
@@ -516,43 +193,21 @@ TSRM_API FILE *popen_ex(const char *command, const char *type, const char *cwd,
|
||||
startup.hStdOutput = GetStdHandle(STD_OUTPUT_HANDLE);
|
||||
}
|
||||
|
||||
dwCreateFlags = NORMAL_PRIORITY_CLASS;
|
||||
if (strcmp(sapi_module.name, "cli") != 0) {
|
||||
dwCreateFlags |= CREATE_NO_WINDOW;
|
||||
}
|
||||
|
||||
/* Get a token with the impersonated user. */
|
||||
if(OpenThreadToken(GetCurrentThread(), TOKEN_ALL_ACCESS, TRUE, &thread_token)) {
|
||||
DuplicateTokenEx(thread_token, MAXIMUM_ALLOWED, &security, SecurityImpersonation, TokenPrimary, &token_user);
|
||||
} else {
|
||||
DWORD err = GetLastError();
|
||||
if (err == ERROR_NO_TOKEN) {
|
||||
asuser = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
cmd = (char*)malloc(strlen(command)+strlen(TWG(comspec))+sizeof(" /c ")+2);
|
||||
sprintf(cmd, "%s /c \"%s\"", TWG(comspec), command);
|
||||
if (asuser) {
|
||||
res = CreateProcessAsUser(token_user, NULL, cmd, &security, &security, security.bInheritHandle, dwCreateFlags, env, cwd, &startup, &process);
|
||||
CloseHandle(token_user);
|
||||
} else {
|
||||
res = CreateProcess(NULL, cmd, &security, &security, security.bInheritHandle, dwCreateFlags, env, cwd, &startup, &process);
|
||||
}
|
||||
free(cmd);
|
||||
|
||||
if (!res) {
|
||||
cmd = (char*)malloc(strlen(command)+strlen(TWG(comspec))+sizeof(" /c "));
|
||||
sprintf(cmd, "%s /c %s", TWG(comspec), command);
|
||||
if (!CreateProcess(NULL, cmd, &security, &security, security.bInheritHandle, NORMAL_PRIORITY_CLASS, env, cwd, &startup, &process)) {
|
||||
return NULL;
|
||||
}
|
||||
free(cmd);
|
||||
|
||||
CloseHandle(process.hThread);
|
||||
proc = process_get(NULL TSRMLS_CC);
|
||||
|
||||
if (read) {
|
||||
fno = _open_osfhandle((tsrm_intptr_t)in, _O_RDONLY | mode);
|
||||
fno = _open_osfhandle((long)in, _O_RDONLY | mode);
|
||||
CloseHandle(out);
|
||||
} else {
|
||||
fno = _open_osfhandle((tsrm_intptr_t)out, _O_WRONLY | mode);
|
||||
fno = _open_osfhandle((long)out, _O_WRONLY | mode);
|
||||
CloseHandle(in);
|
||||
}
|
||||
|
||||
@@ -573,7 +228,7 @@ TSRM_API int pclose(FILE *stream)
|
||||
}
|
||||
|
||||
fflush(process->stream);
|
||||
fclose(process->stream);
|
||||
fclose(process->stream);
|
||||
|
||||
WaitForSingleObject(process->prochnd, INFINITE);
|
||||
GetExitCodeProcess(process->prochnd, &termstat);
|
||||
@@ -601,6 +256,9 @@ TSRM_API int shmget(int key, int size, int flags)
|
||||
info_handle = OpenFileMapping(FILE_MAP_ALL_ACCESS, FALSE, shm_info);
|
||||
|
||||
if ((!shm_handle && !info_handle)) {
|
||||
if (flags & IPC_EXCL) {
|
||||
return -1;
|
||||
}
|
||||
if (flags & IPC_CREAT) {
|
||||
shm_handle = CreateFileMapping(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, size, shm_segment);
|
||||
info_handle = CreateFileMapping(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, sizeof(shm->descriptor), shm_info);
|
||||
@@ -609,10 +267,6 @@ TSRM_API int shmget(int key, int size, int flags)
|
||||
if ((!shm_handle || !info_handle)) {
|
||||
return -1;
|
||||
}
|
||||
} else {
|
||||
if (flags & IPC_EXCL) {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
shm = shm_get(key, NULL);
|
||||
@@ -714,5 +368,4 @@ TSRM_API char *realpath(char *orig_path, char *buffer)
|
||||
}
|
||||
return buffer;
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
+6
-11
@@ -1,13 +1,13 @@
|
||||
/*
|
||||
+----------------------------------------------------------------------+
|
||||
| PHP Version 6 |
|
||||
| PHP Version 4 |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1997-2010 The PHP Group |
|
||||
| Copyright (c) 1997-2003 The PHP Group |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 3.01 of the PHP license, |
|
||||
| This source file is subject to version 2.02 of the PHP license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available through the world-wide-web at the following url: |
|
||||
| http://www.php.net/license/3_01.txt |
|
||||
| available at through the world-wide-web at |
|
||||
| http://www.php.net/license/2_02.txt. |
|
||||
| If you did not receive a copy of the PHP license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@php.net so we can mail you a copy immediately. |
|
||||
@@ -63,8 +63,6 @@ typedef struct {
|
||||
int process_size;
|
||||
int shm_size;
|
||||
char *comspec;
|
||||
HANDLE impersonation_token;
|
||||
PSID impersonation_token_sid;
|
||||
} tsrm_win32_globals;
|
||||
|
||||
#ifdef ZTS
|
||||
@@ -90,7 +88,6 @@ typedef struct {
|
||||
#define SHM_RND FILE_MAP_WRITE
|
||||
#define SHM_REMAP FILE_MAP_COPY
|
||||
|
||||
char * tsrm_win32_get_path_sid_key(const char *pathname TSRMLS_DC);
|
||||
|
||||
TSRM_API void tsrm_win32_startup(void);
|
||||
TSRM_API void tsrm_win32_shutdown(void);
|
||||
@@ -98,8 +95,6 @@ TSRM_API void tsrm_win32_shutdown(void);
|
||||
TSRM_API FILE *popen_ex(const char *command, const char *type, const char *cwd, char *env);
|
||||
TSRM_API FILE *popen(const char *command, const char *type);
|
||||
TSRM_API int pclose(FILE *stream);
|
||||
TSRM_API int tsrm_win32_access(const char *pathname, int mode);
|
||||
TSRM_API int win32_utime(const char *filename, struct utimbuf *buf);
|
||||
|
||||
TSRM_API int shmget(int key, int size, int flags);
|
||||
TSRM_API void *shmat(int key, const void *shmaddr, int flags);
|
||||
@@ -107,4 +102,4 @@ TSRM_API int shmdt(const void *shmaddr);
|
||||
TSRM_API int shmctl(int key, int cmd, struct shmid_ds *buf);
|
||||
|
||||
TSRM_API char *realpath(char *orig_path, char *buffer);
|
||||
#endif
|
||||
#endif
|
||||
-41998
File diff suppressed because it is too large.
Load diff
@@ -1,56 +0,0 @@
|
||||
--------------------------------------------------------------------
|
||||
The Zend Engine License, Version 2.00
|
||||
Copyright (c) 1999-2006 Zend Technologies Ltd. All rights reserved.
|
||||
--------------------------------------------------------------------
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, is permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above
|
||||
copyright notice, this list of conditions and the following
|
||||
disclaimer in the documentation and/or other materials provided
|
||||
with the distribution.
|
||||
|
||||
3. The names "Zend" and "Zend Engine" must not be used to endorse
|
||||
or promote products derived from this software without prior
|
||||
permission from Zend Technologies Ltd. For written permission,
|
||||
please contact license@zend.com.
|
||||
|
||||
4. Zend Technologies Ltd. may publish revised and/or new versions
|
||||
of the license from time to time. Each version will be given a
|
||||
distinguishing version number.
|
||||
Once covered code has been published under a particular version
|
||||
of the license, you may always continue to use it under the
|
||||
terms of that version. You may also choose to use such covered
|
||||
code under the terms of any subsequent version of the license
|
||||
published by Zend Technologies Ltd. No one other than Zend
|
||||
Technologies Ltd. has the right to modify the terms applicable
|
||||
to covered code created under this License.
|
||||
|
||||
5. Redistributions of any form whatsoever must retain the following
|
||||
acknowledgment:
|
||||
"This product includes the Zend Engine, freely available at
|
||||
http://www.zend.com"
|
||||
|
||||
6. All advertising materials mentioning features or use of this
|
||||
software must display the following acknowledgment:
|
||||
"The Zend Engine is freely available at http://www.zend.com"
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY ZEND TECHNOLOGIES LTD. ``AS IS'' AND
|
||||
ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ZEND
|
||||
TECHNOLOGIES LTD. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
|
||||
USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
||||
OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGE.
|
||||
|
||||
--------------------------------------------------------------------
|
||||
@@ -1,54 +0,0 @@
|
||||
## Process this file with automake to produce Makefile.in -*- makefile -*-
|
||||
|
||||
#CLEANFILES = zend_language_parser.c zend_language_parser.h zend_language_scanner.c zend_language_parser.output zend_ini_parser.c zend_ini_parser.h zend_ini_scanner.c zend_ini_parser.output
|
||||
|
||||
AUTOMAKE_OPTIONS=foreign
|
||||
noinst_LTLIBRARIES=libZend.la
|
||||
|
||||
libZend_la_SOURCES=\
|
||||
zend_language_parser.y zend_language_scanner.l \
|
||||
zend_ini_parser.y zend_ini_scanner.l \
|
||||
zend_alloc.c zend_compile.c zend_constants.c \
|
||||
zend_execute.c zend_execute_API.c zend_highlight.c zend_llist.c \
|
||||
zend_opcode.c zend_operators.c zend_ptr_stack.c zend_stack.c \
|
||||
zend_variables.c zend.c zend_API.c zend_extensions.c zend_hash.c \
|
||||
zend_list.c zend_indent.c zend_builtin_functions.c zend_sprintf.c \
|
||||
zend_ini.c zend_qsort.c zend_objects.c zend_object_handlers.c \
|
||||
zend_objects_API.c zend_ts_hash.c zend_stream.c \
|
||||
zend_default_classes.c \
|
||||
zend_iterators.c zend_interfaces.c zend_exceptions.c \
|
||||
zend_strtod.c zend_strtod.c zend_strtol.c zend_closures.c zend_float.c
|
||||
|
||||
libZend_la_LDFLAGS =
|
||||
libZend_la_LIBADD = @ZEND_EXTRA_LIBS@
|
||||
|
||||
# automake isn't too clever about "non-standard" use of lex and yacc
|
||||
|
||||
$(libZend_la_OBJECTS): zend_language_parser.h
|
||||
|
||||
zend_ini_scanner.lo: zend_ini_parser.h
|
||||
|
||||
# Language parser/scanner rules
|
||||
|
||||
zend_language_scanner.c: $(srcdir)/zend_language_scanner.l
|
||||
$(RE2C) $(RE2C_FLAGS) --case-inverted -cbdFt $(srcdir)/zend_language_scanner_defs.h -o$@ $(srcdir)/zend_language_scanner.l
|
||||
|
||||
zend_language_parser.h: zend_language_parser.c
|
||||
zend_language_parser.c: $(srcdir)/zend_language_parser.y
|
||||
$(YACC) -p zend -v -d $(srcdir)/zend_language_parser.y -o zend_language_parser.c
|
||||
|
||||
# INI parser/scanner rules
|
||||
|
||||
zend_ini_parser.c: $(srcdir)/zend_ini_parser.y
|
||||
$(YACC) -p ini_ -v -d $(srcdir)/zend_ini_parser.y -o zend_ini_parser.c
|
||||
|
||||
zend_ini_scanner.c: $(srcdir)/zend_ini_scanner.l
|
||||
$(RE2C) $(RE2C_FLAGS) --case-inverted -cbdFt $(srcdir)/zend_ini_scanner_defs.h -o$@ $(srcdir)/zend_ini_scanner.l
|
||||
|
||||
zend_ini_parser.h: zend_ini_parser.c
|
||||
|
||||
depend:
|
||||
|
||||
zend_execute.lo: $(srcdir)/zend_execute.c
|
||||
$(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(CPPFLAGS) $(INLINE_CFLAGS) -c $(srcdir)/zend_execute.c
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
Zend/zend_execute.lo: $(srcdir)/zend_vm_execute.h $(srcdir)/zend_vm_opcodes.h
|
||||
@@ -1,195 +0,0 @@
|
||||
Creating an object
|
||||
------------------
|
||||
|
||||
Object can be created in the following ways:
|
||||
|
||||
1. As a result of a function call. E.g.:
|
||||
|
||||
$foo = create_new_foo("parameter");
|
||||
$foo->run();
|
||||
|
||||
The function should create a new zval, create new object and get the
|
||||
handle for it, set handle and handler table as needed. Note that the
|
||||
handle is the only ID of the object, so it should be enough to
|
||||
identify it.
|
||||
|
||||
2. Overriding create_object handler for class. E.g.:
|
||||
|
||||
$foo = new Java("some.Class.here", "parameter");
|
||||
$foo->run();
|
||||
|
||||
The create_object handler function should create a new zval, create
|
||||
new object and get the handle for it, set handle and handler table as
|
||||
needed, and also provide constructor method that would handle
|
||||
constructor call. The get_constructor handler table entry should be
|
||||
used for that. Do not rely class entry's constructor, unless you refer
|
||||
to it from get_constructor handler.
|
||||
|
||||
Object maintenance
|
||||
------------------
|
||||
|
||||
The handlers add_ref and del_ref are called when a new zval referring
|
||||
to the object is created. This does not create a new object - both
|
||||
zvals still refer to the same object.
|
||||
|
||||
clone_obj handler should create a new object, identical to an old one,
|
||||
but being a separate entity.
|
||||
|
||||
delete_obj should destroy an object, all references to it become
|
||||
invalid.
|
||||
|
||||
Object access - read
|
||||
--------------------
|
||||
|
||||
read_property is used to read object's property. This value is not
|
||||
meant to be changed. The handler returns zval * with the value.
|
||||
|
||||
Object access - write
|
||||
---------------------
|
||||
|
||||
write_property is used to directly write object's property by
|
||||
name. This handler is used to assign property variables or to change them
|
||||
in operations like += or ++ (unless get_property_zval_ptr is also set).
|
||||
|
||||
get_property_zval_ptr is used to obtain pointer to modifiable zval for
|
||||
operations like += or ++. This should be used only if your object model
|
||||
stores properties as real zval's that can be modified from outside.
|
||||
Otherwise this handler should be NULL and the engine will use
|
||||
read_property and write_property instead.
|
||||
|
||||
get_property_ptr is used to obtain zval ** for future writing to
|
||||
it. If your object properties are stored as zval*, return real place
|
||||
where the property is stored. If the aren't, the best way is to create
|
||||
proxy object and handle it via get and set methods (see below).
|
||||
This method is meant to be used for send-by-reference and assign-by-reference
|
||||
use of object properties. If you don;t want to implement property
|
||||
referencing for your objects, you can set this handler to NULL.
|
||||
|
||||
get and set handlers are used when engine needs to access the object
|
||||
as a value. E.g., in the following situation:
|
||||
|
||||
$foo =& $obj->bar;
|
||||
$foo = 1;
|
||||
|
||||
if $foo is an object (e.g., proxy object from get_property_ptr) it
|
||||
would be accessed using write handler.
|
||||
|
||||
Object access - method call
|
||||
---------------------------
|
||||
|
||||
get_method handler is used to find method description by name. It
|
||||
should set right type, function name and parameter mask for the
|
||||
method. If the type is ZEND_OVERLOADED_FUNCTION, the method would be
|
||||
called via call_method handler, otherwise it would be called with
|
||||
standard Zend means.
|
||||
|
||||
get_constructor performs the same function as get_method, but for the
|
||||
object constructor.
|
||||
|
||||
call_method handler is used to perform method call. Parameters are
|
||||
passed like to any other Zend internal function.
|
||||
|
||||
Object - comparison
|
||||
-------------------
|
||||
|
||||
Objects can be compared via compare_objects handler. This is used with
|
||||
== operation, === compares objects by handles, i.e., return true if
|
||||
and only if it's really the same object. Note that objects from
|
||||
different object types (i.e., having different handlers) can not be
|
||||
compared.
|
||||
|
||||
Objects - reflection
|
||||
--------------------
|
||||
|
||||
get_class_name is used to retrieve class name of the object.
|
||||
get_class_entry returns class entry (zend_class_entry) for the object,
|
||||
in case there exists PHP class for it.
|
||||
No other reflection functions are currently implemented.
|
||||
|
||||
Objects - data structures and handlers
|
||||
---------------------------------------
|
||||
|
||||
The object is represented by the following structure:
|
||||
|
||||
struct _zend_object_value {
|
||||
zend_object_handle handle;
|
||||
zend_object_handlers *handlers;
|
||||
};
|
||||
|
||||
handle is an ID of the object among the objects of the same type (not
|
||||
class!). The type of the object and how it behaves is determined by
|
||||
the handler table.
|
||||
|
||||
typedef struct _zend_object_handlers {
|
||||
zend_object_add_ref_t add_ref;
|
||||
zend_object_del_ref_t del_ref;
|
||||
zend_object_delete_obj_t delete_obj;
|
||||
zend_object_clone_obj_t clone_obj;
|
||||
zend_object_read_property_t read_property;
|
||||
zend_object_write_property_t write_property;
|
||||
zend_object_get_property_ptr_t get_property_ptr;
|
||||
zend_object_get_property_zval_ptr_t get_property_zval_ptr;
|
||||
zend_object_get_t get;
|
||||
zend_object_set_t set;
|
||||
zend_object_has_property_t has_property;
|
||||
zend_object_unset_property_t unset_property;
|
||||
zend_object_get_properties_t get_properties;
|
||||
zend_object_get_method_t get_method;
|
||||
zend_object_call_method_t call_method;
|
||||
zend_object_get_constructor_t get_constructor;
|
||||
zend_object_get_class_entry_t get_class_entry;
|
||||
zend_object_get_class_name_t get_class_name;
|
||||
zend_object_compare_t compare_objects;
|
||||
} zend_object_handlers;
|
||||
|
||||
See zend_object_handlers.h for prototypes. All objects are passed as zval's.
|
||||
|
||||
Handlers explained:
|
||||
|
||||
add_ref - called when a copy of the object handle is created.
|
||||
|
||||
del_ref - called when a copy of the object handle is destroyed.
|
||||
|
||||
delete_obj - called when an object needs to be destroyed.
|
||||
|
||||
clone_obj - called when a new object identical to an old one should be
|
||||
created (unlike Zend Engine 1, this never happens unless explicitly
|
||||
asked for).
|
||||
|
||||
read_property - returns zval *, containing the value of the
|
||||
property. Is used when value of the property should be retrieved for
|
||||
reading.
|
||||
|
||||
write_property - assigns value to certain property of the object.
|
||||
|
||||
get_property_zval_ptr - retrieves zval** for being directly modified by
|
||||
the engine. If your properties are not zval's, don't define it.
|
||||
|
||||
get_property_ptr - retrieves zval** for the property of the value, to
|
||||
be used for read and write. If object properties are not zval's
|
||||
natively, this method should create and return proxy object for use
|
||||
with get and set methods.
|
||||
|
||||
get - retrieves zval* for object contents. To be used mainly with
|
||||
proxy objects from get_property_ptr, but also may be used for
|
||||
convert_to_* functions.
|
||||
|
||||
set - sets value for object contents. To be used mainly with
|
||||
proxy objects from get_property_ptr.
|
||||
|
||||
has_property - checks if the object has certain property set.
|
||||
|
||||
unset_property - removes value for the property of the object
|
||||
|
||||
get_method - retrieves description of the method
|
||||
|
||||
call_method - calls the method (parameters should be put on stack like
|
||||
for any other PHP internal function).
|
||||
|
||||
get_constructor - get description for the object constructor method
|
||||
|
||||
get_class_entry - should return the class entry for the object
|
||||
|
||||
get_class_name - get the name of the class the object belongs to
|
||||
|
||||
compare_objects - compares if two objects are equal
|
||||
@@ -1,34 +0,0 @@
|
||||
Zend Memory Manager
|
||||
===================
|
||||
|
||||
General:
|
||||
--------
|
||||
|
||||
The goal of the new memory manager (available since PHP 5.2) is to reduce memory
|
||||
allocation overhead and speedup memory management.
|
||||
|
||||
The new manager's "configure" has no "--disable-zend-memory-manager" option,
|
||||
but it has "--enable-malloc-mm" instead. It is enabled by default in DEBUG
|
||||
build and disabled by default in RELEASE build. when enabled it allows selecting
|
||||
between malloc and emalloc at runtime so you can use internal and external memory
|
||||
debuggers without recompilation.
|
||||
|
||||
Debugging:
|
||||
----------
|
||||
|
||||
Normal:
|
||||
|
||||
$ sapi/cli/php -r 'leak();'
|
||||
|
||||
Zend MM disabled:
|
||||
|
||||
$ USE_ZEND_ALLOC=0 valgrind --leak-check=full sapi/cli/php -r 'leak();'
|
||||
|
||||
Tweaking:
|
||||
---------
|
||||
|
||||
The Zend MM can be tweaked using ZEND_MM_MEM_TYPE and ZEND_MM_SEG_SIZE environment
|
||||
variables. Default values are "malloc" and "256K". Dependent on target system you
|
||||
can also use "mmap_anon", "mmap_zero" and "win32" storage managers.
|
||||
|
||||
$ ZEND_MM_MEM_TYPE=mmap_anon ZEND_MM_SEG_SIZE=1M sapi/cli/php ..etc.
|
||||
@@ -1,108 +0,0 @@
|
||||
ZEND_VM
|
||||
=======
|
||||
|
||||
ZEND_VM architecture allows specializing opcode handlers according to op_type
|
||||
fields and using different execution methods (call threading, switch threading
|
||||
and direct threading). As a result ZE2 got more than 20% speedup on raw PHP
|
||||
code execution (with specialized executor and direct threading execution
|
||||
method). As in most PHP applications raw execution speed isn't the limiting
|
||||
factor but system calls and database callls are, your mileage with this patch
|
||||
will vary.
|
||||
|
||||
Most parts of the old zend_execute.c go into zend_vm_def.h. Here you can
|
||||
find opcode handlers and helpers. The typical opcode handler template looks
|
||||
like this:
|
||||
|
||||
ZEND_VM_HANDLER(<OPCODE-NUMBER>, <OPCODE>, <OP1_TYPES>, <OP2_TYPES>)
|
||||
{
|
||||
<HANDLER'S CODE>
|
||||
}
|
||||
|
||||
<OPCODE-NUMBER> is a opcode number (0, 1, ...)
|
||||
<OPCODE> is an opcode name (ZEN_NOP, ZEND_ADD, :)
|
||||
<OP1_TYPES> & <OP2_TYPES> are masks for allowed operand op_types. Specializer
|
||||
will generate code only for defined combination of types. You can use any
|
||||
combination of the following op_types UNUSED, CONST, VAR, TMP and CV also
|
||||
you can use ANY mask to disable specialization according operand's op_type.
|
||||
<HANDLER'S CODE> is a handler's code itself. For most handlers it stills the
|
||||
same as in old zend_execute.c, but now it uses macros to access opcode operands
|
||||
and some internal executor data.
|
||||
|
||||
You can see the conformity of new macros to old code in the following list:
|
||||
|
||||
EXECUTE_DATA
|
||||
execute_data
|
||||
ZEND_VM_DISPATCH_TO_HANDLER(<OP>)
|
||||
return <OP>_helper(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU)
|
||||
ZEND_VM_DISPATCH_TO_HELPER(<NAME>)
|
||||
return <NAME>(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU)
|
||||
ZEND_VM_DISPATCH_TO_HELPER_EX(<NAME>,<PARAM>,<VAL>)
|
||||
return <NAME>(<VAL>, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU)
|
||||
ZEND_VM_CONTINUE()
|
||||
return 0
|
||||
ZEND_VM_NEXT_OPCODE()
|
||||
NEXT_OPCODE()
|
||||
ZEND_VM_SET_OPCODE(<TARGET>
|
||||
SET_OPCODE(<TARGET>
|
||||
ZEND_VM_INC_OPCODE()
|
||||
INC_OPCOD()
|
||||
ZEND_VM_RETURN_FROM_EXECUTE_LOOP()
|
||||
RETURN_FROM_EXECUTE_LOOP()
|
||||
ZEND_VM_C_LABEL(<LABEL>):
|
||||
<LABEL>:
|
||||
ZEND_VM_C_GOTO(<LABEL>)
|
||||
goto <LABEL>
|
||||
OP<X>_TYPE
|
||||
opline->op<X>.op_type
|
||||
GET_OP<X>_ZVAL_PTR(<TYPE>)
|
||||
get_zval_ptr(&opline->op<X>, EX(Ts), &free_op<X>, <TYPE>)
|
||||
GET_OP<X>_ZVAL_PTR_PTR(<TYPE>)
|
||||
get_zval_ptr_ptr(&opline->op<X>, EX(Ts), &free_op<X>, <TYPE>)
|
||||
GET_OP<X>_OBJ_ZVAL_PTR(<TYPE>)
|
||||
get_obj_zval_ptr(&opline->op<X>, EX(Ts), &free_op<X>, <TYPE>)
|
||||
GET_OP<X>_OBJ_ZVAL_PTR_PTR(<TYPE>)
|
||||
get_obj_zval_ptr_ptr(&opline->op<X>, EX(Ts), &free_op<X>, <TYPE>)
|
||||
IS_OP<X>_TMP_FREE()
|
||||
IS_TMP_FREE(free_op<X>)
|
||||
FREE_OP<X>()
|
||||
FREE_OP(free_op<X>)
|
||||
FREE_OP<X>_IF_VAR()
|
||||
FREE_VAR(free_op<X>)
|
||||
FREE_OP<X>_VAR_PTR()
|
||||
FREE_VAR_PTR(free_op<X>)
|
||||
|
||||
|
||||
Executor's helpers can be defined without parameters or with one parameter.
|
||||
This is done with the following constructs:
|
||||
|
||||
ZEND_VM_HELPER(<HELPER-NAME>, <OP1_TYPES>, <OP2_TYPES>)
|
||||
{
|
||||
<HELPER'S CODE>
|
||||
}
|
||||
|
||||
ZEND_VM_HELPER_EX(<HELPER-NAME>, <OP1_TYPES>, <OP2_TYPES>, <PARAM_SPEC>)
|
||||
{
|
||||
<HELPER'S CODE>
|
||||
}
|
||||
|
||||
Executor's code is generated by PHP script zend_vm_gen.php it uses zend_vm_def.h
|
||||
and zend_vm_execute.skl as input and produces zend_vm_opcodes.h and
|
||||
zend_vm_execute.h. The first file is a list of opcode definitions. It is
|
||||
included from zend_compile.h. The second one is an executor code itself. It is
|
||||
included from zend_execute.c.
|
||||
|
||||
zend_vm_gen.php can produce different kind of executors. You can select
|
||||
different opcode threading model using --with-vm-kind=CALL|SWITCH|GOTO. You can
|
||||
disable opcode specialization using --without-specializer. You can include or
|
||||
exclude old executor together with specialized one using --without-old-executor.
|
||||
At last you can debug executor using original zend_vm_def.h or generated file
|
||||
zend_vm_execute.h. Debugging with original file requires --with-lines
|
||||
option. By default ZE2 uses the following command to generate executor:
|
||||
|
||||
$ php zend_vm_gen.php --with-vm-kind=CALL
|
||||
|
||||
Zend Engine II currently includes two executors during the build process, one
|
||||
is the specialized version and the other is the old one non-specialized with
|
||||
function handlers. By default Zend Engine II uses the specialized one but you
|
||||
can switch to the old executor at runtime by calling zend_vm_use_old_executor().
|
||||
|
||||
@@ -1,136 +0,0 @@
|
||||
Revamped object model using object handles
|
||||
===========================================
|
||||
|
||||
Background
|
||||
----------
|
||||
|
||||
In the Zend Engine 1.0 (and its predecessor the PHP 3 scripting
|
||||
engine) the object model's design is that instantiated objects are
|
||||
language values. This means that when programmers are performing
|
||||
operations, such variable assignment and passing parameters to
|
||||
functions, objects are handled very similarly to the way other
|
||||
primitive types are handled such as integers and strings.
|
||||
Semantically this means that the whole object is being copied. The
|
||||
approach Java takes is different where one refers to objects by handle
|
||||
and not by value (one can think of a handle as an objects' ID).
|
||||
|
||||
Need
|
||||
----
|
||||
|
||||
Unfortunately, the approach taken up to now has severely limited the
|
||||
Zend Engine's object oriented model, both feature and simplicity
|
||||
wise. One of the main problems with the former approach is that object
|
||||
instantiation and duplication is very hard to control, a problem which
|
||||
can not only lead to inefficient development but also often to strange
|
||||
run-time behavior. Changing the object model to a handle oriented
|
||||
model will allow the addressing of many needs such as destructors,
|
||||
de-referencing method return values, tight control of object
|
||||
duplication and more.
|
||||
|
||||
Overview
|
||||
--------
|
||||
|
||||
The proposed object model is very much influenced by the Java
|
||||
model. In general, when you create a new object you will be getting a
|
||||
handle to the object instead of the object itself. When this handle is
|
||||
sent to functions, assigned and copied it is only the handle which is
|
||||
copied/sent/assigned. The object itself is never copied nor
|
||||
duplicated. This results in all handles of this object to always point
|
||||
at the same object making it a very consistent solution and saving
|
||||
unnecessary duplication and confusing behavior.
|
||||
|
||||
Functionality
|
||||
-------------
|
||||
|
||||
After this change the basic use of objects will be almost identical to
|
||||
previous versions of the scripting engine. However, you won't bump
|
||||
into awkward and confusing copying & destructing of objects. In order
|
||||
to create and use a new object instance you will do the following:
|
||||
$object = new MyClass(); $object->method();
|
||||
|
||||
The previous code will assign $object the handle of a new instance of
|
||||
the class MyClass and call one of its methods.
|
||||
|
||||
|
||||
Consider the following code:
|
||||
|
||||
1 class MyClass
|
||||
2 {
|
||||
3 function setMember($value)
|
||||
4 {
|
||||
5 $this->member = $value;
|
||||
6 }
|
||||
7
|
||||
8 function getMember()
|
||||
9 {
|
||||
10 return $this->member;
|
||||
11 }
|
||||
12 }
|
||||
13
|
||||
14 function foo($obj)
|
||||
15 {
|
||||
16 $obj->setMember("foo");
|
||||
17 }
|
||||
18
|
||||
19 $object = new MyClass();
|
||||
20 $object->setMember("bar");
|
||||
21 foo($object);
|
||||
22 print $object->getMember();
|
||||
|
||||
Without the new Java-like handles, at line 20 the objects' data member
|
||||
member is set to the string value of "bar". Because of the internal
|
||||
representation of objects in the Zend Engine 1.0, the object is marked
|
||||
as a reference, and when it is sent by value to the function foo, it
|
||||
is duplicated (!). Therefore, the call to foo() on line 21 will
|
||||
result in the $obj->setMember("foo") call being called on a duplicate
|
||||
of $object. Line 22 will then result in "bar" being printed.
|
||||
|
||||
This is how the scripting engine has worked until today. Most
|
||||
developers are probably unaware of the fact that they aren't always
|
||||
talking to the same object but often duplicates; others may have
|
||||
realized this can usually be solved by always passing objects by
|
||||
reference (unless a replica is actually desired, which is uncommon).
|
||||
|
||||
The new object model will allow for a much more intuitive
|
||||
implementation of the code. On line 21, the object's handle (ID) is
|
||||
passed to foo() by value. Inside foo(), the object is fetched
|
||||
according to this handle and, therefore, the setMember() method is
|
||||
called on the originally instantiated object and not a copy. Line 22
|
||||
will therefore result in "foo" being printed. This approach gives
|
||||
developers tighter control of when objects are created and duplicated.
|
||||
An additional not-as-important benefit is that the object handle will
|
||||
be passed to foo() by value, which most probably will also save
|
||||
unnecessary duplication of the value containing the ID itself and thus
|
||||
additionally improving run-time performance.
|
||||
|
||||
This was just a simple description of why the new object model solves
|
||||
awkward behavior and makes object handling much easier, intuitive and
|
||||
efficient. The importance of this change goes far beyond what is
|
||||
mentioned in this section as you will see in further sections which
|
||||
describe new features with a majority of them being based on this
|
||||
change.
|
||||
|
||||
Compatibility Notes
|
||||
--------------------
|
||||
|
||||
Many PHP programmers aren't even aware of the copying quirks of the
|
||||
current object model and, therefore, there is a relatively good chance
|
||||
that the amount of PHP applications that will work out of the box or
|
||||
after a very small amount of modifications would be high.
|
||||
|
||||
To simplify migration, version 2.0 will support an optional
|
||||
'auto-clone' feature, which will perform a cloning of the object
|
||||
whenever it would have been copied in version 1.0. Optionally, it
|
||||
will also be possible to request that the engine will emit an E_NOTICE
|
||||
message whenever such an automatic clone occurs, in order to allow
|
||||
developers to gradually migrate to the version 2.0-style behavior
|
||||
(without automatic clones).
|
||||
|
||||
Dependencies
|
||||
------------
|
||||
|
||||
The new object model is not dependent on other features. Many of the
|
||||
other Zend Engine 2.0 features, such as the $foo->bar()->barbara()
|
||||
syntax, destructors and others completely rely on this new object
|
||||
model.
|
||||
|
||||
@@ -1,169 +0,0 @@
|
||||
Title: Zend 2.0 Namespaces
|
||||
Version: $Revision$
|
||||
Status: declined
|
||||
Maintainer: Stig S. Bakken <ssb@php.net>
|
||||
Created: 2001-09-08
|
||||
Modified: 2001-09-08
|
||||
|
||||
|
||||
1. Background/Need
|
||||
==================
|
||||
|
||||
PHP and Zend 1.0 have come to a point where a lot of reusable code is
|
||||
being written; from simple functions and classes to entire application
|
||||
frameworks. It is becoming increasingly difficult to avoid symbol
|
||||
name collisions with the current scoping methods.
|
||||
|
||||
The symbol scopes available in Zend 1.0 are the global scope, the
|
||||
class scope and the function scope. All scopes but classes may
|
||||
contain variables, only the class and global scopes may contain
|
||||
functions, while only the global scope may contain constants and
|
||||
classes. This means that all of Zend 1.0's scoping methods are
|
||||
inherently limited for solving symbol name collision problems.
|
||||
|
||||
|
||||
2. Overview
|
||||
===========
|
||||
|
||||
Namespaces in Zend 2.0 provide a way to manage the symbol collision
|
||||
problem by making it possible to define multiple symbol tables able to
|
||||
contain all types of symbols. Zend will get the notion of a current
|
||||
namespace, defaulting to the current global one. The current name
|
||||
space may be changed on a file-by-file basis. Symbols in other name
|
||||
spaces than the current one may be referenced using a new namespace
|
||||
operator. It will be possible to "import" symbols from one namespace
|
||||
into another.
|
||||
|
||||
|
||||
3. Functionality
|
||||
================
|
||||
|
||||
3.1. Namespace Syntax
|
||||
=====================
|
||||
|
||||
The namespace operator ":" is used to refer to symbols in other
|
||||
namespaces than the current one:
|
||||
|
||||
Class: Namespace:class
|
||||
Function: Namespace:function
|
||||
Static method: Namespace:class::method
|
||||
Variable: $Namespace:variable
|
||||
Constant: Namespace:CONSTANT
|
||||
Class variable: $Namespace:class::variable
|
||||
|
||||
To refer to symbols in the global namespace, symbols are prefixed with
|
||||
only the namespace operator:
|
||||
|
||||
Class: :class
|
||||
Function: :function
|
||||
Static method: :class::method
|
||||
Variable: $:variable
|
||||
Constant: :CONSTANT
|
||||
Class variable: $:class::variable
|
||||
|
||||
Note: $:variable will effectively be just another syntax for
|
||||
$GLOBALS['variable'].
|
||||
|
||||
A namespace may have a name containing a ":", it is always the last
|
||||
":" character in the symbol qualifier that is the actual namespace
|
||||
operator:
|
||||
|
||||
Class: Name:Space:class
|
||||
Function: Name:Space:function
|
||||
Static method: Name:Space:class::method
|
||||
Variable: $Name:Space:variable
|
||||
Constant: Name:Space:CONSTANT
|
||||
Class variable: $Name:Space:class::variable
|
||||
|
||||
(Here, the ":" between "Name" and "Space" is part of the name, it is
|
||||
the one after "Space" that is the namespace operator.)
|
||||
|
||||
|
||||
3.2. Defining Namespaces
|
||||
========================
|
||||
|
||||
Individual files may define a namespace that will apply to the entire
|
||||
file. If no "namespace" operator occurs in the file, it will be in
|
||||
the global namespace:
|
||||
|
||||
1 namespace HTML;
|
||||
2
|
||||
3 class Form {
|
||||
4 function Form() {
|
||||
5 // constructor
|
||||
6 }
|
||||
7 // ...
|
||||
8 }
|
||||
|
||||
Or with the "nested" name syntax:
|
||||
|
||||
1 namespace HTML:Form;
|
||||
2
|
||||
3 class Image {
|
||||
4 var $src;
|
||||
5 function Image($src) {
|
||||
6 $this->src = $src;
|
||||
7 }
|
||||
8 // ...
|
||||
9 }
|
||||
|
||||
Code executed within the "HTML" namespace may refer to the Form class
|
||||
as just "Form". Code executed from within other namespaces has to
|
||||
refer to it as "HTML:Form". The "namespace" statement must occur
|
||||
before any other statements in the file.
|
||||
|
||||
# [ssb 2001-09-08]:
|
||||
# Should it be possible to "add" symbols to a namespace by including a
|
||||
# second file with the same namespace statement?
|
||||
|
||||
|
||||
3.3. Importing Symbols
|
||||
======================
|
||||
|
||||
It is possible to import symbols from another namespace into the
|
||||
current one with the "import" statement:
|
||||
|
||||
import * from HTML; // all symbols
|
||||
|
||||
import Form from HTML; // single symbols
|
||||
|
||||
import Form,Table from HTML; // multiple symbols
|
||||
|
||||
There is a potential for name clashes between symols of different
|
||||
types that have the same qualifier syntax. These are resolved in this
|
||||
order: class, function, constant.
|
||||
|
||||
Optionally, the symbol type may be explicitly given to import (as
|
||||
"class", "function", "variable" or "constant"):
|
||||
|
||||
import class Form from HTML;
|
||||
|
||||
And finally, you may import all symbols of a given type:
|
||||
|
||||
import constant * from HTML:Table;
|
||||
|
||||
The namespace with its symbols must already be defined before using
|
||||
"import".
|
||||
|
||||
|
||||
4. Compatibility Notes
|
||||
======================
|
||||
|
||||
Old code that does not take advantage of namespaces will run without
|
||||
modifications.
|
||||
|
||||
|
||||
5. Dependencies
|
||||
===============
|
||||
|
||||
The class variable syntax depends on this class variables being
|
||||
implemented in the new ZE2 object model.
|
||||
|
||||
|
||||
6. Acknowledgements
|
||||
===================
|
||||
|
||||
Andi Gutmans <andi@zend.com> and Zeev Suraski <zeev@zend.com> for
|
||||
initial ZE2 namespaces proposal
|
||||
|
||||
Dean Hall <php@apt7.com> for the initial symbol qualification syntax
|
||||
@@ -1,72 +0,0 @@
|
||||
Title: Loose type requirements for functions
|
||||
Version: $Revision$
|
||||
Status: draft
|
||||
Maintainer: Brian Moon <brianm@dealnews.com>
|
||||
Created: 2001-09-17
|
||||
Modified: 2001-09-17
|
||||
|
||||
|
||||
1. Background/Need
|
||||
==================
|
||||
|
||||
Many internal function of PHP will reject parameters because of their
|
||||
type (the array and variable function come to mind). For userland
|
||||
this is not an easy task as there is no uniform way to do it. An
|
||||
addition to the engine for requiring loose types would allow
|
||||
delevopers to know that the data passed to their functions is of the
|
||||
correct type and reduce the need for duplicating the same code in
|
||||
every function to check for the type of data.
|
||||
|
||||
|
||||
2. Overview
|
||||
===========
|
||||
|
||||
Loose typing mostly means evaluating the contents of the variable and
|
||||
not the type of the variable itself. The requirements for this would
|
||||
and should work much like several of the is_* functions do now.
|
||||
|
||||
The typing of parameters would be optional and those not typed would
|
||||
simply continue to be treated as they are now.
|
||||
|
||||
3. Functionality
|
||||
================
|
||||
|
||||
3.1. Allowed Types
|
||||
==================
|
||||
|
||||
Only loose types should be needed to ensure the data is usable by the
|
||||
function. Duplicating the functionallity of is_scalar, is_resource,
|
||||
is_array and is_object should give developers all the information they
|
||||
need to use a variable correctly.
|
||||
|
||||
3.2. Syntax
|
||||
===========
|
||||
|
||||
The current function syntax should be expanded to allow typing of
|
||||
variables inline in a C style.
|
||||
|
||||
function foo ($var){
|
||||
}
|
||||
|
||||
could be changed to require an array such as:
|
||||
|
||||
function foo (array $var){
|
||||
}
|
||||
|
||||
3.3. Errors
|
||||
===========
|
||||
|
||||
Mis-matches in type should be reported as fatal errors and should halt
|
||||
the execution of a script as that function can not be run and code
|
||||
following could not reliably run.
|
||||
|
||||
|
||||
4. Compatibility Notes
|
||||
======================
|
||||
|
||||
Old code that does not take advantage of this will run without
|
||||
modifications.
|
||||
|
||||
|
||||
|
||||
|
||||
-1166
File diff suppressed because it is too large.
Load diff
-602
@@ -1,602 +0,0 @@
|
||||
# Microsoft Developer Studio Project File - Name="Zend" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Static Library" 0x0104
|
||||
|
||||
CFG=Zend - Win32 Release_inline
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "Zend.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "Zend.mak" CFG="Zend - Win32 Release_inline"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "Zend - Win32 Release" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "Zend - Win32 Debug" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "Zend - Win32 Release_inline" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "Zend - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDebug" /D "_MBCS" /D "_LIB" /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDebug" /D "_LIB" /D "Zend_EXPORTS" /D ZEND_DEBUG=0 /D "LIBZEND_EXPORTS" /D "TSRM_EXPORTS" /D "WIN32" /D "_MBCS" /D "ZEND_WIN32" /FR /FD /c
|
||||
# SUBTRACT CPP /YX
|
||||
# ADD BASE RSC /l 0x40d /d "NDebug"
|
||||
# ADD RSC /l 0x40d /d "NDebug"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
|
||||
!ELSEIF "$(CFG)" == "Zend - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_Debug" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "." /D "_Debug" /D "_LIB" /D "LIBZEND_EXPORTS" /D "TSRM_EXPORTS" /D ZEND_DEBUG=1 /D "ZEND_WIN32" /D "WIN32" /D "_MBCS" /FR /YX /FD /GZ /c
|
||||
# ADD BASE RSC /l 0x40d /d "_Debug"
|
||||
# ADD RSC /l 0x40d /d "_Debug"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
|
||||
!ELSEIF "$(CFG)" == "Zend - Win32 Release_inline"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Output_Dir "Zend___Win32_Release_inline"
|
||||
# PROP BASE Intermediate_Dir "Zend___Win32_Release_inline"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Output_Dir "Release_inline"
|
||||
# PROP Intermediate_Dir "Release_inline"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDebug" /D "_LIB" /D "Zend_EXPORTS" /D ZEND_DEBUG=0 /D "LIBZEND_EXPORTS" /D "TSRM_EXPORTS" /D "WIN32" /D "_MBCS" /FR /FD /c
|
||||
# SUBTRACT BASE CPP /YX
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDebug" /D "_LIB" /D "Zend_EXPORTS" /D "LIBZEND_EXPORTS" /D "TSRM_EXPORTS" /D ZEND_DEBUG=0 /D "ZEND_WIN32_FORCE_INLINE" /D "WIN32" /D "_MBCS" /D "ZEND_WIN32" /FR /FD /c
|
||||
# SUBTRACT CPP /YX
|
||||
# ADD BASE RSC /l 0x40d /d "NDebug"
|
||||
# ADD RSC /l 0x40d /d "NDebug"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "Zend - Win32 Release"
|
||||
# Name "Zend - Win32 Debug"
|
||||
# Name "Zend - Win32 Release_inline"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_alloc.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_API.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_builtin_functions.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_closures.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_compile.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_constants.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_default_classes.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_execute.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_execute_API.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_extensions.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_float.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_hash.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_highlight.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_indent.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_ini.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_ini_parser.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_ini_scanner.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_interfaces.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\zend_language_parser.c"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\zend_language_scanner.c"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_list.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_llist.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_object_handlers.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_objects.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_objects_API.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_opcode.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_operators.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_ptr_stack.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_qsort.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_reflection_api.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_sprintf.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_stack.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_stream.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_strtod.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_ts_hash.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_variables.c
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\FlexLexer.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_alloc.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_API.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_builtin_functions.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_compile.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_config.w32.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_constants.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_default_classes.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_errors.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_execute.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_execute_locks.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_extensions.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_fast_cache.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_globals.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_globals_macros.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_hash.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_highlight.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_indent.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_ini.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_ini_parser.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_ini_scanner.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_interfaces.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_istdiostream.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\zend_language_parser.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\zend_language_scanner.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_list.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_llist.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_modules.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_object_handlers.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_objects.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_objects_API.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_operators.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_ptr_stack.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_qsort.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_reflection_api.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_stack.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_stream.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_strtod.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_ts_hash.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_variables.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Parsers"
|
||||
|
||||
# PROP Default_Filter "y"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_ini_parser.y
|
||||
|
||||
!IF "$(CFG)" == "Zend - Win32 Release"
|
||||
|
||||
!ELSEIF "$(CFG)" == "Zend - Win32 Debug"
|
||||
|
||||
# Begin Custom Build
|
||||
InputDir=.
|
||||
InputPath=.\zend_ini_parser.y
|
||||
|
||||
BuildCmds= \
|
||||
bison --output=zend_ini_parser.c -v -d -p ini_ zend_ini_parser.y
|
||||
|
||||
"$(InputDir)\zend_ini_parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
|
||||
"$(InputDir)\zend_ini_parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
# End Custom Build
|
||||
|
||||
!ELSEIF "$(CFG)" == "Zend - Win32 Release_inline"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\zend_language_parser.y"
|
||||
|
||||
!IF "$(CFG)" == "Zend - Win32 Release"
|
||||
|
||||
# Begin Custom Build
|
||||
InputDir=.
|
||||
InputPath=".\zend_language_parser.y"
|
||||
|
||||
BuildCmds= \
|
||||
bison --output=zend_language_parser.c -v -d -p zend zend_language_parser.y
|
||||
|
||||
"$(InputDir)\zend_language_parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
|
||||
"$(InputDir)\zend_language_parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
# End Custom Build
|
||||
|
||||
!ELSEIF "$(CFG)" == "Zend - Win32 Debug"
|
||||
|
||||
# Begin Custom Build
|
||||
InputDir=.
|
||||
InputPath=".\zend_language_parser.y"
|
||||
|
||||
BuildCmds= \
|
||||
bison --output=zend_language_parser.c -v -d -p zend zend_language_parser.y
|
||||
|
||||
"$(InputDir)\zend_language_parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
|
||||
"$(InputDir)\zend_language_parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
# End Custom Build
|
||||
|
||||
!ELSEIF "$(CFG)" == "Zend - Win32 Release_inline"
|
||||
|
||||
# Begin Custom Build
|
||||
InputDir=.
|
||||
InputPath=".\zend_language_parser.y"
|
||||
|
||||
BuildCmds= \
|
||||
bison --output=zend_language_parser.c -v -d -p zend zend_language_parser.y
|
||||
|
||||
"$(InputDir)\zend_language_parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
|
||||
"$(InputDir)\zend_language_parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
# End Custom Build
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Scanners"
|
||||
|
||||
# PROP Default_Filter "l"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\flex.skl
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_ini_scanner.l
|
||||
|
||||
!IF "$(CFG)" == "Zend - Win32 Release"
|
||||
|
||||
!ELSEIF "$(CFG)" == "Zend - Win32 Debug"
|
||||
|
||||
# Begin Custom Build
|
||||
InputPath=.\zend_ini_scanner.l
|
||||
|
||||
"zend_ini_scanner.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
flex -B -i -Sflex.skl -Pini_ -ozend_ini_scanner.c zend_ini_scanner.l
|
||||
|
||||
# End Custom Build
|
||||
|
||||
!ELSEIF "$(CFG)" == "Zend - Win32 Release_inline"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\zend_language_scanner.l"
|
||||
|
||||
!IF "$(CFG)" == "Zend - Win32 Release"
|
||||
|
||||
# Begin Custom Build
|
||||
InputPath=".\zend_language_scanner.l"
|
||||
|
||||
"zend_language_scanner.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
flex -i -Pzend -ozend_language_scanner.c zend_language_scanner.l
|
||||
|
||||
# End Custom Build
|
||||
|
||||
!ELSEIF "$(CFG)" == "Zend - Win32 Debug"
|
||||
|
||||
# Begin Custom Build
|
||||
InputPath=".\zend_language_scanner.l"
|
||||
|
||||
"zend_language_scanner.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
flex -i -Pzend -ozend_language_scanner.c zend_language_scanner.l
|
||||
|
||||
# End Custom Build
|
||||
|
||||
!ELSEIF "$(CFG)" == "Zend - Win32 Release_inline"
|
||||
|
||||
# Begin Custom Build
|
||||
InputPath=".\zend_language_scanner.l"
|
||||
|
||||
"zend_language_scanner.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
flex -i -Pzend -ozend_language_scanner.c zend_language_scanner.l
|
||||
|
||||
# End Custom Build
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Text Files"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ZEND_BUGS
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ZEND_CHANGES
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ZEND_TODO
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Resources"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend.ico
|
||||
# End Source File
|
||||
# End Group
|
||||
# End Target
|
||||
# End Project
|
||||
-419
@@ -1,419 +0,0 @@
|
||||
dnl
|
||||
dnl $Id$
|
||||
dnl
|
||||
dnl This file contains Zend specific autoconf functions.
|
||||
dnl
|
||||
|
||||
AC_DEFUN([LIBZEND_CHECK_INT_TYPE],[
|
||||
AC_MSG_CHECKING(for $1)
|
||||
AC_TRY_COMPILE([
|
||||
#if HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#if HAVE_INTTYPES_H
|
||||
#include <inttypes.h>
|
||||
#elif HAVE_STDINT_H
|
||||
#include <stdint.h>
|
||||
#endif],
|
||||
[if (($1 *) 0)
|
||||
return 0;
|
||||
if (sizeof ($1))
|
||||
return 0;
|
||||
],[
|
||||
AC_DEFINE_UNQUOTED([HAVE_]translit($1,a-z_-,A-Z__), 1,[Define if $1 type is present. ])
|
||||
AC_MSG_RESULT(yes)
|
||||
], AC_MSG_RESULT(no)
|
||||
)dnl
|
||||
])
|
||||
|
||||
AC_DEFUN([LIBZEND_BASIC_CHECKS],[
|
||||
|
||||
AC_REQUIRE([AC_PROG_YACC])
|
||||
AC_REQUIRE([AC_PROG_CC])
|
||||
AC_REQUIRE([AC_PROG_CC_C_O])
|
||||
AC_REQUIRE([AC_HEADER_STDC])
|
||||
|
||||
LIBZEND_BISON_CHECK
|
||||
|
||||
dnl Ugly hack to get around a problem with gcc on AIX.
|
||||
if test "$CC" = "gcc" -a "$ac_cv_prog_cc_g" = "yes" -a \
|
||||
"`uname -sv`" = "AIX 4"; then
|
||||
CFLAGS=`echo $CFLAGS | sed -e 's/-g//'`
|
||||
fi
|
||||
|
||||
dnl Hack to work around a Mac OS X cpp problem
|
||||
dnl Known versions needing this workaround are 5.3 and 5.4
|
||||
if test "$ac_cv_prog_gcc" = "yes" -a "`uname -s`" = "Rhapsody"; then
|
||||
CPPFLAGS="$CPPFLAGS -traditional-cpp"
|
||||
fi
|
||||
|
||||
AC_CHECK_HEADERS(
|
||||
inttypes.h \
|
||||
stdint.h \
|
||||
limits.h \
|
||||
malloc.h \
|
||||
string.h \
|
||||
unistd.h \
|
||||
stdarg.h \
|
||||
sys/types.h \
|
||||
sys/time.h \
|
||||
signal.h \
|
||||
unix.h \
|
||||
stdlib.h \
|
||||
dlfcn.h)
|
||||
|
||||
AC_TYPE_SIZE_T
|
||||
AC_TYPE_SIGNAL
|
||||
|
||||
AC_DEFUN([LIBZEND_LIBDL_CHECKS],[
|
||||
AC_CHECK_LIB(dl, dlopen, [LIBS="-ldl $LIBS"])
|
||||
AC_CHECK_FUNC(dlopen,[AC_DEFINE(HAVE_LIBDL, 1,[ ])])
|
||||
])
|
||||
|
||||
AC_DEFUN([LIBZEND_DLSYM_CHECK],[
|
||||
dnl
|
||||
dnl Ugly hack to check if dlsym() requires a leading underscore in symbol name.
|
||||
dnl
|
||||
AC_MSG_CHECKING([whether dlsym() requires a leading underscore in symbol names])
|
||||
_LT_AC_TRY_DLOPEN_SELF([
|
||||
AC_MSG_RESULT(no)
|
||||
], [
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(DLSYM_NEEDS_UNDERSCORE, 1, [Define if dlsym() requires a leading underscore in symbol names. ])
|
||||
], [
|
||||
AC_MSG_RESULT(no)
|
||||
], [])
|
||||
])
|
||||
|
||||
dnl This is required for QNX and may be some BSD derived systems
|
||||
AC_CHECK_TYPE( uint, unsigned int )
|
||||
AC_CHECK_TYPE( ulong, unsigned long )
|
||||
|
||||
dnl Check if int32_t and uint32_t are defined
|
||||
LIBZEND_CHECK_INT_TYPE(int32_t)
|
||||
LIBZEND_CHECK_INT_TYPE(uint32_t)
|
||||
|
||||
dnl Checks for library functions.
|
||||
AC_FUNC_VPRINTF
|
||||
AC_FUNC_MEMCMP
|
||||
AC_FUNC_ALLOCA
|
||||
AC_CHECK_FUNCS(memcpy strdup getpid kill strtod strtol finite fpclass sigsetjmp)
|
||||
AC_ZEND_BROKEN_SPRINTF
|
||||
|
||||
AC_CHECK_FUNCS(finite isfinite isinf isnan)
|
||||
|
||||
ZEND_FP_EXCEPT
|
||||
|
||||
ZEND_CHECK_FLOAT_PRECISION
|
||||
|
||||
dnl test whether double cast to long preserves least significant bits
|
||||
AC_MSG_CHECKING(whether double cast to long preserves least significant bits)
|
||||
|
||||
AC_TRY_RUN([
|
||||
#include <limits.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
if (sizeof(long) == 4) {
|
||||
double d = (double) LONG_MIN * LONG_MIN + 2e9;
|
||||
|
||||
if ((long) d == 2e9 && (long) -d == -2e9) {
|
||||
exit(0);
|
||||
}
|
||||
} else if (sizeof(long) == 8) {
|
||||
double correct = 18e18 - ((double) LONG_MIN * -2); /* Subtract ULONG_MAX + 1 */
|
||||
|
||||
if ((long) 18e18 == correct) { /* On 64-bit, only check between LONG_MAX and ULONG_MAX */
|
||||
exit(0);
|
||||
}
|
||||
}
|
||||
exit(1);
|
||||
}
|
||||
], [
|
||||
AC_DEFINE([ZEND_DVAL_TO_LVAL_CAST_OK], 1, [Define if double cast to long preserves least significant bits])
|
||||
AC_MSG_RESULT(yes)
|
||||
], [
|
||||
AC_MSG_RESULT(no)
|
||||
], [
|
||||
AC_MSG_RESULT(no)
|
||||
])
|
||||
|
||||
])
|
||||
|
||||
AC_DEFUN([LIBZEND_ENABLE_DEBUG],[
|
||||
|
||||
AC_ARG_ENABLE(debug,
|
||||
[ --enable-debug Compile with debugging symbols],[
|
||||
ZEND_DEBUG=$enableval
|
||||
],[
|
||||
ZEND_DEBUG=no
|
||||
])
|
||||
|
||||
])
|
||||
|
||||
AC_DEFUN([LIBZEND_OTHER_CHECKS],[
|
||||
|
||||
AC_ARG_WITH(zend-vm,
|
||||
[ --with-zend-vm=TYPE Set virtual machine dispatch method. Type is
|
||||
one of "CALL", "SWITCH" or "GOTO" [TYPE=CALL]],[
|
||||
PHP_ZEND_VM=$withval
|
||||
],[
|
||||
PHP_ZEND_VM=CALL
|
||||
])
|
||||
|
||||
AC_ARG_ENABLE(maintainer-zts,
|
||||
[ --enable-maintainer-zts Enable thread safety - for code maintainers only!!],[
|
||||
ZEND_MAINTAINER_ZTS=$enableval
|
||||
],[
|
||||
ZEND_MAINTAINER_ZTS=no
|
||||
])
|
||||
|
||||
AC_ARG_ENABLE(inline-optimization,
|
||||
[ --disable-inline-optimization
|
||||
If building zend_execute.lo fails, try this switch],[
|
||||
ZEND_INLINE_OPTIMIZATION=$enableval
|
||||
],[
|
||||
ZEND_INLINE_OPTIMIZATION=yes
|
||||
])
|
||||
|
||||
AC_MSG_CHECKING([virtual machine dispatch method])
|
||||
AC_MSG_RESULT($PHP_ZEND_VM)
|
||||
|
||||
AC_MSG_CHECKING(whether to enable thread-safety)
|
||||
AC_MSG_RESULT($ZEND_MAINTAINER_ZTS)
|
||||
|
||||
AC_MSG_CHECKING(whether to enable inline optimization for GCC)
|
||||
AC_MSG_RESULT($ZEND_INLINE_OPTIMIZATION)
|
||||
|
||||
AC_MSG_CHECKING(whether to enable Zend debugging)
|
||||
AC_MSG_RESULT($ZEND_DEBUG)
|
||||
|
||||
case $PHP_ZEND_VM in
|
||||
SWITCH)
|
||||
AC_DEFINE(ZEND_VM_KIND,ZEND_VM_KIND_SWITCH,[virtual machine dispatch method])
|
||||
;;
|
||||
GOTO)
|
||||
AC_DEFINE(ZEND_VM_KIND,ZEND_VM_KIND_GOTO,[virtual machine dispatch method])
|
||||
;;
|
||||
*)
|
||||
PHP_ZEND_VM=CALL
|
||||
AC_DEFINE(ZEND_VM_KIND,ZEND_VM_KIND_CALL,[virtual machine dispatch method])
|
||||
;;
|
||||
esac
|
||||
|
||||
if test "$ZEND_DEBUG" = "yes"; then
|
||||
AC_DEFINE(ZEND_DEBUG,1,[ ])
|
||||
echo " $CFLAGS" | grep ' -g' >/dev/null || DEBUG_CFLAGS="-g"
|
||||
if test "$CFLAGS" = "-g -O2"; then
|
||||
CFLAGS=-g
|
||||
fi
|
||||
changequote({,})
|
||||
if test -n "$GCC"; then
|
||||
|
||||
DEBUG_CFLAGS="$DEBUG_CFLAGS -Wall"
|
||||
|
||||
"$CC" --help=warnings|grep -q -- '-Wpointer-arith[ \t]' && \
|
||||
DEBUG_CFLAGS="$DEBUG_CFLAGS -Wpointer-arith"
|
||||
"$CC" --help=warnings|grep -q -- '-Wdeclaration-after-statement[ \t]' && \
|
||||
DEBUG_CFLAGS="$DEBUG_CFLAGS -Wdeclaration-after-statement"
|
||||
|
||||
test "$USE_MAINTAINER_MODE" = "yes" && \
|
||||
DEBUG_CFLAGS="$DEBUG_CFLAGS -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations"
|
||||
fi
|
||||
changequote([,])
|
||||
else
|
||||
AC_DEFINE(ZEND_DEBUG,0,[ ])
|
||||
fi
|
||||
|
||||
test -n "$DEBUG_CFLAGS" && CFLAGS="$CFLAGS $DEBUG_CFLAGS"
|
||||
|
||||
if test "$ZEND_MAINTAINER_ZTS" = "yes"; then
|
||||
AC_DEFINE(ZTS,1,[ ])
|
||||
CFLAGS="$CFLAGS -DZTS"
|
||||
LIBZEND_CPLUSPLUS_CHECKS
|
||||
fi
|
||||
|
||||
changequote({,})
|
||||
if test -n "$GCC" && test "$ZEND_INLINE_OPTIMIZATION" != "yes"; then
|
||||
INLINE_CFLAGS=`echo $ac_n "$CFLAGS $ac_c" | sed s/-O[0-9s]*//`
|
||||
else
|
||||
INLINE_CFLAGS="$CFLAGS"
|
||||
fi
|
||||
changequote([,])
|
||||
|
||||
AC_C_INLINE
|
||||
|
||||
AC_SUBST(INLINE_CFLAGS)
|
||||
|
||||
AC_MSG_CHECKING(target system is Darwin)
|
||||
if echo "$target" | grep "darwin" > /dev/null; then
|
||||
AC_DEFINE([DARWIN], 1, [Define if the target system is darwin])
|
||||
AC_MSG_RESULT(yes)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
|
||||
dnl test and set the alignment define for ZEND_MM
|
||||
dnl this also does the logarithmic test for ZEND_MM.
|
||||
AC_MSG_CHECKING(for MM alignment and log values)
|
||||
|
||||
AC_TRY_RUN([
|
||||
#include <stdio.h>
|
||||
|
||||
typedef union _mm_align_test {
|
||||
void *ptr;
|
||||
double dbl;
|
||||
long lng;
|
||||
} mm_align_test;
|
||||
|
||||
#if (defined (__GNUC__) && __GNUC__ >= 2)
|
||||
#define ZEND_MM_ALIGNMENT (__alignof__ (mm_align_test))
|
||||
#else
|
||||
#define ZEND_MM_ALIGNMENT (sizeof(mm_align_test))
|
||||
#endif
|
||||
|
||||
int main()
|
||||
{
|
||||
int i = ZEND_MM_ALIGNMENT;
|
||||
int zeros = 0;
|
||||
FILE *fp;
|
||||
|
||||
while (i & ~0x1) {
|
||||
zeros++;
|
||||
i = i >> 1;
|
||||
}
|
||||
|
||||
fp = fopen("conftest.zend", "w");
|
||||
fprintf(fp, "%d %d\n", ZEND_MM_ALIGNMENT, zeros);
|
||||
fclose(fp);
|
||||
|
||||
exit(0);
|
||||
}
|
||||
], [
|
||||
LIBZEND_MM_ALIGN=`cat conftest.zend | cut -d ' ' -f 1`
|
||||
LIBZEND_MM_ALIGN_LOG2=`cat conftest.zend | cut -d ' ' -f 2`
|
||||
AC_DEFINE_UNQUOTED(ZEND_MM_ALIGNMENT, $LIBZEND_MM_ALIGN, [ ])
|
||||
AC_DEFINE_UNQUOTED(ZEND_MM_ALIGNMENT_LOG2, $LIBZEND_MM_ALIGN_LOG2, [ ])
|
||||
], [], [
|
||||
dnl cross-compile needs something here
|
||||
LIBZEND_MM_ALIGN=8
|
||||
])
|
||||
|
||||
AC_MSG_RESULT(done)
|
||||
|
||||
dnl test for memory allocation using mmap(MAP_ANON)
|
||||
AC_MSG_CHECKING(for memory allocation using mmap(MAP_ANON))
|
||||
|
||||
AC_TRY_RUN([
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/mman.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#ifndef MAP_ANON
|
||||
# ifdef MAP_ANONYMOUS
|
||||
# define MAP_ANON MAP_ANONYMOUS
|
||||
# endif
|
||||
#endif
|
||||
#ifndef MREMAP_MAYMOVE
|
||||
# define MREMAP_MAYMOVE 0
|
||||
#endif
|
||||
#ifndef MAP_FAILED
|
||||
# define MAP_FAILED ((void*)-1)
|
||||
#endif
|
||||
|
||||
#define SEG_SIZE (256*1024)
|
||||
|
||||
int main()
|
||||
{
|
||||
void *seg = mmap(NULL, SEG_SIZE, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON, -1, 0);
|
||||
if (seg == MAP_FAILED) {
|
||||
return 1;
|
||||
}
|
||||
if (munmap(seg, SEG_SIZE) != 0) {
|
||||
return 2;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
], [
|
||||
AC_DEFINE([HAVE_MEM_MMAP_ANON], 1, [Define if the target system has support for memory allocation using mmap(MAP_ANON)])
|
||||
AC_MSG_RESULT(yes)
|
||||
], [
|
||||
AC_MSG_RESULT(no)
|
||||
], [
|
||||
dnl cross-compile needs something here
|
||||
AC_MSG_RESULT(no)
|
||||
])
|
||||
|
||||
dnl test for memory allocation using mmap("/dev/zero")
|
||||
AC_MSG_CHECKING(for memory allocation using mmap("/dev/zero"))
|
||||
|
||||
AC_TRY_RUN([
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/mman.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#ifndef MAP_ANON
|
||||
# ifdef MAP_ANONYMOUS
|
||||
# define MAP_ANON MAP_ANONYMOUS
|
||||
# endif
|
||||
#endif
|
||||
#ifndef MREMAP_MAYMOVE
|
||||
# define MREMAP_MAYMOVE 0
|
||||
#endif
|
||||
#ifndef MAP_FAILED
|
||||
# define MAP_FAILED ((void*)-1)
|
||||
#endif
|
||||
|
||||
#define SEG_SIZE (256*1024)
|
||||
|
||||
int main()
|
||||
{
|
||||
int fd;
|
||||
void *seg;
|
||||
|
||||
fd = open("/dev/zero", O_RDWR, S_IRUSR | S_IWUSR);
|
||||
if (fd < 0) {
|
||||
return 1;
|
||||
}
|
||||
seg = mmap(NULL, SEG_SIZE, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0);
|
||||
if (seg == MAP_FAILED) {
|
||||
return 2;
|
||||
}
|
||||
if (munmap(seg, SEG_SIZE) != 0) {
|
||||
return 3;
|
||||
}
|
||||
if (close(fd) != 0) {
|
||||
return 4;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
], [
|
||||
AC_DEFINE([HAVE_MEM_MMAP_ZERO], 1, [Define if the target system has support for memory allocation using mmap("/dev/zero")])
|
||||
AC_MSG_RESULT(yes)
|
||||
], [
|
||||
AC_MSG_RESULT(no)
|
||||
], [
|
||||
dnl cross-compile needs something here
|
||||
AC_MSG_RESULT(no)
|
||||
])
|
||||
|
||||
AC_CHECK_FUNCS(mremap)
|
||||
|
||||
])
|
||||
|
||||
|
||||
AC_DEFUN([LIBZEND_CPLUSPLUS_CHECKS],[
|
||||
|
||||
])
|
||||
|
||||
AC_MSG_CHECKING(whether /dev/urandom exists)
|
||||
if test -r "/dev/urandom" && test -c "/dev/urandom"; then
|
||||
AC_DEFINE([HAVE_DEV_URANDOM], 1, [Define if the target system has /dev/urandom device])
|
||||
AC_MSG_RESULT(yes)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
@@ -1,258 +0,0 @@
|
||||
# Microsoft Developer Studio Generated Dependency File, included by ZendCore.mak
|
||||
|
||||
.\zend_alloc.c : \
|
||||
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
|
||||
".\zend_alloc.h"\
|
||||
".\zend_compile.h"\
|
||||
".\zend_config.w32.h"\
|
||||
".\zend_execute.h"\
|
||||
".\zend_llist.h"\
|
||||
".\zend_ptr_stack.h"\
|
||||
".\zend_stack.h"\
|
||||
".\zend.h"\
|
||||
".\zend_errors.h"\
|
||||
".\zend_globals.h"\
|
||||
".\zend_hash.h"\
|
||||
|
||||
|
||||
.\alloca.c : \
|
||||
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
|
||||
".\zend_config.w32.h"\
|
||||
".\zend.h"\
|
||||
".\zend_errors.h"\
|
||||
".\zend_hash.h"\
|
||||
|
||||
|
||||
.\zend_compile.c : \
|
||||
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
|
||||
".\zend_alloc.h"\
|
||||
".\zend_compile.h"\
|
||||
".\zend_config.w32.h"\
|
||||
".\zend_execute.h"\
|
||||
".\zend_llist.h"\
|
||||
".\zend_modules.h"\
|
||||
".\zend_operators.h"\
|
||||
".\zend_ptr_stack.h"\
|
||||
".\zend_stack.h"\
|
||||
".\zend_variables.h"\
|
||||
".\zend.h"\
|
||||
".\zend_API.h"\
|
||||
".\zend_errors.h"\
|
||||
".\zend_globals.h"\
|
||||
".\zend_hash.h"\
|
||||
".\zend_ini.h"\
|
||||
|
||||
|
||||
.\zend_constants.c : \
|
||||
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
|
||||
".\zend_alloc.h"\
|
||||
".\zend_config.w32.h"\
|
||||
".\zend_constants.h"\
|
||||
".\zend_operators.h"\
|
||||
".\zend_variables.h"\
|
||||
".\zend.h"\
|
||||
".\zend_errors.h"\
|
||||
".\zend_hash.h"\
|
||||
|
||||
|
||||
.\zend_execute.c : \
|
||||
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
|
||||
".\zend_alloc.h"\
|
||||
".\zend_compile.h"\
|
||||
".\zend_config.w32.h"\
|
||||
".\zend_constants.h"\
|
||||
".\zend_execute.h"\
|
||||
".\zend_llist.h"\
|
||||
".\zend_modules.h"\
|
||||
".\zend_operators.h"\
|
||||
".\zend_ptr_stack.h"\
|
||||
".\zend_stack.h"\
|
||||
".\zend_variables.h"\
|
||||
".\zend.h"\
|
||||
".\zend_API.h"\
|
||||
".\zend_errors.h"\
|
||||
".\zend_globals.h"\
|
||||
".\zend_hash.h"\
|
||||
".\zend_ini.h"\
|
||||
|
||||
|
||||
.\zend_highlight.c : \
|
||||
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
|
||||
".\zend_alloc.h"\
|
||||
".\zend_compile.h"\
|
||||
".\zend_config.w32.h"\
|
||||
".\zend_execute.h"\
|
||||
".\zend_highlight.h"\
|
||||
".\zend_llist.h"\
|
||||
".\zend_ptr_stack.h"\
|
||||
".\zend_stack.h"\
|
||||
".\zend_language_parser.tab.h"\
|
||||
".\zend.h"\
|
||||
".\zend_errors.h"\
|
||||
".\zend_globals.h"\
|
||||
".\zend_hash.h"\
|
||||
|
||||
|
||||
.\zend_llist.c : \
|
||||
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
|
||||
".\zend_alloc.h"\
|
||||
".\zend_config.w32.h"\
|
||||
".\zend_llist.h"\
|
||||
".\zend.h"\
|
||||
".\zend_errors.h"\
|
||||
".\zend_hash.h"\
|
||||
|
||||
|
||||
.\zend_opcode.c : \
|
||||
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
|
||||
".\zend_alloc.h"\
|
||||
".\zend_compile.h"\
|
||||
".\zend_config.w32.h"\
|
||||
".\zend_execute.h"\
|
||||
".\zend_llist.h"\
|
||||
".\zend_modules.h"\
|
||||
".\zend_operators.h"\
|
||||
".\zend_ptr_stack.h"\
|
||||
".\zend_stack.h"\
|
||||
".\zend_variables.h"\
|
||||
".\zend.h"\
|
||||
".\zend_API.h"\
|
||||
".\zend_errors.h"\
|
||||
".\zend_globals.h"\
|
||||
".\zend_hash.h"\
|
||||
".\zend_ini.h"\
|
||||
|
||||
|
||||
.\zend_operators.c : \
|
||||
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
|
||||
".\zend_alloc.h"\
|
||||
".\zend_compile.h"\
|
||||
".\zend_config.w32.h"\
|
||||
".\zend_execute.h"\
|
||||
".\zend_llist.h"\
|
||||
".\zend_operators.h"\
|
||||
".\zend_ptr_stack.h"\
|
||||
".\zend_stack.h"\
|
||||
".\zend_variables.h"\
|
||||
".\zend.h"\
|
||||
".\zend_errors.h"\
|
||||
".\zend_globals.h"\
|
||||
".\zend_hash.h"\
|
||||
|
||||
|
||||
.\zend_ptr_stack.c : \
|
||||
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
|
||||
".\zend_alloc.h"\
|
||||
".\zend_config.w32.h"\
|
||||
".\zend_ptr_stack.h"\
|
||||
".\zend.h"\
|
||||
".\zend_errors.h"\
|
||||
".\zend_hash.h"\
|
||||
|
||||
|
||||
.\zend_stack.c : \
|
||||
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
|
||||
".\zend_alloc.h"\
|
||||
".\zend_config.w32.h"\
|
||||
".\zend_stack.h"\
|
||||
".\zend.h"\
|
||||
".\zend_errors.h"\
|
||||
".\zend_hash.h"\
|
||||
|
||||
|
||||
.\zend_variables.c : \
|
||||
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
|
||||
".\zend_alloc.h"\
|
||||
".\zend_compile.h"\
|
||||
".\zend_config.w32.h"\
|
||||
".\zend_constants.h"\
|
||||
".\zend_execute.h"\
|
||||
".\zend_llist.h"\
|
||||
".\zend_modules.h"\
|
||||
".\zend_ptr_stack.h"\
|
||||
".\zend_stack.h"\
|
||||
".\zend_variables.h"\
|
||||
".\zend.h"\
|
||||
".\zend_API.h"\
|
||||
".\zend_errors.h"\
|
||||
".\zend_globals.h"\
|
||||
".\zend_hash.h"\
|
||||
".\zend_ini.h"\
|
||||
".\zend_list.h"\
|
||||
|
||||
|
||||
.\zend.c : \
|
||||
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
|
||||
".\zend_alloc.h"\
|
||||
".\zend_config.w32.h"\
|
||||
".\zend_operators.h"\
|
||||
".\zend_variables.h"\
|
||||
".\zend.h"\
|
||||
".\zend_errors.h"\
|
||||
".\zend_hash.h"\
|
||||
|
||||
|
||||
.\zend_API.c : \
|
||||
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
|
||||
".\zend_alloc.h"\
|
||||
".\zend_compile.h"\
|
||||
".\zend_config.w32.h"\
|
||||
".\zend_constants.h"\
|
||||
".\zend_execute.h"\
|
||||
".\zend_llist.h"\
|
||||
".\zend_modules.h"\
|
||||
".\zend_operators.h"\
|
||||
".\zend_ptr_stack.h"\
|
||||
".\zend_stack.h"\
|
||||
".\zend_variables.h"\
|
||||
".\zend.h"\
|
||||
".\zend_API.h"\
|
||||
".\zend_errors.h"\
|
||||
".\zend_globals.h"\
|
||||
".\zend_hash.h"\
|
||||
".\zend_ini.h"\
|
||||
".\zend_list.h"\
|
||||
|
||||
|
||||
.\zend_hash.c : \
|
||||
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
|
||||
".\zend_config.w32.h"\
|
||||
".\zend.h"\
|
||||
".\zend_errors.h"\
|
||||
".\zend_hash.h"\
|
||||
|
||||
|
||||
.\zend_ini.c : \
|
||||
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
|
||||
".\zend_alloc.h"\
|
||||
".\zend_config.w32.h"\
|
||||
".\zend.h"\
|
||||
".\zend_errors.h"\
|
||||
".\zend_hash.h"\
|
||||
".\zend_ini.h"\
|
||||
|
||||
|
||||
!IF "$(CFG)" == "ZendCore - Win32 Release"
|
||||
|
||||
!ELSEIF "$(CFG)" == "ZendCore - Win32 Debug"
|
||||
|
||||
!ENDIF
|
||||
|
||||
!IF "$(CFG)" == "ZendCore - Win32 Release"
|
||||
|
||||
!ELSEIF "$(CFG)" == "ZendCore - Win32 Debug"
|
||||
|
||||
!ENDIF
|
||||
|
||||
!IF "$(CFG)" == "ZendCore - Win32 Release"
|
||||
|
||||
!ELSEIF "$(CFG)" == "ZendCore - Win32 Debug"
|
||||
|
||||
!ENDIF
|
||||
|
||||
!IF "$(CFG)" == "ZendCore - Win32 Release"
|
||||
|
||||
!ELSEIF "$(CFG)" == "ZendCore - Win32 Debug"
|
||||
|
||||
!ENDIF
|
||||
|
||||
-735
@@ -1,735 +0,0 @@
|
||||
# Microsoft Developer Studio Project File - Name="ZendTS" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Static Library" 0x0104
|
||||
|
||||
CFG=ZendTS - Win32 Release_TSDbg
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "ZendTS.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "ZendTS.mak" CFG="ZendTS - Win32 Release_TSDbg"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "ZendTS - Win32 Release_TS" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "ZendTS - Win32 Debug_TS" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "ZendTS - Win32 Release_TS_inline" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "ZendTS - Win32 Release_TSDbg" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "ZendTS - Win32 Release_TS"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Output_Dir "Release_TS"
|
||||
# PROP BASE Intermediate_Dir "Release_TS"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Output_Dir "Release_TS"
|
||||
# PROP Intermediate_Dir "Release_TS"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDebug_TS" /D "_MBCS" /D "_LIB" /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDebug_TS" /D ZEND_DEBUG=0 /D _WIN32_WINNT=0x400 /D "_LIB" /D "TSRM_EXPORTS" /D "LIBZEND_EXPORTS" /D "ZTS" /D "ZEND_WIN32" /D "WIN32" /D "_MBCS" /FR /FD /c
|
||||
# SUBTRACT CPP /YX
|
||||
# ADD BASE RSC /l 0x40d /d "NDebug_TS"
|
||||
# ADD RSC /l 0x40d /d "NDebug_TS"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
|
||||
!ELSEIF "$(CFG)" == "ZendTS - Win32 Debug_TS"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Output_Dir "Debug_TS"
|
||||
# PROP BASE Intermediate_Dir "Debug_TS"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Output_Dir "Debug_TS"
|
||||
# PROP Intermediate_Dir "Debug_TS"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_Debug_TS" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "." /D "_Debug_TS" /D ZEND_DEBUG=1 /D "_LIB" /D "TSRM_EXPORTS" /D "LIBZEND_EXPORTS" /D "ZTS" /D "ZEND_WIN32" /D "WIN32" /D "_MBCS" /FR /YX /FD /GZ /c
|
||||
# ADD BASE RSC /l 0x40d /d "_Debug_TS"
|
||||
# ADD RSC /l 0x40d /d "_Debug_TS"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
|
||||
!ELSEIF "$(CFG)" == "ZendTS - Win32 Release_TS_inline"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Output_Dir "ZendTS___Win32_Release_TS_inline"
|
||||
# PROP BASE Intermediate_Dir "ZendTS___Win32_Release_TS_inline"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Output_Dir "Release_TS_inline"
|
||||
# PROP Intermediate_Dir "Release_TS_inline"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDebug_TS" /D "_LIB" /D "TSRM_EXPORTS" /D "LIBZEND_EXPORTS" /D "ZTS" /D "WIN32" /D "_MBCS" /D ZEND_DEBUG=0 /FR /FD /c
|
||||
# SUBTRACT BASE CPP /YX
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDebug_TS" /D ZEND_DEBUG=0 /D "ZEND_WIN32_FORCE_INLINE" /D _WIN32_WINNT=0x400 /D "_LIB" /D "TSRM_EXPORTS" /D "LIBZEND_EXPORTS" /D "ZTS" /D "ZEND_WIN32" /D "WIN32" /D "_MBCS" /FR /FD /c
|
||||
# SUBTRACT CPP /YX
|
||||
# ADD BASE RSC /l 0x40d /d "NDebug_TS"
|
||||
# ADD RSC /l 0x40d /d "NDebug_TS"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
|
||||
!ELSEIF "$(CFG)" == "ZendTS - Win32 Release_TSDbg"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Output_Dir "ZendTS___Win32_Release_TSDbg"
|
||||
# PROP BASE Intermediate_Dir "ZendTS___Win32_Release_TSDbg"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Output_Dir "Release_TSDbg"
|
||||
# PROP Intermediate_Dir "Release_TSDbg"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDebug_TS" /D ZEND_DEBUG=0 /D _WIN32_WINNT=0x400 /D "_LIB" /D "TSRM_EXPORTS" /D "LIBZEND_EXPORTS" /D "ZTS" /D "ZEND_WIN32" /D "WIN32" /D "_MBCS" /FR /FD /c
|
||||
# SUBTRACT BASE CPP /YX
|
||||
# ADD CPP /nologo /MD /W3 /GX /Zi /Od /I "." /D "NDebug_TS" /D ZEND_DEBUG=0 /D _WIN32_WINNT=0x400 /D "_LIB" /D "TSRM_EXPORTS" /D "LIBZEND_EXPORTS" /D "ZTS" /D "ZEND_WIN32" /D "WIN32" /D "_MBCS" /FR /FD /c
|
||||
# SUBTRACT CPP /YX
|
||||
# ADD BASE RSC /l 0x40d /d "NDebug_TS"
|
||||
# ADD RSC /l 0x40d /d "NDebug_TS"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "ZendTS - Win32 Release_TS"
|
||||
# Name "ZendTS - Win32 Debug_TS"
|
||||
# Name "ZendTS - Win32 Release_TS_inline"
|
||||
# Name "ZendTS - Win32 Release_TSDbg"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_alloc.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_API.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_builtin_functions.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_closures.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_compile.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_constants.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_default_classes.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_exceptions.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_execute.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_execute_API.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_extensions.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_float.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_hash.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_highlight.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_indent.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_ini.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_ini_parser.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_ini_scanner.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_interfaces.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_iterators.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\zend_language_parser.c"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\zend_language_scanner.c"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_list.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_llist.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_object_handlers.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_objects.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_objects_API.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_opcode.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_operators.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_ptr_stack.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_qsort.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_reflection_api.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_sprintf.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_stack.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_stream.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_strtod.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_ts_hash.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_variables.c
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\FlexLexer.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_alloc.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_API.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_builtin_functions.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_compile.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_config.w32.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_constants.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_default_classes.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_errors.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_exceptions.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_execute.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_extensions.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_fast_cache.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_globals.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_globals_macros.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_hash.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_highlight.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_indent.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_ini.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_ini_parser.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_ini_scanner.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_interfaces.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_istdiostream.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_iterators.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\zend_language_parser.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\zend_language_scanner.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_list.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_llist.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_modules.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_object_handlers.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_objects.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_objects_API.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_operators.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_ptr_stack.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_qsort.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_reflection_api.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_stack.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_stream.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_strtod.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_ts_hash.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_variables.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Parsers"
|
||||
|
||||
# PROP Default_Filter "y"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_ini_parser.y
|
||||
|
||||
!IF "$(CFG)" == "ZendTS - Win32 Release_TS"
|
||||
|
||||
# Begin Custom Build
|
||||
InputDir=.
|
||||
InputPath=.\zend_ini_parser.y
|
||||
|
||||
BuildCmds= \
|
||||
bison --output=zend_ini_parser.c -v -d -p ini_ zend_ini_parser.y
|
||||
|
||||
"$(InputDir)\zend_ini_parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
|
||||
"$(InputDir)\zend_ini_parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
# End Custom Build
|
||||
|
||||
!ELSEIF "$(CFG)" == "ZendTS - Win32 Debug_TS"
|
||||
|
||||
# Begin Custom Build
|
||||
InputDir=.
|
||||
InputPath=.\zend_ini_parser.y
|
||||
|
||||
BuildCmds= \
|
||||
bison --output=zend_ini_parser.c -v -d -p ini_ zend_ini_parser.y
|
||||
|
||||
"$(InputDir)\zend_ini_parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
|
||||
"$(InputDir)\zend_ini_parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
# End Custom Build
|
||||
|
||||
!ELSEIF "$(CFG)" == "ZendTS - Win32 Release_TS_inline"
|
||||
|
||||
# Begin Custom Build
|
||||
InputDir=.
|
||||
InputPath=.\zend_ini_parser.y
|
||||
|
||||
BuildCmds= \
|
||||
bison --output=zend_ini_parser.c -v -d -p ini_ zend_ini_parser.y
|
||||
|
||||
"$(InputDir)\zend_ini_parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
|
||||
"$(InputDir)\zend_ini_parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
# End Custom Build
|
||||
|
||||
!ELSEIF "$(CFG)" == "ZendTS - Win32 Release_TSDbg"
|
||||
|
||||
# Begin Custom Build
|
||||
InputDir=.
|
||||
InputPath=.\zend_ini_parser.y
|
||||
|
||||
BuildCmds= \
|
||||
bison --output=zend_ini_parser.c -v -d -p ini_ zend_ini_parser.y
|
||||
|
||||
"$(InputDir)\zend_ini_parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
|
||||
"$(InputDir)\zend_ini_parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
# End Custom Build
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\zend_language_parser.y"
|
||||
|
||||
!IF "$(CFG)" == "ZendTS - Win32 Release_TS"
|
||||
|
||||
# Begin Custom Build
|
||||
InputDir=.
|
||||
InputPath=".\zend_language_parser.y"
|
||||
|
||||
BuildCmds= \
|
||||
bison --output=zend_language_parser.c -v -d -p zend zend_language_parser.y
|
||||
|
||||
"$(InputDir)\zend_language_parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
|
||||
"$(InputDir)\zend_language_parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
# End Custom Build
|
||||
|
||||
!ELSEIF "$(CFG)" == "ZendTS - Win32 Debug_TS"
|
||||
|
||||
# Begin Custom Build
|
||||
InputDir=.
|
||||
InputPath=".\zend_language_parser.y"
|
||||
|
||||
BuildCmds= \
|
||||
bison --output=zend_language_parser.c -v -d -p zend zend_language_parser.y
|
||||
|
||||
"$(InputDir)\zend_language_parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
|
||||
"$(InputDir)\zend_language_parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
# End Custom Build
|
||||
|
||||
!ELSEIF "$(CFG)" == "ZendTS - Win32 Release_TS_inline"
|
||||
|
||||
# Begin Custom Build
|
||||
InputDir=.
|
||||
InputPath=".\zend_language_parser.y"
|
||||
|
||||
BuildCmds= \
|
||||
bison --output=zend_language_parser.c -v -d -p zend zend_language_parser.y
|
||||
|
||||
"$(InputDir)\zend_language_parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
|
||||
"$(InputDir)\zend_language_parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
# End Custom Build
|
||||
|
||||
!ELSEIF "$(CFG)" == "ZendTS - Win32 Release_TSDbg"
|
||||
|
||||
# Begin Custom Build
|
||||
InputDir=.
|
||||
InputPath=".\zend_language_parser.y"
|
||||
|
||||
BuildCmds= \
|
||||
bison --output=zend_language_parser.c -v -d -p zend zend_language_parser.y
|
||||
|
||||
"$(InputDir)\zend_language_parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
|
||||
"$(InputDir)\zend_language_parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
# End Custom Build
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Scanners"
|
||||
|
||||
# PROP Default_Filter "l"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\flex.skl
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_ini_scanner.l
|
||||
|
||||
!IF "$(CFG)" == "ZendTS - Win32 Release_TS"
|
||||
|
||||
# Begin Custom Build
|
||||
InputPath=.\zend_ini_scanner.l
|
||||
|
||||
"zend_ini_scanner.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
flex -B -i -Sflex.skl -Pini_ -ozend_ini_scanner.c zend_ini_scanner.l
|
||||
|
||||
# End Custom Build
|
||||
|
||||
!ELSEIF "$(CFG)" == "ZendTS - Win32 Debug_TS"
|
||||
|
||||
# Begin Custom Build
|
||||
InputPath=.\zend_ini_scanner.l
|
||||
|
||||
"zend_ini_scanner.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
flex -B -i -Sflex.skl -Pini_ -ozend_ini_scanner.c zend_ini_scanner.l
|
||||
|
||||
# End Custom Build
|
||||
|
||||
!ELSEIF "$(CFG)" == "ZendTS - Win32 Release_TS_inline"
|
||||
|
||||
# Begin Custom Build
|
||||
InputPath=.\zend_ini_scanner.l
|
||||
|
||||
"zend_ini_scanner.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
flex -B -i -Sflex.skl -Pini_ -ozend_ini_scanner.c zend_ini_scanner.l
|
||||
|
||||
# End Custom Build
|
||||
|
||||
!ELSEIF "$(CFG)" == "ZendTS - Win32 Release_TSDbg"
|
||||
|
||||
# Begin Custom Build
|
||||
InputPath=.\zend_ini_scanner.l
|
||||
|
||||
"zend_ini_scanner.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
flex -B -i -Sflex.skl -Pini_ -ozend_ini_scanner.c zend_ini_scanner.l
|
||||
|
||||
# End Custom Build
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\zend_language_scanner.l"
|
||||
|
||||
!IF "$(CFG)" == "ZendTS - Win32 Release_TS"
|
||||
|
||||
# Begin Custom Build
|
||||
InputPath=".\zend_language_scanner.l"
|
||||
|
||||
"zend_language_scanner.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
flex -B -i -Sflex.skl -Pzend -ozend_language_scanner.c zend_language_scanner.l
|
||||
|
||||
# End Custom Build
|
||||
|
||||
!ELSEIF "$(CFG)" == "ZendTS - Win32 Debug_TS"
|
||||
|
||||
# Begin Custom Build
|
||||
InputPath=".\zend_language_scanner.l"
|
||||
|
||||
"zend_language_scanner.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
flex -B -i -Sflex.skl -Pzend -ozend_language_scanner.c zend_language_scanner.l
|
||||
|
||||
# End Custom Build
|
||||
|
||||
!ELSEIF "$(CFG)" == "ZendTS - Win32 Release_TS_inline"
|
||||
|
||||
# Begin Custom Build
|
||||
InputPath=".\zend_language_scanner.l"
|
||||
|
||||
"zend_language_scanner.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
flex -B -i -Sflex.skl -Pzend -ozend_language_scanner.c zend_language_scanner.l
|
||||
|
||||
# End Custom Build
|
||||
|
||||
!ELSEIF "$(CFG)" == "ZendTS - Win32 Release_TSDbg"
|
||||
|
||||
# Begin Custom Build
|
||||
InputPath=".\zend_language_scanner.l"
|
||||
|
||||
"zend_language_scanner.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
flex -B -i -Sflex.skl -Pzend -ozend_language_scanner.c zend_language_scanner.l
|
||||
|
||||
# End Custom Build
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Text Files"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\LICENSE
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ZEND_BUGS
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ZEND_CHANGES
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Resources"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend.ico
|
||||
# End Source File
|
||||
# End Group
|
||||
# End Target
|
||||
# End Project
|
||||
-127
@@ -1,127 +0,0 @@
|
||||
/*
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2010 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available through the world-wide-web at the following url: |
|
||||
| http://www.zend.com/license/2_00.txt. |
|
||||
| If you did not receive a copy of the Zend license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@zend.com so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Andi Gutmans <andi@zend.com> |
|
||||
| Zeev Suraski <zeev@zend.com> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
#if defined(__GNUC__) && __GNUC__ >= 4
|
||||
# define ZEND_API __attribute__ ((visibility("default")))
|
||||
# define ZEND_DLEXPORT __attribute__ ((visibility("default")))
|
||||
#else
|
||||
# define ZEND_API
|
||||
# define ZEND_DLEXPORT
|
||||
#endif
|
||||
|
||||
#define ZEND_DLIMPORT
|
||||
|
||||
@TOP@
|
||||
|
||||
#undef uint
|
||||
#undef ulong
|
||||
|
||||
/* Define if you want to enable memory limit support */
|
||||
#define MEMORY_LIMIT 0
|
||||
|
||||
@BOTTOM@
|
||||
|
||||
#ifndef ZEND_ACCONFIG_H_NO_C_PROTOS
|
||||
|
||||
#ifdef HAVE_STDLIB_H
|
||||
# include <stdlib.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
# include <sys/types.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SYS_SELECT_H
|
||||
#include <sys/select.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_IEEEFP_H
|
||||
# include <ieeefp.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STRING_H
|
||||
# include <string.h>
|
||||
#else
|
||||
# include <strings.h>
|
||||
#endif
|
||||
|
||||
#if ZEND_BROKEN_SPRINTF
|
||||
int zend_sprintf(char *buffer, const char *format, ...);
|
||||
#else
|
||||
# define zend_sprintf sprintf
|
||||
#endif
|
||||
|
||||
#include <math.h>
|
||||
|
||||
/* To enable the is_nan, is_infinite and is_finite PHP functions */
|
||||
#ifdef NETWARE
|
||||
#define HAVE_ISNAN 1
|
||||
#define HAVE_ISINF 1
|
||||
#define HAVE_ISFINITE 1
|
||||
#endif
|
||||
|
||||
#ifndef zend_isnan
|
||||
#ifdef HAVE_ISNAN
|
||||
#define zend_isnan(a) isnan(a)
|
||||
#elif defined(HAVE_FPCLASS)
|
||||
#define zend_isnan(a) ((fpclass(a) == FP_SNAN) || (fpclass(a) == FP_QNAN))
|
||||
#else
|
||||
#define zend_isnan(a) 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_ISINF
|
||||
#define zend_isinf(a) isinf(a)
|
||||
#elif defined(INFINITY)
|
||||
/* Might not work, but is required by ISO C99 */
|
||||
#define zend_isinf(a) (((a)==INFINITY)?1:0)
|
||||
#elif defined(HAVE_FPCLASS)
|
||||
#define zend_isinf(a) ((fpclass(a) == FP_PINF) || (fpclass(a) == FP_NINF))
|
||||
#else
|
||||
#define zend_isinf(a) 0
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_FINITE
|
||||
#define zend_finite(a) finite(a)
|
||||
#elif defined(HAVE_ISFINITE) || defined(isfinite)
|
||||
#define zend_finite(a) isfinite(a)
|
||||
#elif defined(fpclassify)
|
||||
#define zend_finite(a) ((fpclassify((a))!=FP_INFINITE&&fpclassify((a))!=FP_NAN)?1:0)
|
||||
#else
|
||||
#define zend_finite(a) (zend_isnan(a) ? 0 : zend_isinf(a) ? 0 : 1)
|
||||
#endif
|
||||
|
||||
#endif /* ifndef ZEND_ACCONFIG_H_NO_C_PROTOS */
|
||||
|
||||
#ifdef NETWARE
|
||||
#ifdef USE_WINSOCK
|
||||
#/*This detection against winsock is of no use*/ undef HAVE_SOCKLEN_T
|
||||
#/*This detection against winsock is of no use*/ undef HAVE_SYS_SOCKET_H
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Local variables:
|
||||
* tab-width: 4
|
||||
* c-basic-offset: 4
|
||||
* indent-tabs-mode: t
|
||||
* End:
|
||||
*/
|
||||
@@ -1,221 +0,0 @@
|
||||
dnl $Id$
|
||||
dnl
|
||||
dnl This file contains local autoconf functions.
|
||||
|
||||
AC_DEFUN([LIBZEND_BISON_CHECK],[
|
||||
# we only support certain bison versions
|
||||
bison_version_list="1.28 1.35 1.75 1.875 2.0 2.1 2.2 2.3 2.4 2.4.1"
|
||||
|
||||
# for standalone build of Zend Engine
|
||||
test -z "$SED" && SED=sed
|
||||
|
||||
bison_version=none
|
||||
if test "$YACC"; then
|
||||
AC_CACHE_CHECK([for bison version], php_cv_bison_version, [
|
||||
bison_version_vars=`bison --version 2> /dev/null | grep 'GNU Bison' | cut -d ' ' -f 4 | $SED -e 's/\./ /' | tr -d a-z`
|
||||
php_cv_bison_version=invalid
|
||||
if test -n "$bison_version_vars"; then
|
||||
set $bison_version_vars
|
||||
bison_version="${1}.${2}"
|
||||
for bison_check_version in $bison_version_list; do
|
||||
if test "$bison_version" = "$bison_check_version"; then
|
||||
php_cv_bison_version="$bison_check_version (ok)"
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
])
|
||||
fi
|
||||
case $php_cv_bison_version in
|
||||
""|invalid[)]
|
||||
bison_msg="bison versions supported for regeneration of the Zend/PHP parsers: $bison_version_list (found: $bison_version)."
|
||||
AC_MSG_WARN([$bison_msg])
|
||||
YACC="exit 0;"
|
||||
;;
|
||||
esac
|
||||
])
|
||||
|
||||
AC_DEFUN([ZEND_FP_EXCEPT],[
|
||||
AC_CACHE_CHECK(whether fp_except is defined, ac_cv_type_fp_except,[
|
||||
AC_TRY_COMPILE([
|
||||
#include <floatingpoint.h>
|
||||
],[
|
||||
fp_except x = (fp_except) 0;
|
||||
],[
|
||||
ac_cv_type_fp_except=yes
|
||||
],[
|
||||
ac_cv_type_fp_except=no
|
||||
],[
|
||||
ac_cv_type_fp_except=no
|
||||
])])
|
||||
if test "$ac_cv_type_fp_except" = "yes"; then
|
||||
AC_DEFINE(HAVE_FP_EXCEPT, 1, [whether floatingpoint.h defines fp_except])
|
||||
fi
|
||||
])
|
||||
|
||||
dnl
|
||||
dnl Check for broken sprintf()
|
||||
dnl
|
||||
AC_DEFUN([AC_ZEND_BROKEN_SPRINTF],[
|
||||
AC_CACHE_CHECK(whether sprintf is broken, ac_cv_broken_sprintf,[
|
||||
AC_TRY_RUN([main() {char buf[20];exit(sprintf(buf,"testing 123")!=11); }],[
|
||||
ac_cv_broken_sprintf=no
|
||||
],[
|
||||
ac_cv_broken_sprintf=yes
|
||||
],[
|
||||
ac_cv_broken_sprintf=no
|
||||
])
|
||||
])
|
||||
if test "$ac_cv_broken_sprintf" = "yes"; then
|
||||
ac_result=1
|
||||
else
|
||||
ac_result=0
|
||||
fi
|
||||
AC_DEFINE_UNQUOTED(ZEND_BROKEN_SPRINTF, $ac_result, [Whether sprintf is broken])
|
||||
])
|
||||
|
||||
dnl
|
||||
dnl AC_ZEND_C_BIGENDIAN
|
||||
dnl Replacement macro for AC_C_BIGENDIAN
|
||||
dnl
|
||||
AC_DEFUN([AC_ZEND_C_BIGENDIAN],
|
||||
[AC_CACHE_CHECK([whether byte ordering is bigendian], ac_cv_c_bigendian_php,
|
||||
[
|
||||
ac_cv_c_bigendian_php=unknown
|
||||
AC_TRY_RUN(
|
||||
[
|
||||
int main(void)
|
||||
{
|
||||
short one = 1;
|
||||
char *cp = (char *)&one;
|
||||
|
||||
if (*cp == 0) {
|
||||
return(0);
|
||||
} else {
|
||||
return(1);
|
||||
}
|
||||
}
|
||||
], [ac_cv_c_bigendian_php=yes], [ac_cv_c_bigendian_php=no], [ac_cv_c_bigendian_php=unknown])
|
||||
])
|
||||
if test $ac_cv_c_bigendian_php = yes; then
|
||||
AC_DEFINE(WORDS_BIGENDIAN, [], [Define if processor uses big-endian word])
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN([AM_SET_LIBTOOL_VARIABLE],[
|
||||
LIBTOOL='$(SHELL) $(top_builddir)/libtool $1'
|
||||
])
|
||||
|
||||
dnl x87 floating point internal precision control checks
|
||||
dnl See: http://wiki.php.net/rfc/rounding
|
||||
AC_DEFUN([ZEND_CHECK_FLOAT_PRECISION],[
|
||||
AC_MSG_CHECKING([for usable _FPU_SETCW])
|
||||
AC_TRY_LINK([
|
||||
#include <fpu_control.h>
|
||||
],[
|
||||
fpu_control_t fpu_oldcw, fpu_cw;
|
||||
volatile double result;
|
||||
double a = 2877.0;
|
||||
volatile double b = 1000000.0;
|
||||
|
||||
_FPU_GETCW(fpu_oldcw);
|
||||
fpu_cw = (fpu_oldcw & ~_FPU_EXTENDED & ~_FPU_SINGLE) | _FPU_DOUBLE;
|
||||
_FPU_SETCW(fpu_cw);
|
||||
result = a / b;
|
||||
_FPU_SETCW(fpu_oldcw);
|
||||
], [ac_cfp_have__fpu_setcw=yes], [ac_cfp_have__fpu_setcw=no])
|
||||
if test "$ac_cfp_have__fpu_setcw" = "yes" ; then
|
||||
AC_DEFINE(HAVE__FPU_SETCW, 1, [whether _FPU_SETCW is present and usable])
|
||||
AC_MSG_RESULT(yes)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([for usable fpsetprec])
|
||||
AC_TRY_LINK([
|
||||
#include <machine/ieeefp.h>
|
||||
],[
|
||||
fp_prec_t fpu_oldprec;
|
||||
volatile double result;
|
||||
double a = 2877.0;
|
||||
volatile double b = 1000000.0;
|
||||
|
||||
fpu_oldprec = fpgetprec();
|
||||
fpsetprec(FP_PD);
|
||||
result = a / b;
|
||||
fpsetprec(fpu_oldprec);
|
||||
], [ac_cfp_have_fpsetprec=yes], [ac_cfp_have_fpsetprec=no])
|
||||
if test "$ac_cfp_have_fpsetprec" = "yes" ; then
|
||||
AC_DEFINE(HAVE_FPSETPREC, 1, [whether fpsetprec is present and usable])
|
||||
AC_MSG_RESULT(yes)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([for usable _controlfp])
|
||||
AC_TRY_LINK([
|
||||
#include <float.h>
|
||||
],[
|
||||
unsigned int fpu_oldcw;
|
||||
volatile double result;
|
||||
double a = 2877.0;
|
||||
volatile double b = 1000000.0;
|
||||
|
||||
fpu_oldcw = _controlfp(0, 0);
|
||||
_controlfp(_PC_53, _MCW_PC);
|
||||
result = a / b;
|
||||
_controlfp(fpu_oldcw, _MCW_PC);
|
||||
], [ac_cfp_have__controlfp=yes], [ac_cfp_have__controlfp=no])
|
||||
if test "$ac_cfp_have__controlfp" = "yes" ; then
|
||||
AC_DEFINE(HAVE__CONTROLFP, 1, [whether _controlfp is present usable])
|
||||
AC_MSG_RESULT(yes)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([for usable _controlfp_s])
|
||||
AC_TRY_LINK([
|
||||
#include <float.h>
|
||||
],[
|
||||
unsigned int fpu_oldcw, fpu_cw;
|
||||
volatile double result;
|
||||
double a = 2877.0;
|
||||
volatile double b = 1000000.0;
|
||||
|
||||
_controlfp_s(&fpu_cw, 0, 0);
|
||||
fpu_oldcw = fpu_cw;
|
||||
_controlfp_s(&fpu_cw, _PC_53, _MCW_PC);
|
||||
result = a / b;
|
||||
_controlfp_s(&fpu_cw, fpu_oldcw, _MCW_PC);
|
||||
], [ac_cfp_have__controlfp_s=yes], [ac_cfp_have__controlfp_s=no])
|
||||
if test "$ac_cfp_have__controlfp_s" = "yes" ; then
|
||||
AC_DEFINE(HAVE__CONTROLFP_S, 1, [whether _controlfp_s is present and usable])
|
||||
AC_MSG_RESULT(yes)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([whether FPU control word can be manipulated by inline assembler])
|
||||
AC_TRY_LINK([
|
||||
/* nothing */
|
||||
],[
|
||||
unsigned int oldcw, cw;
|
||||
volatile double result;
|
||||
double a = 2877.0;
|
||||
volatile double b = 1000000.0;
|
||||
|
||||
__asm__ __volatile__ ("fnstcw %0" : "=m" (*&oldcw));
|
||||
cw = (oldcw & ~0x0 & ~0x300) | 0x200;
|
||||
__asm__ __volatile__ ("fldcw %0" : : "m" (*&cw));
|
||||
|
||||
result = a / b;
|
||||
|
||||
__asm__ __volatile__ ("fldcw %0" : : "m" (*&oldcw));
|
||||
], [ac_cfp_have_fpu_inline_asm_x86=yes], [ac_cfp_have_fpu_inline_asm_x86=no])
|
||||
if test "$ac_cfp_have_fpu_inline_asm_x86" = "yes" ; then
|
||||
AC_DEFINE(HAVE_FPU_INLINE_ASM_X86, 1, [whether FPU control word can be manipulated by inline assembler])
|
||||
AC_MSG_RESULT(yes)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
])
|
||||
-420
@@ -1,420 +0,0 @@
|
||||
<?php
|
||||
|
||||
date_default_timezone_set('UTC');
|
||||
function simple() {
|
||||
$a = 0;
|
||||
for ($i = 0; $i < 1000000; $i++)
|
||||
$a++;
|
||||
|
||||
$thisisanotherlongname = 0;
|
||||
for ($thisisalongname = 0; $thisisalongname < 1000000; $thisisalongname++)
|
||||
$thisisanotherlongname++;
|
||||
}
|
||||
|
||||
/****/
|
||||
|
||||
function simplecall() {
|
||||
for ($i = 0; $i < 1000000; $i++)
|
||||
strlen("hallo");
|
||||
}
|
||||
|
||||
/****/
|
||||
|
||||
function hallo($a) {
|
||||
}
|
||||
|
||||
function simpleucall() {
|
||||
for ($i = 0; $i < 1000000; $i++)
|
||||
hallo("hallo");
|
||||
}
|
||||
|
||||
/****/
|
||||
|
||||
function simpleudcall() {
|
||||
for ($i = 0; $i < 1000000; $i++)
|
||||
hallo2("hallo");
|
||||
}
|
||||
|
||||
function hallo2($a) {
|
||||
}
|
||||
|
||||
/****/
|
||||
|
||||
function mandel() {
|
||||
$w1=50;
|
||||
$h1=150;
|
||||
$recen=-.45;
|
||||
$imcen=0.0;
|
||||
$r=0.7;
|
||||
$s=0; $rec=0; $imc=0; $re=0; $im=0; $re2=0; $im2=0;
|
||||
$x=0; $y=0; $w2=0; $h2=0; $color=0;
|
||||
$s=2*$r/$w1;
|
||||
$w2=40;
|
||||
$h2=12;
|
||||
for ($y=0 ; $y<=$w1; $y=$y+1) {
|
||||
$imc=$s*($y-$h2)+$imcen;
|
||||
for ($x=0 ; $x<=$h1; $x=$x+1) {
|
||||
$rec=$s*($x-$w2)+$recen;
|
||||
$re=$rec;
|
||||
$im=$imc;
|
||||
$color=1000;
|
||||
$re2=$re*$re;
|
||||
$im2=$im*$im;
|
||||
while( ((($re2+$im2)<1000000) && $color>0)) {
|
||||
$im=$re*$im*2+$imc;
|
||||
$re=$re2-$im2+$rec;
|
||||
$re2=$re*$re;
|
||||
$im2=$im*$im;
|
||||
$color=$color-1;
|
||||
}
|
||||
if ( $color==0 ) {
|
||||
print "_";
|
||||
} else {
|
||||
print "#";
|
||||
}
|
||||
}
|
||||
print "<br>";
|
||||
flush();
|
||||
}
|
||||
}
|
||||
|
||||
/****/
|
||||
|
||||
function mandel2() {
|
||||
$b = " .:,;!/>)|&IH%*#";
|
||||
//float r, i, z, Z, t, c, C;
|
||||
for ($y=30; printf("\n"), $C = $y*0.1 - 1.5, $y--;){
|
||||
for ($x=0; $c = $x*0.04 - 2, $z=0, $Z=0, $x++ < 75;){
|
||||
for ($r=$c, $i=$C, $k=0; $t = $z*$z - $Z*$Z + $r, $Z = 2*$z*$Z + $i, $z=$t, $k<5000; $k++)
|
||||
if ($z*$z + $Z*$Z > 500000) break;
|
||||
echo $b[$k%16];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/****/
|
||||
|
||||
function Ack($m, $n){
|
||||
if($m == 0) return $n+1;
|
||||
if($n == 0) return Ack($m-1, 1);
|
||||
return Ack($m - 1, Ack($m, ($n - 1)));
|
||||
}
|
||||
|
||||
function ackermann($n) {
|
||||
$r = Ack(3,$n);
|
||||
print "Ack(3,$n): $r\n";
|
||||
}
|
||||
|
||||
/****/
|
||||
|
||||
function ary($n) {
|
||||
for ($i=0; $i<$n; $i++) {
|
||||
$X[$i] = $i;
|
||||
}
|
||||
for ($i=$n-1; $i>=0; $i--) {
|
||||
$Y[$i] = $X[$i];
|
||||
}
|
||||
$last = $n-1;
|
||||
print "$Y[$last]\n";
|
||||
}
|
||||
|
||||
/****/
|
||||
|
||||
function ary2($n) {
|
||||
for ($i=0; $i<$n;) {
|
||||
$X[$i] = $i; ++$i;
|
||||
$X[$i] = $i; ++$i;
|
||||
$X[$i] = $i; ++$i;
|
||||
$X[$i] = $i; ++$i;
|
||||
$X[$i] = $i; ++$i;
|
||||
|
||||
$X[$i] = $i; ++$i;
|
||||
$X[$i] = $i; ++$i;
|
||||
$X[$i] = $i; ++$i;
|
||||
$X[$i] = $i; ++$i;
|
||||
$X[$i] = $i; ++$i;
|
||||
}
|
||||
for ($i=$n-1; $i>=0;) {
|
||||
$Y[$i] = $X[$i]; --$i;
|
||||
$Y[$i] = $X[$i]; --$i;
|
||||
$Y[$i] = $X[$i]; --$i;
|
||||
$Y[$i] = $X[$i]; --$i;
|
||||
$Y[$i] = $X[$i]; --$i;
|
||||
|
||||
$Y[$i] = $X[$i]; --$i;
|
||||
$Y[$i] = $X[$i]; --$i;
|
||||
$Y[$i] = $X[$i]; --$i;
|
||||
$Y[$i] = $X[$i]; --$i;
|
||||
$Y[$i] = $X[$i]; --$i;
|
||||
}
|
||||
$last = $n-1;
|
||||
print "$Y[$last]\n";
|
||||
}
|
||||
|
||||
/****/
|
||||
|
||||
function ary3($n) {
|
||||
for ($i=0; $i<$n; $i++) {
|
||||
$X[$i] = $i + 1;
|
||||
$Y[$i] = 0;
|
||||
}
|
||||
for ($k=0; $k<1000; $k++) {
|
||||
for ($i=$n-1; $i>=0; $i--) {
|
||||
$Y[$i] += $X[$i];
|
||||
}
|
||||
}
|
||||
$last = $n-1;
|
||||
print "$Y[0] $Y[$last]\n";
|
||||
}
|
||||
|
||||
/****/
|
||||
|
||||
function fibo_r($n){
|
||||
return(($n < 2) ? 1 : fibo_r($n - 2) + fibo_r($n - 1));
|
||||
}
|
||||
|
||||
function fibo($n) {
|
||||
$r = fibo_r($n);
|
||||
print "$r\n";
|
||||
}
|
||||
|
||||
/****/
|
||||
|
||||
function hash1($n) {
|
||||
for ($i = 1; $i <= $n; $i++) {
|
||||
$X[dechex($i)] = $i;
|
||||
}
|
||||
$c = 0;
|
||||
for ($i = $n; $i > 0; $i--) {
|
||||
if ($X[dechex($i)]) { $c++; }
|
||||
}
|
||||
print "$c\n";
|
||||
}
|
||||
|
||||
/****/
|
||||
|
||||
function hash2($n) {
|
||||
for ($i = 0; $i < $n; $i++) {
|
||||
$hash1["foo_$i"] = $i;
|
||||
$hash2["foo_$i"] = 0;
|
||||
}
|
||||
for ($i = $n; $i > 0; $i--) {
|
||||
foreach($hash1 as $key => $value) $hash2[$key] += $value;
|
||||
}
|
||||
$first = "foo_0";
|
||||
$last = "foo_".($n-1);
|
||||
print "$hash1[$first] $hash1[$last] $hash2[$first] $hash2[$last]\n";
|
||||
}
|
||||
|
||||
/****/
|
||||
|
||||
function gen_random ($n) {
|
||||
global $LAST;
|
||||
return( ($n * ($LAST = ($LAST * IA + IC) % IM)) / IM );
|
||||
}
|
||||
|
||||
function heapsort_r($n, &$ra) {
|
||||
$l = ($n >> 1) + 1;
|
||||
$ir = $n;
|
||||
|
||||
while (1) {
|
||||
if ($l > 1) {
|
||||
$rra = $ra[--$l];
|
||||
} else {
|
||||
$rra = $ra[$ir];
|
||||
$ra[$ir] = $ra[1];
|
||||
if (--$ir == 1) {
|
||||
$ra[1] = $rra;
|
||||
return;
|
||||
}
|
||||
}
|
||||
$i = $l;
|
||||
$j = $l << 1;
|
||||
while ($j <= $ir) {
|
||||
if (($j < $ir) && ($ra[$j] < $ra[$j+1])) {
|
||||
$j++;
|
||||
}
|
||||
if ($rra < $ra[$j]) {
|
||||
$ra[$i] = $ra[$j];
|
||||
$j += ($i = $j);
|
||||
} else {
|
||||
$j = $ir + 1;
|
||||
}
|
||||
}
|
||||
$ra[$i] = $rra;
|
||||
}
|
||||
}
|
||||
|
||||
function heapsort($N) {
|
||||
global $LAST;
|
||||
|
||||
define("IM", 139968);
|
||||
define("IA", 3877);
|
||||
define("IC", 29573);
|
||||
|
||||
$LAST = 42;
|
||||
for ($i=1; $i<=$N; $i++) {
|
||||
$ary[$i] = gen_random(1);
|
||||
}
|
||||
heapsort_r($N, $ary);
|
||||
printf("%.10f\n", $ary[$N]);
|
||||
}
|
||||
|
||||
/****/
|
||||
|
||||
function mkmatrix ($rows, $cols) {
|
||||
$count = 1;
|
||||
$mx = array();
|
||||
for ($i=0; $i<$rows; $i++) {
|
||||
for ($j=0; $j<$cols; $j++) {
|
||||
$mx[$i][$j] = $count++;
|
||||
}
|
||||
}
|
||||
return($mx);
|
||||
}
|
||||
|
||||
function mmult ($rows, $cols, $m1, $m2) {
|
||||
$m3 = array();
|
||||
for ($i=0; $i<$rows; $i++) {
|
||||
for ($j=0; $j<$cols; $j++) {
|
||||
$x = 0;
|
||||
for ($k=0; $k<$cols; $k++) {
|
||||
$x += $m1[$i][$k] * $m2[$k][$j];
|
||||
}
|
||||
$m3[$i][$j] = $x;
|
||||
}
|
||||
}
|
||||
return($m3);
|
||||
}
|
||||
|
||||
function matrix($n) {
|
||||
$SIZE = 30;
|
||||
$m1 = mkmatrix($SIZE, $SIZE);
|
||||
$m2 = mkmatrix($SIZE, $SIZE);
|
||||
while ($n--) {
|
||||
$mm = mmult($SIZE, $SIZE, $m1, $m2);
|
||||
}
|
||||
print "{$mm[0][0]} {$mm[2][3]} {$mm[3][2]} {$mm[4][4]}\n";
|
||||
}
|
||||
|
||||
/****/
|
||||
|
||||
function nestedloop($n) {
|
||||
$x = 0;
|
||||
for ($a=0; $a<$n; $a++)
|
||||
for ($b=0; $b<$n; $b++)
|
||||
for ($c=0; $c<$n; $c++)
|
||||
for ($d=0; $d<$n; $d++)
|
||||
for ($e=0; $e<$n; $e++)
|
||||
for ($f=0; $f<$n; $f++)
|
||||
$x++;
|
||||
print "$x\n";
|
||||
}
|
||||
|
||||
/****/
|
||||
|
||||
function sieve($n) {
|
||||
$count = 0;
|
||||
while ($n-- > 0) {
|
||||
$count = 0;
|
||||
$flags = range (0,8192);
|
||||
for ($i=2; $i<8193; $i++) {
|
||||
if ($flags[$i] > 0) {
|
||||
for ($k=$i+$i; $k <= 8192; $k+=$i) {
|
||||
$flags[$k] = 0;
|
||||
}
|
||||
$count++;
|
||||
}
|
||||
}
|
||||
}
|
||||
print "Count: $count\n";
|
||||
}
|
||||
|
||||
/****/
|
||||
|
||||
function strcat($n) {
|
||||
$str = "";
|
||||
while ($n-- > 0) {
|
||||
$str .= "hello\n";
|
||||
}
|
||||
$len = strlen($str);
|
||||
print "$len\n";
|
||||
}
|
||||
|
||||
/*****/
|
||||
|
||||
function getmicrotime()
|
||||
{
|
||||
$t = gettimeofday();
|
||||
return ($t['sec'] + $t['usec'] / 1000000);
|
||||
}
|
||||
|
||||
function start_test()
|
||||
{
|
||||
ob_start();
|
||||
return getmicrotime();
|
||||
}
|
||||
|
||||
function end_test($start, $name)
|
||||
{
|
||||
global $total;
|
||||
$end = getmicrotime();
|
||||
ob_end_clean();
|
||||
$total += $end-$start;
|
||||
$num = number_format($end-$start,3);
|
||||
$pad = str_repeat(" ", 24-strlen($name)-strlen($num));
|
||||
|
||||
echo $name.$pad.$num."\n";
|
||||
ob_start();
|
||||
return getmicrotime();
|
||||
}
|
||||
|
||||
function total()
|
||||
{
|
||||
global $total;
|
||||
$pad = str_repeat("-", 24);
|
||||
echo $pad."\n";
|
||||
$num = number_format($total,3);
|
||||
$pad = str_repeat(" ", 24-strlen("Total")-strlen($num));
|
||||
echo "Total".$pad.$num."\n";
|
||||
}
|
||||
|
||||
$t0 = $t = start_test();
|
||||
simple();
|
||||
$t = end_test($t, "simple");
|
||||
simplecall();
|
||||
$t = end_test($t, "simplecall");
|
||||
simpleucall();
|
||||
$t = end_test($t, "simpleucall");
|
||||
simpleudcall();
|
||||
$t = end_test($t, "simpleudcall");
|
||||
mandel();
|
||||
$t = end_test($t, "mandel");
|
||||
mandel2();
|
||||
$t = end_test($t, "mandel2");
|
||||
ackermann(7);
|
||||
$t = end_test($t, "ackermann(7)");
|
||||
ary(50000);
|
||||
$t = end_test($t, "ary(50000)");
|
||||
ary2(50000);
|
||||
$t = end_test($t, "ary2(50000)");
|
||||
ary3(2000);
|
||||
$t = end_test($t, "ary3(2000)");
|
||||
fibo(30);
|
||||
$t = end_test($t, "fibo(30)");
|
||||
hash1(50000);
|
||||
$t = end_test($t, "hash1(50000)");
|
||||
hash2(500);
|
||||
$t = end_test($t, "hash2(500)");
|
||||
heapsort(20000);
|
||||
$t = end_test($t, "heapsort(20000)");
|
||||
matrix(20);
|
||||
$t = end_test($t, "matrix(20)");
|
||||
nestedloop(12);
|
||||
$t = end_test($t, "nestedloop(12)");
|
||||
sieve(30);
|
||||
$t = end_test($t, "sieve(30)");
|
||||
strcat(200000);
|
||||
$t = end_test($t, "strcat(200000)");
|
||||
total($t0, "Total");
|
||||
?>
|
||||
@@ -1,43 +0,0 @@
|
||||
# Makefile to generate build tools
|
||||
#
|
||||
# Standard usage:
|
||||
# make -f build.mk
|
||||
#
|
||||
# Written by Sascha Schumann
|
||||
#
|
||||
# $Id$
|
||||
|
||||
|
||||
LT_TARGETS = ltmain.sh ltconfig
|
||||
|
||||
config_h_in = zend_config.h.in
|
||||
|
||||
makefile_am_files = Makefile.am
|
||||
makefile_in_files = $(makefile_am_files:.am=.in)
|
||||
makefile_files = $(makefile_am_files:e.am=e)
|
||||
|
||||
targets = $(makefile_in_files) $(LT_TARGETS) configure $(config_h_in)
|
||||
|
||||
all: $(targets)
|
||||
|
||||
clean:
|
||||
rm -f $(targets)
|
||||
|
||||
$(LT_TARGETS):
|
||||
rm -f $(LT_TARGETS)
|
||||
libtoolize --automake $(AMFLAGS) -f
|
||||
|
||||
$(makefile_in_files): $(makefile_am_files)
|
||||
automake -a -i $(AMFLAGS) $(makefile_files)
|
||||
|
||||
aclocal.m4: configure.in acinclude.m4
|
||||
aclocal
|
||||
|
||||
$(config_h_in): configure.in acconfig.h
|
||||
# explicitly remove target since autoheader does not seem to work
|
||||
# correctly otherwise (timestamps are not updated)
|
||||
@rm -f $@
|
||||
autoheader
|
||||
|
||||
configure: aclocal.m4 configure.in
|
||||
autoconf
|
||||
@@ -1,33 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
case "$1" in
|
||||
--copy)
|
||||
automake_flags=--copy
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
|
||||
libtoolize --force --automake $automake_flags
|
||||
|
||||
mv aclocal.m4 aclocal.m4.old 2>/dev/null
|
||||
aclocal
|
||||
if cmp aclocal.m4.old aclocal.m4 > /dev/null 2>&1; then
|
||||
echo "buildconf: keeping ${1}aclocal.m4"
|
||||
mv aclocal.m4.old aclocal.m4
|
||||
else
|
||||
echo "buildconf: created or modified ${1}aclocal.m4"
|
||||
fi
|
||||
|
||||
autoheader
|
||||
|
||||
automake --add-missing --include-deps $automake_flags
|
||||
|
||||
mv configure configure.old 2>/dev/null
|
||||
autoconf
|
||||
if cmp configure.old configure > /dev/null 2>&1; then
|
||||
echo "buildconf: keeping ${1}configure"
|
||||
mv configure.old configure
|
||||
else
|
||||
echo "buildconf: created or modified ${1}configure"
|
||||
fi
|
||||
|
||||
@@ -1,50 +0,0 @@
|
||||
dnl $Id$
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_INIT(zend.c)
|
||||
AM_INIT_AUTOMAKE(zend, 0.80A, nodefine)
|
||||
AM_CONFIG_HEADER(zend_config.h)
|
||||
AM_SANITY_CHECK
|
||||
AM_MAINTAINER_MODE
|
||||
AC_PROG_CC
|
||||
AM_PROG_CC_STDC
|
||||
ZEND_VERSION=$VERSION
|
||||
AC_ZEND_C_BIGENDIAN
|
||||
|
||||
dnl We want this one before the checks, so the checks can modify CFLAGS.
|
||||
test -z "$CFLAGS" && auto_cflags=1
|
||||
|
||||
AC_CHECK_SIZEOF(long, 8)
|
||||
AC_CHECK_SIZEOF(int, 4)
|
||||
|
||||
sinclude(Zend.m4)
|
||||
|
||||
LIBZEND_BASIC_CHECKS
|
||||
LIBZEND_LIBDL_CHECKS
|
||||
LIBZEND_DLSYM_CHECK
|
||||
|
||||
AM_PROG_LIBTOOL
|
||||
if test "$enable_debug" != "yes"; then
|
||||
AM_SET_LIBTOOL_VARIABLE([--silent])
|
||||
fi
|
||||
|
||||
dnl
|
||||
dnl Check for /usr/pkg/{lib,include} which is where NetBSD puts binary
|
||||
dnl and source packages. This should be harmless on other OSs.
|
||||
dnl
|
||||
if test -d /usr/pkg/include -a -d /usr/pkg/lib ; then
|
||||
CFLAGS="$CFLAGS -I/usr/pkg/include"
|
||||
LDFLAGS="$LDFLAGS -L/usr/pkg/lib"
|
||||
fi
|
||||
|
||||
LIBZEND_ENABLE_DEBUG
|
||||
LIBZEND_OTHER_CHECKS
|
||||
|
||||
ZEND_EXTRA_LIBS="$LIBS"
|
||||
LIBS=""
|
||||
AC_SUBST(ZEND_EXTRA_LIBS)
|
||||
AC_OUTPUT(Makefile)
|
||||
|
||||
# Local Variables:
|
||||
# tab-width: 4
|
||||
# End:
|
||||
-19
@@ -1,19 +0,0 @@
|
||||
/*
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2010 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available through the world-wide-web at the following url: |
|
||||
| http://www.zend.com/license/2_00.txt. |
|
||||
| If you did not receive a copy of the Zend license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@zend.com so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
/* $Id$ */
|
||||
@@ -1,54 +0,0 @@
|
||||
--TEST--
|
||||
func_num_args() tests
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
function test1() {
|
||||
var_dump(func_num_args());
|
||||
}
|
||||
|
||||
function test2($a) {
|
||||
var_dump(func_num_args());
|
||||
}
|
||||
|
||||
function test3($a, $b) {
|
||||
var_dump(func_num_args());
|
||||
}
|
||||
|
||||
test1();
|
||||
test2(1);
|
||||
test2();
|
||||
test3(1,2);
|
||||
|
||||
call_user_func("test1");
|
||||
call_user_func("test3", 1);
|
||||
call_user_func("test3", 1, 2);
|
||||
|
||||
class test {
|
||||
static function test1($a) {
|
||||
var_dump(func_num_args());
|
||||
}
|
||||
}
|
||||
|
||||
test::test1(1);
|
||||
var_dump(func_num_args());
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
int(0)
|
||||
int(1)
|
||||
|
||||
Warning: Missing argument 1 for test2(), called in %s on line %d
|
||||
int(0)
|
||||
int(2)
|
||||
int(0)
|
||||
|
||||
Warning: Missing argument 2 for test3() in %s on line %d
|
||||
int(1)
|
||||
int(2)
|
||||
int(1)
|
||||
|
||||
Warning: func_num_args(): Called from the global scope - no function context in %s on line %d
|
||||
int(-1)
|
||||
Done
|
||||
@@ -1,108 +0,0 @@
|
||||
--TEST--
|
||||
func_get_arg() tests
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
function test1() {
|
||||
var_dump(func_get_arg(-10));
|
||||
var_dump(func_get_arg(0));
|
||||
var_dump(func_get_arg(1));
|
||||
}
|
||||
|
||||
function test2($a) {
|
||||
var_dump(func_get_arg(0));
|
||||
var_dump(func_get_arg(1));
|
||||
}
|
||||
|
||||
function test3($a, $b) {
|
||||
var_dump(func_get_arg(0));
|
||||
var_dump(func_get_arg(1));
|
||||
var_dump(func_get_arg(2));
|
||||
}
|
||||
|
||||
test1();
|
||||
test1(10);
|
||||
test2(1);
|
||||
test2();
|
||||
test3(1,2);
|
||||
|
||||
call_user_func("test1");
|
||||
call_user_func("test3", 1);
|
||||
call_user_func("test3", 1, 2);
|
||||
|
||||
class test {
|
||||
static function test1($a) {
|
||||
var_dump(func_get_arg(0));
|
||||
var_dump(func_get_arg(1));
|
||||
}
|
||||
}
|
||||
|
||||
test::test1(1);
|
||||
var_dump(func_get_arg(1));
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: func_get_arg(): The argument number should be >= 0 in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: func_get_arg(): Argument 0 not passed to function in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: func_get_arg(): Argument 1 not passed to function in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: func_get_arg(): The argument number should be >= 0 in %s on line %d
|
||||
bool(false)
|
||||
int(10)
|
||||
|
||||
Warning: func_get_arg(): Argument 1 not passed to function in %s on line %d
|
||||
bool(false)
|
||||
int(1)
|
||||
|
||||
Warning: func_get_arg(): Argument 1 not passed to function in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: Missing argument 1 for test2(), called in %s on line %d and defined in %s on line %d
|
||||
|
||||
Warning: func_get_arg(): Argument 0 not passed to function in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: func_get_arg(): Argument 1 not passed to function in %s on line %d
|
||||
bool(false)
|
||||
int(1)
|
||||
int(2)
|
||||
|
||||
Warning: func_get_arg(): Argument 2 not passed to function in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: func_get_arg(): The argument number should be >= 0 in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: func_get_arg(): Argument 0 not passed to function in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: func_get_arg(): Argument 1 not passed to function in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: Missing argument 2 for test3() in %s on line %d
|
||||
int(1)
|
||||
|
||||
Warning: func_get_arg(): Argument 1 not passed to function in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: func_get_arg(): Argument 2 not passed to function in %s on line %d
|
||||
bool(false)
|
||||
int(1)
|
||||
int(2)
|
||||
|
||||
Warning: func_get_arg(): Argument 2 not passed to function in %s on line %d
|
||||
bool(false)
|
||||
int(1)
|
||||
|
||||
Warning: func_get_arg(): Argument 1 not passed to function in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: func_get_arg(): Called from the global scope - no function context in %s on line %d
|
||||
bool(false)
|
||||
Done
|
||||
@@ -1,81 +0,0 @@
|
||||
--TEST--
|
||||
func_get_args() tests
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
function test1() {
|
||||
var_dump(func_get_args());
|
||||
}
|
||||
|
||||
function test2($a) {
|
||||
var_dump(func_get_args());
|
||||
}
|
||||
|
||||
function test3($a, $b) {
|
||||
var_dump(func_get_args());
|
||||
}
|
||||
|
||||
test1();
|
||||
test1(10);
|
||||
test2(1);
|
||||
test2();
|
||||
test3(1,2);
|
||||
|
||||
call_user_func("test1");
|
||||
call_user_func("test3", 1);
|
||||
call_user_func("test3", 1, 2);
|
||||
|
||||
class test {
|
||||
static function test1($a) {
|
||||
var_dump(func_get_args());
|
||||
}
|
||||
}
|
||||
|
||||
test::test1(1);
|
||||
var_dump(func_get_args());
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
array(0) {
|
||||
}
|
||||
array(1) {
|
||||
[0]=>
|
||||
int(10)
|
||||
}
|
||||
array(1) {
|
||||
[0]=>
|
||||
int(1)
|
||||
}
|
||||
|
||||
Warning: Missing argument 1 for test2(), called in %s on line %d and defined in %s on line %d
|
||||
array(0) {
|
||||
}
|
||||
array(2) {
|
||||
[0]=>
|
||||
int(1)
|
||||
[1]=>
|
||||
int(2)
|
||||
}
|
||||
array(0) {
|
||||
}
|
||||
|
||||
Warning: Missing argument 2 for test3() in %s on line %d
|
||||
array(1) {
|
||||
[0]=>
|
||||
int(1)
|
||||
}
|
||||
array(2) {
|
||||
[0]=>
|
||||
int(1)
|
||||
[1]=>
|
||||
int(2)
|
||||
}
|
||||
array(1) {
|
||||
[0]=>
|
||||
int(1)
|
||||
}
|
||||
|
||||
Warning: func_get_args(): Called from the global scope - no function context in %s on line %d
|
||||
bool(false)
|
||||
Done
|
||||
@@ -1,25 +0,0 @@
|
||||
--TEST--
|
||||
strncmp() tests
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
var_dump(strncmp("", ""));
|
||||
var_dump(strncmp("", "", 100));
|
||||
var_dump(strncmp("aef", "dfsgbdf", -1));
|
||||
var_dump(strncmp("fghjkl", "qwer", 0));
|
||||
var_dump(strncmp("qwerty", "qwerty123", 6));
|
||||
var_dump(strncmp("qwerty", "qwerty123", 7));
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: strncmp() expects exactly 3 parameters, 2 given in %s on line %d
|
||||
NULL
|
||||
int(0)
|
||||
|
||||
Warning: Length must be greater than or equal to 0 in %s on line %d
|
||||
bool(false)
|
||||
int(0)
|
||||
int(0)
|
||||
int(-1)
|
||||
Done
|
||||
@@ -1,27 +0,0 @@
|
||||
--TEST--
|
||||
strcasecmp() tests
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
var_dump(strcasecmp(""));
|
||||
var_dump(strcasecmp("", ""));
|
||||
var_dump(strcasecmp("aef", "dfsgbdf"));
|
||||
var_dump(strcasecmp("qwe", "qwer"));
|
||||
var_dump(strcasecmp("qwerty", "QweRty"));
|
||||
var_dump(strcasecmp("qwErtY", "qwerty"));
|
||||
var_dump(strcasecmp("q123", "Q123"));
|
||||
var_dump(strcasecmp("01", "01"));
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: strcasecmp() expects exactly 2 parameters, 1 given in %s on line %d
|
||||
NULL
|
||||
int(0)
|
||||
int(-1)
|
||||
int(-1)
|
||||
int(0)
|
||||
int(0)
|
||||
int(0)
|
||||
int(0)
|
||||
Done
|
||||
@@ -1,31 +0,0 @@
|
||||
--TEST--
|
||||
strncasecmp() tests
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
var_dump(strncasecmp(""));
|
||||
var_dump(strncasecmp("", "", -1));
|
||||
var_dump(strncasecmp("aef", "dfsgbdf", 0));
|
||||
var_dump(strncasecmp("aef", "dfsgbdf", 10));
|
||||
var_dump(strncasecmp("qwe", "qwer", 3));
|
||||
var_dump(strncasecmp("qwerty", "QweRty", 6));
|
||||
var_dump(strncasecmp("qwErtY", "qwer", 7));
|
||||
var_dump(strncasecmp("q123", "Q123", 3));
|
||||
var_dump(strncasecmp("01", "01", 1000));
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: strncasecmp() expects exactly 3 parameters, 1 given in %s on line %d
|
||||
NULL
|
||||
|
||||
Warning: Length must be greater than or equal to 0 in %s on line %d
|
||||
bool(false)
|
||||
int(0)
|
||||
int(-1)
|
||||
int(0)
|
||||
int(0)
|
||||
int(1)
|
||||
int(0)
|
||||
int(0)
|
||||
Done
|
||||
@@ -1,63 +0,0 @@
|
||||
--TEST--
|
||||
each() tests
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
var_dump(each());
|
||||
$var = 1;
|
||||
var_dump(each($var));
|
||||
$var = "string";
|
||||
var_dump(each($var));
|
||||
$var = array(1,2,3);
|
||||
var_dump(each($var));
|
||||
$var = array("a"=>1,"b"=>2,"c"=>3);
|
||||
var_dump(each($var));
|
||||
|
||||
$a = array(1);
|
||||
$a [] =&$a[0];
|
||||
|
||||
var_dump(each($a));
|
||||
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: each() expects exactly 1 parameter, 0 given in %s on line %d
|
||||
NULL
|
||||
|
||||
Warning: Variable passed to each() is not an array or object in %s on line %d
|
||||
NULL
|
||||
|
||||
Warning: Variable passed to each() is not an array or object in %s on line %d
|
||||
NULL
|
||||
array(4) {
|
||||
[1]=>
|
||||
int(1)
|
||||
[u"value"]=>
|
||||
int(1)
|
||||
[0]=>
|
||||
int(0)
|
||||
[u"key"]=>
|
||||
int(0)
|
||||
}
|
||||
array(4) {
|
||||
[1]=>
|
||||
int(1)
|
||||
[u"value"]=>
|
||||
int(1)
|
||||
[0]=>
|
||||
unicode(1) "a"
|
||||
[u"key"]=>
|
||||
unicode(1) "a"
|
||||
}
|
||||
array(4) {
|
||||
[1]=>
|
||||
int(1)
|
||||
[u"value"]=>
|
||||
int(1)
|
||||
[0]=>
|
||||
int(0)
|
||||
[u"key"]=>
|
||||
int(0)
|
||||
}
|
||||
Done
|
||||
@@ -1,53 +0,0 @@
|
||||
--TEST--
|
||||
define() tests
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
var_dump(define());
|
||||
var_dump(define("TRUE"));
|
||||
var_dump(define("TRUE", 1));
|
||||
var_dump(define("TRUE", 1, array(1)));
|
||||
|
||||
var_dump(define(array(1,2,3,4,5), 1));
|
||||
var_dump(define(" ", 1));
|
||||
var_dump(define("[[[", 2));
|
||||
var_dump(define("test const", 3));
|
||||
var_dump(define("test const", 3));
|
||||
var_dump(define("test", array(1)));
|
||||
var_dump(define("test1", new stdclass));
|
||||
|
||||
var_dump(constant(" "));
|
||||
var_dump(constant("[[["));
|
||||
var_dump(constant("test const"));
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: define() expects at least 2 parameters, 0 given in %s on line %d
|
||||
NULL
|
||||
|
||||
Warning: define() expects at least 2 parameters, 1 given in %s on line %d
|
||||
NULL
|
||||
bool(true)
|
||||
|
||||
Warning: define() expects parameter 3 to be boolean, array given in %s on line %d
|
||||
NULL
|
||||
|
||||
Warning: define() expects parameter 1 to be string (Unicode or binary), array given in %s on line %d
|
||||
NULL
|
||||
bool(true)
|
||||
bool(true)
|
||||
bool(true)
|
||||
|
||||
Notice: Constant test const already defined in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: Constants may only evaluate to scalar values in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: Constants may only evaluate to scalar values in %s on line %d
|
||||
bool(false)
|
||||
int(1)
|
||||
int(2)
|
||||
int(3)
|
||||
Done
|
||||
@@ -1,48 +0,0 @@
|
||||
--TEST--
|
||||
get_class() tests
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class foo {
|
||||
function bar () {
|
||||
var_dump(get_class());
|
||||
}
|
||||
}
|
||||
|
||||
class foo2 extends foo {
|
||||
}
|
||||
|
||||
foo::bar();
|
||||
foo2::bar();
|
||||
|
||||
$f1 = new foo;
|
||||
$f2 = new foo2;
|
||||
|
||||
$f1->bar();
|
||||
$f2->bar();
|
||||
|
||||
var_dump(get_class());
|
||||
var_dump(get_class("qwerty"));
|
||||
|
||||
var_dump(get_class($f1));
|
||||
var_dump(get_class($f2));
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Strict Standards: Non-static method foo::bar() should not be called statically in %s on line %d
|
||||
unicode(3) "foo"
|
||||
|
||||
Strict Standards: Non-static method foo::bar() should not be called statically in %s on line %d
|
||||
unicode(3) "foo"
|
||||
unicode(3) "foo"
|
||||
unicode(3) "foo"
|
||||
|
||||
Warning: get_class() called without object from outside a class in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: get_class() expects parameter 1 to be object, Unicode string given in %s on line %d
|
||||
bool(false)
|
||||
unicode(3) "foo"
|
||||
unicode(4) "foo2"
|
||||
Done
|
||||
@@ -1,59 +0,0 @@
|
||||
--TEST--
|
||||
get_parent_class() tests
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
interface i {
|
||||
function test();
|
||||
}
|
||||
|
||||
class foo implements i {
|
||||
function test() {
|
||||
var_dump(get_parent_class());
|
||||
}
|
||||
}
|
||||
|
||||
class bar extends foo {
|
||||
function test_bar() {
|
||||
var_dump(get_parent_class());
|
||||
}
|
||||
}
|
||||
|
||||
$bar = new bar;
|
||||
$foo = new foo;
|
||||
|
||||
$foo->test();
|
||||
$bar->test();
|
||||
$bar->test_bar();
|
||||
|
||||
var_dump(get_parent_class($bar));
|
||||
var_dump(get_parent_class($foo));
|
||||
var_dump(get_parent_class("bar"));
|
||||
var_dump(get_parent_class("foo"));
|
||||
var_dump(get_parent_class("i"));
|
||||
|
||||
var_dump(get_parent_class(""));
|
||||
var_dump(get_parent_class("[[[["));
|
||||
var_dump(get_parent_class(" "));
|
||||
var_dump(get_parent_class(new stdclass));
|
||||
var_dump(get_parent_class(array()));
|
||||
var_dump(get_parent_class(1));
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECT--
|
||||
bool(false)
|
||||
bool(false)
|
||||
unicode(3) "foo"
|
||||
unicode(3) "foo"
|
||||
bool(false)
|
||||
unicode(3) "foo"
|
||||
bool(false)
|
||||
bool(false)
|
||||
bool(false)
|
||||
bool(false)
|
||||
bool(false)
|
||||
bool(false)
|
||||
bool(false)
|
||||
bool(false)
|
||||
Done
|
||||
@@ -1,89 +0,0 @@
|
||||
--TEST--
|
||||
property_exists() tests
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class foo {
|
||||
public $pp1 = 1;
|
||||
private $pp2 = 2;
|
||||
protected $pp3 = 3;
|
||||
|
||||
function bar() {
|
||||
var_dump(property_exists("foo","pp1"));
|
||||
var_dump(property_exists("foo","pp2"));
|
||||
var_dump(property_exists("foo","pp3"));
|
||||
}
|
||||
}
|
||||
|
||||
class bar extends foo {
|
||||
function test() {
|
||||
var_dump(property_exists("foo","pp1"));
|
||||
var_dump(property_exists("foo","pp2"));
|
||||
var_dump(property_exists("foo","pp3"));
|
||||
}
|
||||
}
|
||||
|
||||
var_dump(property_exists());
|
||||
var_dump(property_exists(""));
|
||||
var_dump(property_exists("foo","pp1"));
|
||||
var_dump(property_exists("foo","pp2"));
|
||||
var_dump(property_exists("foo","pp3"));
|
||||
var_dump(property_exists("foo","nonexistent"));
|
||||
var_dump(property_exists("fo","nonexistent"));
|
||||
var_dump(property_exists("foo",""));
|
||||
var_dump(property_exists("","test"));
|
||||
var_dump(property_exists("",""));
|
||||
|
||||
$foo = new foo;
|
||||
|
||||
var_dump(property_exists($foo,"pp1"));
|
||||
var_dump(property_exists($foo,"pp2"));
|
||||
var_dump(property_exists($foo,"pp3"));
|
||||
var_dump(property_exists($foo,"nonexistent"));
|
||||
var_dump(property_exists($foo,""));
|
||||
var_dump(property_exists(array(),"test"));
|
||||
var_dump(property_exists(1,"test"));
|
||||
var_dump(property_exists(true,"test"));
|
||||
|
||||
$foo->bar();
|
||||
|
||||
$bar = new bar;
|
||||
$bar->test();
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: property_exists() expects exactly 2 parameters, 0 given in %s on line %d
|
||||
NULL
|
||||
|
||||
Warning: property_exists() expects exactly 2 parameters, 1 given in %s on line %d
|
||||
NULL
|
||||
bool(true)
|
||||
bool(true)
|
||||
bool(true)
|
||||
bool(false)
|
||||
bool(false)
|
||||
bool(false)
|
||||
bool(false)
|
||||
bool(false)
|
||||
bool(true)
|
||||
bool(true)
|
||||
bool(true)
|
||||
bool(false)
|
||||
bool(false)
|
||||
|
||||
Warning: First parameter must either be an object or the name of an existing class in %s on line %d
|
||||
NULL
|
||||
|
||||
Warning: First parameter must either be an object or the name of an existing class in %s on line %d
|
||||
NULL
|
||||
|
||||
Warning: First parameter must either be an object or the name of an existing class in %s on line %d
|
||||
NULL
|
||||
bool(true)
|
||||
bool(true)
|
||||
bool(true)
|
||||
bool(true)
|
||||
bool(true)
|
||||
bool(true)
|
||||
Done
|
||||
@@ -1,34 +0,0 @@
|
||||
--TEST--
|
||||
class_exists() tests
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class foo {
|
||||
}
|
||||
|
||||
var_dump(class_exists());
|
||||
var_dump(class_exists("qwerty"));
|
||||
var_dump(class_exists(""));
|
||||
var_dump(class_exists(array()));
|
||||
var_dump(class_exists("test", false));
|
||||
var_dump(class_exists("foo", false));
|
||||
var_dump(class_exists("foo"));
|
||||
var_dump(class_exists("stdClass", false));
|
||||
var_dump(class_exists("stdClass"));
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: class_exists() expects at least 1 parameter, 0 given in %s on line %d
|
||||
NULL
|
||||
bool(false)
|
||||
bool(false)
|
||||
|
||||
Warning: class_exists() expects parameter 1 to be string (Unicode or binary), array given in %s on line %d
|
||||
NULL
|
||||
bool(false)
|
||||
bool(true)
|
||||
bool(true)
|
||||
bool(true)
|
||||
bool(true)
|
||||
Done
|
||||
@@ -1,34 +0,0 @@
|
||||
--TEST--
|
||||
interface_exists() tests
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
interface foo {
|
||||
}
|
||||
|
||||
var_dump(interface_exists());
|
||||
var_dump(interface_exists("qwerty"));
|
||||
var_dump(interface_exists(""));
|
||||
var_dump(interface_exists(array()));
|
||||
var_dump(interface_exists("test", false));
|
||||
var_dump(interface_exists("foo", false));
|
||||
var_dump(interface_exists("foo"));
|
||||
var_dump(interface_exists("stdClass", false));
|
||||
var_dump(interface_exists("stdClass"));
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: interface_exists() expects at least 1 parameter, 0 given in %s on line %d
|
||||
NULL
|
||||
bool(false)
|
||||
bool(false)
|
||||
|
||||
Warning: interface_exists() expects parameter 1 to be string (Unicode or binary), array given in %s on line %d
|
||||
NULL
|
||||
bool(false)
|
||||
bool(true)
|
||||
bool(true)
|
||||
bool(false)
|
||||
bool(false)
|
||||
Done
|
||||
@@ -1,3 +0,0 @@
|
||||
<?php
|
||||
/* dummy file for 014.phpt */
|
||||
?>
|
||||
@@ -1,52 +0,0 @@
|
||||
--TEST--
|
||||
get_included_files() tests
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
var_dump(get_included_files());
|
||||
|
||||
include(dirname(__FILE__)."/014.inc");
|
||||
var_dump(get_included_files());
|
||||
|
||||
var_dump(get_included_files(1,1));
|
||||
|
||||
include_once(dirname(__FILE__)."/014.inc");
|
||||
var_dump(get_included_files());
|
||||
|
||||
var_dump(get_included_files(1));
|
||||
|
||||
include(dirname(__FILE__)."/014.inc");
|
||||
var_dump(get_included_files());
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
array(1) {
|
||||
[0]=>
|
||||
unicode(%d) "%s"
|
||||
}
|
||||
array(2) {
|
||||
[0]=>
|
||||
unicode(%d) "%s"
|
||||
[1]=>
|
||||
unicode(%d) "%s"
|
||||
}
|
||||
|
||||
Warning: get_included_files() expects exactly 0 parameters, 2 given in %s on line %d
|
||||
NULL
|
||||
array(2) {
|
||||
[0]=>
|
||||
unicode(%d) "%s"
|
||||
[1]=>
|
||||
unicode(%d) "%s"
|
||||
}
|
||||
|
||||
Warning: get_included_files() expects exactly 0 parameters, 1 given in %s on line %d
|
||||
NULL
|
||||
array(2) {
|
||||
[0]=>
|
||||
unicode(%d) "%s"
|
||||
[1]=>
|
||||
unicode(%d) "%s"
|
||||
}
|
||||
Done
|
||||
@@ -1,37 +0,0 @@
|
||||
--TEST--
|
||||
trigger_error() tests
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
var_dump(trigger_error());
|
||||
var_dump(trigger_error("error"));
|
||||
var_dump(trigger_error(array()));
|
||||
var_dump(trigger_error("error", -1));
|
||||
var_dump(trigger_error("error", 0));
|
||||
var_dump(trigger_error("error", E_USER_WARNING));
|
||||
var_dump(trigger_error("error", E_USER_DEPRECATED));
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: trigger_error() expects at least 1 parameter, 0 given in %s on line %d
|
||||
NULL
|
||||
|
||||
Notice: error in %s on line %d
|
||||
bool(true)
|
||||
|
||||
Warning: trigger_error() expects parameter 1 to be string (Unicode or binary), array given in %s on line %d
|
||||
NULL
|
||||
|
||||
Warning: Invalid error type specified in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: Invalid error type specified in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: error in %s on line %d
|
||||
bool(true)
|
||||
|
||||
Deprecated: error in %s on line %d
|
||||
bool(true)
|
||||
Done
|
||||
@@ -1,12 +0,0 @@
|
||||
--TEST--
|
||||
isset() with object properties when operating on non-object
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$foo = NULL;
|
||||
isset($foo->bar->bar);
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECT--
|
||||
Done
|
||||
@@ -1,86 +0,0 @@
|
||||
--TEST--
|
||||
builtin functions tests
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
var_dump(get_resource_type());
|
||||
var_dump(get_resource_type(""));
|
||||
$fp = fopen(__FILE__, "r");
|
||||
var_dump(get_resource_type($fp));
|
||||
fclose($fp);
|
||||
var_dump(get_resource_type($fp));
|
||||
|
||||
var_dump(gettype(get_loaded_extensions()));
|
||||
var_dump(count(get_loaded_extensions()));
|
||||
var_dump(gettype(get_loaded_extensions(true)));
|
||||
var_dump(count(get_loaded_extensions(true)));
|
||||
var_dump(get_loaded_extensions(true, true));
|
||||
|
||||
define("USER_CONSTANT", "test");
|
||||
|
||||
var_dump(get_defined_constants(true, true));
|
||||
var_dump(gettype(get_defined_constants(true)));
|
||||
var_dump(gettype(get_defined_constants()));
|
||||
var_dump(count(get_defined_constants()));
|
||||
|
||||
function test () {
|
||||
}
|
||||
|
||||
var_dump(get_defined_functions(true));
|
||||
var_dump(gettype(get_defined_functions()));
|
||||
var_dump(count(get_defined_functions()));
|
||||
|
||||
var_dump(get_declared_interfaces(true));
|
||||
var_dump(gettype(get_declared_interfaces()));
|
||||
var_dump(count(get_declared_interfaces()));
|
||||
|
||||
var_dump(get_extension_funcs());
|
||||
var_dump(get_extension_funcs(true));
|
||||
var_dump(gettype(get_extension_funcs("standard")));
|
||||
var_dump(count(get_extension_funcs("standard")));
|
||||
var_dump(gettype(get_extension_funcs("zend")));
|
||||
var_dump(count(get_extension_funcs("zend")));
|
||||
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: get_resource_type() expects exactly 1 parameter, 0 given in %s on line %d
|
||||
NULL
|
||||
|
||||
Warning: get_resource_type() expects parameter 1 to be resource, Unicode string given in %s on line %d
|
||||
NULL
|
||||
unicode(6) "stream"
|
||||
unicode(7) "Unknown"
|
||||
unicode(5) "array"
|
||||
int(%d)
|
||||
unicode(5) "array"
|
||||
int(0)
|
||||
|
||||
Warning: get_loaded_extensions() expects at most 1 parameter, 2 given in %s on line %d
|
||||
NULL
|
||||
|
||||
Warning: get_defined_constants() expects at most 1 parameter, 2 given in %s on line %d
|
||||
NULL
|
||||
unicode(5) "array"
|
||||
unicode(5) "array"
|
||||
int(%d)
|
||||
|
||||
Warning: get_defined_functions() expects exactly 0 parameters, 1 given in %s on line %d
|
||||
NULL
|
||||
unicode(5) "array"
|
||||
int(%d)
|
||||
|
||||
Warning: get_declared_interfaces() expects exactly 0 parameters, 1 given in %s on line %d
|
||||
NULL
|
||||
unicode(5) "array"
|
||||
int(%d)
|
||||
|
||||
Warning: get_extension_funcs() expects exactly 1 parameter, 0 given in %s on line %d
|
||||
NULL
|
||||
bool(false)
|
||||
unicode(5) "array"
|
||||
int(%d)
|
||||
unicode(5) "array"
|
||||
int(%d)
|
||||
Done
|
||||
@@ -1,34 +0,0 @@
|
||||
--TEST--
|
||||
constant() tests
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
var_dump(constant());
|
||||
var_dump(constant("", ""));
|
||||
var_dump(constant(""));
|
||||
|
||||
var_dump(constant(array()));
|
||||
|
||||
define("TEST_CONST", 1);
|
||||
var_dump(constant("TEST_CONST"));
|
||||
|
||||
define("TEST_CONST2", "test");
|
||||
var_dump(constant("TEST_CONST2"));
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: constant() expects exactly 1 parameter, 0 given in %s on line %d
|
||||
NULL
|
||||
|
||||
Warning: constant() expects exactly 1 parameter, 2 given in %s on line %d
|
||||
NULL
|
||||
|
||||
Warning: constant(): Couldn't find constant in %s on line %d
|
||||
NULL
|
||||
|
||||
Warning: constant() expects parameter 1 to be string (Unicode or binary), array given in %s on line %d
|
||||
NULL
|
||||
int(1)
|
||||
unicode(4) "test"
|
||||
Done
|
||||
-1333
File diff suppressed because it is too large.
Load diff
Loaded 100 of 14823 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user