mirror of
https://github.com/bdnugget/php-src.git
synced 2026-11-23 17:05:42 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a286e992fd | ||
|
|
6118b0b738 | ||
|
|
2fe662392a | ||
|
|
7a48dfb28e | ||
|
|
67bf61b087 | ||
|
|
e3d3eaddf1 | ||
|
|
c4bf1f8f65 | ||
|
|
e1d1c8d901 | ||
|
|
805a596542 | ||
|
|
5663cf0e81 | ||
|
|
a14f4684a1 | ||
|
|
1b12c6b362 | ||
|
|
cb49e8b1ce | ||
|
|
d2928e0af0 | ||
|
|
f3396e9ef2 | ||
|
|
a613be3e96 | ||
|
|
8cdc2fec19 | ||
|
|
c9b44080d2 | ||
|
|
5c8567e212 | ||
|
|
d56d1de230 | ||
|
|
6a12eef216 | ||
|
|
0a4ced10ed | ||
|
|
7d48c9c32d | ||
|
|
b2a62cf620 | ||
|
|
91f51b34d4 | ||
|
|
2748841db5 | ||
|
|
921d5d6a30 | ||
|
|
77687e57bf | ||
|
|
a8ec99c299 | ||
|
|
e2fccffa2d | ||
|
|
1a429389b7 | ||
|
|
0f8e764685 | ||
|
|
d6416633d2 | ||
|
|
296b11c9fb | ||
|
|
c091e91140 | ||
|
|
fe15677f4e | ||
|
|
fe86da56e8 | ||
|
|
1442b416a8 | ||
|
|
6b4bd35d11 | ||
|
|
a7f8fb3461 | ||
|
|
582697ae5c | ||
|
|
811b268fb1 | ||
|
|
43c40d602b | ||
|
|
3e4ea8305d | ||
|
|
37485d4d38 | ||
|
|
756018250f | ||
|
|
af5c1b862d | ||
|
|
0660599ae2 | ||
|
|
e13089d1da | ||
|
|
20251c4f37 | ||
|
|
8108a04110 | ||
|
|
09cdac3d98 | ||
|
|
27586a947a | ||
|
|
6368b9fc66 | ||
|
|
bedb66ba33 | ||
|
|
7394b3734b | ||
|
|
8c9a6e1436 | ||
|
|
65a055397f | ||
|
|
d415b23ff6 | ||
|
|
416122f885 | ||
|
|
256d015dd5 | ||
|
|
7e9d0f7898 | ||
|
|
b5937e49d8 | ||
|
|
b5e227d4c5 | ||
|
|
a105687232 | ||
|
|
b9a9d572d8 | ||
|
|
5b9ce68207 | ||
|
|
98f0b33836 | ||
|
|
74a947383f | ||
|
|
084e58fa8b | ||
|
|
07bcc295c4 | ||
|
|
5b80f925cf | ||
|
|
008173f899 | ||
|
|
37d8de4ba6 | ||
|
|
7256d2ca6a | ||
|
|
c8df0dcb0a | ||
|
|
e8c97542bf | ||
|
|
33a4feed28 | ||
|
|
776ebe8f1f | ||
|
|
3fc55e77e6 | ||
|
|
a012d5a5dc | ||
|
|
da3d88851d | ||
|
|
3e52976f30 | ||
|
|
4d93757dca | ||
|
|
b56adc718b | ||
|
|
36adf916d9 | ||
|
|
3f5f747d90 | ||
|
|
ae82f51fc0 | ||
|
|
bfb55aa96d | ||
|
|
fbd2655dff | ||
|
|
bbef4e8da2 | ||
|
|
250543afc9 | ||
|
|
553245e48d | ||
|
|
94d9d3f920 | ||
|
|
1ace2e5ac7 | ||
|
|
047f1a26a0 | ||
|
|
a8aaf58df3 | ||
|
|
3d7b5b792e | ||
|
|
ad6e24cfb1 | ||
|
|
f10ce39b79 | ||
|
|
f487c128cc | ||
|
|
62ee4aa49f | ||
|
|
a62134d159 | ||
|
|
c883ae3d1f | ||
|
|
84bd08261f | ||
|
|
c216440f1c | ||
|
|
f3bc8a341b | ||
|
|
8d1c55499d | ||
|
|
49afbfac4a | ||
|
|
bd07142b91 | ||
|
|
6cd2919f3d | ||
|
|
a90af34542 | ||
|
|
b8e9edcce3 | ||
|
|
bcc8aad178 | ||
|
|
8993ccd75c | ||
|
|
5ee2605386 | ||
|
|
1a45dcf5ea | ||
|
|
8c142dd228 | ||
|
|
3ba37514df | ||
|
|
d7cc37874c | ||
|
|
c07ee38ff3 | ||
|
|
5f2280e9f8 | ||
|
|
56adfe1f3c | ||
|
|
a39d2b5747 | ||
|
|
a2b38741a1 | ||
|
|
5cc18c9967 | ||
|
|
9b4400830f | ||
|
|
916806055c | ||
|
|
25203ef3bc | ||
|
|
ba31cb7b88 | ||
|
|
f3ffd7b3f9 | ||
|
|
274e37db02 | ||
|
|
1ecb6ccd16 | ||
|
|
5be2acc65d | ||
|
|
ffbe3b0816 | ||
|
|
d74acc15cc | ||
|
|
437786b115 | ||
|
|
f262d06686 | ||
|
|
0d7b5257a8 | ||
|
|
1d9846b54a | ||
|
|
5d694d0474 | ||
|
|
0d144466a8 | ||
|
|
e6dad2a5c3 | ||
|
|
e862541306 | ||
|
|
d0b22dc5c8 | ||
|
|
5fa9eaca9a | ||
|
|
10b6108ac1 | ||
|
|
b350e15f3c | ||
|
|
8392ed2358 | ||
|
|
e1d798465b | ||
|
|
63244c0e3d | ||
|
|
54f777ef1c | ||
|
|
af6894dc7b | ||
|
|
885d8e8733 | ||
|
|
a326342b93 | ||
|
|
4b550d43ef | ||
|
|
e522104f1d | ||
|
|
71121a02b1 | ||
|
|
13ea8afdc5 | ||
|
|
d2f43d60f9 | ||
|
|
a922fbb89c | ||
|
|
8ae159da78 | ||
|
|
ab90623f49 | ||
|
|
7e81e9619e | ||
|
|
be5e7382ef | ||
|
|
cebd47134a | ||
|
|
b20bb1137b | ||
|
|
2cdf30c490 | ||
|
|
e6e21db0a8 | ||
|
|
aeaba53b0b | ||
|
|
b103d7ba75 | ||
|
|
233bb83463 | ||
|
|
938859d87c | ||
|
|
9045591353 | ||
|
|
f2d8033436 | ||
|
|
de74e9b003 | ||
|
|
96abb7e0a5 | ||
|
|
6e529c486a | ||
|
|
459631d679 | ||
|
|
f468d909a1 | ||
|
|
cfe99e0e98 | ||
|
|
11fb10b74d | ||
|
|
77d0be75a8 | ||
|
|
905505d0f0 | ||
|
|
59146cb2b8 | ||
|
|
24e352a0fd | ||
|
|
b935312966 | ||
|
|
4b0d2f3b71 | ||
|
|
05e84a25aa | ||
|
|
04e8936f21 | ||
|
|
f4f090ccbe | ||
|
|
ceca9448a9 | ||
|
|
3308133d4a | ||
|
|
e9d101a685 | ||
|
|
908e2c4650 | ||
|
|
547796ae72 | ||
|
|
54a9f3cb5b | ||
|
|
07d3b15863 | ||
|
|
a9f320390e | ||
|
|
435e835bbf | ||
|
|
d47d7e20ef | ||
|
|
8231031995 | ||
|
|
b4360b0aba | ||
|
|
fbe6a29b11 | ||
|
|
a7c628ef33 | ||
|
|
051997039a | ||
|
|
3e3f10efbb | ||
|
|
c298ea82ca | ||
|
|
8190860776 | ||
|
|
40aa1c6e73 | ||
|
|
f06bb200e5 | ||
|
|
d9fb0a4da5 | ||
|
|
44186c14a4 | ||
|
|
c17a1a7645 | ||
|
|
34af036d8e | ||
|
|
10af23e641 | ||
|
|
2211aac68f | ||
|
|
b75c100dc6 | ||
|
|
349c0cc61c | ||
|
|
e7df907a10 | ||
|
|
a7d70ccebf | ||
|
|
419a87ddd8 | ||
|
|
4e502a7fc2 | ||
|
|
b31a857c83 | ||
|
|
5e759d980e | ||
|
|
09d4b25070 | ||
|
|
8054e6d951 | ||
|
|
54b442330c | ||
|
|
324ea3636d | ||
|
|
61967a0318 | ||
|
|
4bb461b3d5 | ||
|
|
1c840f70e2 | ||
|
|
fd1125627a | ||
|
|
3b6bf6ab58 | ||
|
|
15531b60fc | ||
|
|
c8dfe73903 | ||
|
|
9acc7d2fd8 | ||
|
|
d217efa8b6 | ||
|
|
64a60d5d70 | ||
|
|
2b321fb6ed | ||
|
|
2e680913da | ||
|
|
beb6c638d9 | ||
|
|
0955c58d8e | ||
|
|
0b5a97681a | ||
|
|
0c607c2ecd | ||
|
|
cda9aeba03 | ||
|
|
d01de96f9a | ||
|
|
0542a6f2c2 | ||
|
|
7c5e901f4d | ||
|
|
6f475c1ce6 | ||
|
|
5bdea6fa79 | ||
|
|
04a262ffe2 | ||
|
|
2ab994fe0c | ||
|
|
85cab5a838 | ||
|
|
9d44f00a6d | ||
|
|
e05a7a90c9 | ||
|
|
ae9dcb1799 | ||
|
|
82a60c6538 | ||
|
|
870c5434fe | ||
|
|
94be5fd002 | ||
|
|
d231b908a1 | ||
|
|
b25e990ffd | ||
|
|
6b46618a76 | ||
|
|
b3726eb497 | ||
|
|
eae934a6b7 | ||
|
|
5bf33a2e83 | ||
|
|
2cb6431c2f | ||
|
|
17d094d5bb | ||
|
|
79f25b32a1 | ||
|
|
e8cbe865f3 | ||
|
|
f01a236c09 | ||
|
|
3bee739456 | ||
|
|
126cd77070 | ||
|
|
c3bd38ba9b | ||
|
|
f42d1090bb | ||
|
|
33372e4d5d | ||
|
|
b7fe870f06 | ||
|
|
22251bfa5b | ||
|
|
54ec8b914f | ||
|
|
aa9bfc06e7 | ||
|
|
4e1e2eadec | ||
|
|
4f45d300fb | ||
|
|
8a7c2ff618 | ||
|
|
322d1e5439 | ||
|
|
10f83680b0 | ||
|
|
8abcdde864 | ||
|
|
83a37cefc1 | ||
|
|
d49832983a | ||
|
|
4835d49c86 | ||
|
|
4337c68030 | ||
|
|
e06e987eb4 | ||
|
|
9819666a00 | ||
|
|
384625408b | ||
|
|
4baa8ee0bc | ||
|
|
6aa5793baf | ||
|
|
5dff4e8e40 | ||
|
|
26d147a798 | ||
|
|
d24c272e50 | ||
|
|
e48794e58b | ||
|
|
418c15ef14 | ||
|
|
37ebffee0c | ||
|
|
4acc981ac4 | ||
|
|
bdd787626d | ||
|
|
3250e630a3 | ||
|
|
2b3b798d7d | ||
|
|
e8812b2845 | ||
|
|
516c2aa7da | ||
|
|
8126952c99 | ||
|
|
b290efa0d3 | ||
|
|
e53ed77075 | ||
|
|
906b0b4235 | ||
|
|
d7852a4930 | ||
|
|
2d701541b4 | ||
|
|
f5f0390dbf | ||
|
|
86b2558a5e | ||
|
|
b539bb6a07 | ||
|
|
5e496cc0e7 | ||
|
|
35514292fe | ||
|
|
a402f5e87e | ||
|
|
da481f3189 | ||
|
|
5adf49c135 | ||
|
|
8d54c95ef7 | ||
|
|
1a88427263 | ||
|
|
3259aad229 | ||
|
|
43765f49f7 | ||
|
|
a5b1ec723d | ||
|
|
4e01e392ff | ||
|
|
f744272c52 | ||
|
|
ce647ba16a | ||
|
|
a8bdff6998 | ||
|
|
8b987b185f | ||
|
|
607b7b35e5 | ||
|
|
8235ce2f20 | ||
|
|
ac7c553f0d | ||
|
|
eb54f96a0b | ||
|
|
e7ecd526c5 | ||
|
|
3161e32a9f | ||
|
|
ba2f3ac0e6 | ||
|
|
ee1569d310 | ||
|
|
b386cdbdd7 | ||
|
|
f61068721b | ||
|
|
b1aaab7355 | ||
|
|
6cddc39be1 | ||
|
|
0bd88170f5 | ||
|
|
ef9d20d638 | ||
|
|
d77a14814f | ||
|
|
5fe94dfb5e | ||
|
|
75e9fd0909 | ||
|
|
f7f3d1c31e | ||
|
|
1d9e3a760d | ||
|
|
f0208d3afa | ||
|
|
cb9873f4a4 | ||
|
|
1778b00928 | ||
|
|
c92a084e39 | ||
|
|
b689d32d18 | ||
|
|
367868fa7e | ||
|
|
94d4fb4249 | ||
|
|
aabd63044c | ||
|
|
c1b0b3781f | ||
|
|
a2aedfdf00 | ||
|
|
ed4ddfe263 | ||
|
|
0f3cce53ad | ||
|
|
6880dcb0d4 | ||
|
|
1842fc7a42 | ||
|
|
7ffde39f44 | ||
|
|
99dd5c22d1 | ||
|
|
0a919c89da | ||
|
|
1a27ca62a8 | ||
|
|
235f05dafd | ||
|
|
ae366c348a | ||
|
|
203981a031 | ||
|
|
8efade7894 | ||
|
|
e733c33f37 | ||
|
|
120cba9504 | ||
|
|
873e694ccd | ||
|
|
a04ad392ff | ||
|
|
7f28203b56 | ||
|
|
c5874b6297 | ||
|
|
51179248d5 | ||
|
|
963e442e10 | ||
|
|
0d91c5eda9 | ||
|
|
4e6ebdbeda | ||
|
|
641152c54b | ||
|
|
c35b9949f7 | ||
|
|
3c8424457d | ||
|
|
706ba12284 | ||
|
|
c82421d48e | ||
|
|
83343aacc3 | ||
|
|
4cfd9d0440 | ||
|
|
132760f0eb | ||
|
|
e88524aa26 | ||
|
|
4c7a56f564 | ||
|
|
03096147f6 | ||
|
|
ac29fcffc0 | ||
|
|
ae343cc715 | ||
|
|
5abc423112 | ||
|
|
f5dbe5a0cb | ||
|
|
bdd4cf7979 | ||
|
|
f4f3bb6418 | ||
|
|
01b9a94d41 | ||
|
|
cd3b8c3de4 | ||
|
|
bf2bee53f7 | ||
|
|
4984c16261 | ||
|
|
19f071ea5a | ||
|
|
b02e734f15 | ||
|
|
58b20e71d1 | ||
|
|
d825ced844 | ||
|
|
4291c701a8 | ||
|
|
9c1186c39b | ||
|
|
4c17c6aca6 | ||
|
|
a4b09f8259 | ||
|
|
bea4e52ae9 | ||
|
|
17362b6600 | ||
|
|
a819cbc869 | ||
|
|
310a945151 | ||
|
|
b8f8302bbc | ||
|
|
33406179c3 | ||
|
|
f41e4f8e4d | ||
|
|
cbe8634bbe | ||
|
|
73ab72bfbb | ||
|
|
976ed18082 | ||
|
|
d273e9a113 | ||
|
|
e4fdaec6a5 | ||
|
|
7e53013c34 | ||
|
|
a80a5cf98d | ||
|
|
6634ee0145 | ||
|
|
b9ff04703f | ||
|
|
52adad71e7 | ||
|
|
ebe468c145 | ||
|
|
5f0a65bd36 | ||
|
|
1fc5fc9ccd | ||
|
|
99616e50af | ||
|
|
34c6f253c3 | ||
|
|
6675c76d58 | ||
|
|
ae546e85b8 | ||
|
|
f6b1919e3f | ||
|
|
65b8e527a6 | ||
|
|
201517f12b | ||
|
|
cf68478f8e | ||
|
|
1f0bf51cbe | ||
|
|
3c786b4a52 | ||
|
|
66a29f649f | ||
|
|
18fd322943 | ||
|
|
7f223f76c6 | ||
|
|
a4108b7189 | ||
|
|
d946ca1d7f | ||
|
|
0443ce7bc9 | ||
|
|
2ccc66582b | ||
|
|
274d13f151 | ||
|
|
a40637da0e | ||
|
|
b4035f926c | ||
|
|
44f94fee4a | ||
|
|
66add9f4fd | ||
|
|
4186ba86bc | ||
|
|
a58c381ade | ||
|
|
c99464da72 | ||
|
|
1955451412 | ||
|
|
36bcea7339 | ||
|
|
7389f038ce | ||
|
|
2c6e4400a6 | ||
|
|
dd49025fd8 | ||
|
|
5d96f268f8 | ||
|
|
f025d57413 | ||
|
|
ad9eec0fe3 | ||
|
|
7685080491 | ||
|
|
0bdc90293d | ||
|
|
ba9e6cf6da | ||
|
|
3ac69c47a4 | ||
|
|
a2cae4e9ea | ||
|
|
c5fbd1a544 | ||
|
|
c7c42fa501 | ||
|
|
12d6522570 | ||
|
|
c9fabbe45d | ||
|
|
c1aa774082 | ||
|
|
41dde12bbd | ||
|
|
72b45bdab0 | ||
|
|
8078fc1f6d | ||
|
|
853f2aaf0c | ||
|
|
45afe262b1 | ||
|
|
099304b079 | ||
|
|
13b70db43e | ||
|
|
7297a25365 | ||
|
|
68d8b91b7f | ||
|
|
c8d9dc3ac8 | ||
|
|
3263c9c778 | ||
|
|
91918cf963 | ||
|
|
4f813bc3f6 | ||
|
|
d3a5984f48 | ||
|
|
16daecc307 | ||
|
|
edbeacf479 | ||
|
|
5d6bbfa8e3 | ||
|
|
b794f9a7f3 | ||
|
|
148186afaf | ||
|
|
6c9e73f72b | ||
|
|
8ab7643dc6 | ||
|
|
9a17afe331 | ||
|
|
6a8ee8174e | ||
|
|
a1815304b6 | ||
|
|
d05beb69c8 | ||
|
|
6583f0b785 | ||
|
|
9ac48f35bd | ||
|
|
debc74ad74 | ||
|
|
9ed42dbdbb | ||
|
|
3365a94101 | ||
|
|
4cbe8ca0a3 | ||
|
|
39acd18e4b | ||
|
|
f50490b2bc | ||
|
|
4904d5e948 | ||
|
|
65f05f9664 | ||
|
|
a2fb77343d | ||
|
|
2d7fae28ee | ||
|
|
5a5a70fe05 | ||
|
|
795598bf30 | ||
|
|
8d06f63eef | ||
|
|
3bc0c0b7ea | ||
|
|
87c1464ce5 | ||
|
|
8f6a4bee71 | ||
|
|
725dfe2e0a | ||
|
|
a659f7a8eb | ||
|
|
a064487766 | ||
|
|
3c17e392d1 | ||
|
|
001a3117ac | ||
|
|
3ed65da8cb | ||
|
|
9c500be57f | ||
|
|
cfba5aa8ad | ||
|
|
e2af094de1 | ||
|
|
e8d7575733 | ||
|
|
f1d4663bf3 | ||
|
|
e3b9e1e7f9 | ||
|
|
d8f2875be9 | ||
|
|
21c9e2ab8d | ||
|
|
c563365b2f | ||
|
|
e97d0777db | ||
|
|
69c761cc9d | ||
|
|
1839753e7d | ||
|
|
f5223ff699 | ||
|
|
8babcb4284 | ||
|
|
0d38556da8 | ||
|
|
1059806c25 | ||
|
|
68010fd314 | ||
|
|
3bb2ce51c5 | ||
|
|
21ebffa42d | ||
|
|
3fdb372eb6 | ||
|
|
b73e3e5a60 | ||
|
|
04e0ca2d5e | ||
|
|
a1479ff180 | ||
|
|
ae4aa5e1e3 | ||
|
|
dec4b68d88 | ||
|
|
8166520e09 | ||
|
|
4d497d8f02 | ||
|
|
d21cb5b345 | ||
|
|
cb5aa998b9 | ||
|
|
8a7bfba9de | ||
|
|
fffe3c696a | ||
|
|
5279b66616 | ||
|
|
fcde3b066e | ||
|
|
2cdc86e8b4 | ||
|
|
cab8f40c2e | ||
|
|
12374956d0 | ||
|
|
5efb3301b2 | ||
|
|
cbdd728a8d | ||
|
|
5a4d19abe6 | ||
|
|
6cb74fb894 | ||
|
|
c40cb3fce6 | ||
|
|
4ba3d20c88 | ||
|
|
7b5258ab93 | ||
|
|
1d4d921a59 | ||
|
|
0d6c158620 | ||
|
|
74320cba7e | ||
|
|
73346d2f76 | ||
|
|
74b56b1258 | ||
|
|
ac5f1552ff | ||
|
|
93f65e2510 | ||
|
|
4c4bfd3c9b | ||
|
|
ea97c82b97 | ||
|
|
a6e1c3616b | ||
|
|
e1dc8e60a4 | ||
|
|
cda0f6145f | ||
|
|
b700e7a9db | ||
|
|
763006984d | ||
|
|
9bea6b1fb0 | ||
|
|
135d118ce7 | ||
|
|
1b6665b0d9 | ||
|
|
6f7b5eba99 | ||
|
|
ccf618e1dd | ||
|
|
f80035fb65 | ||
|
|
9c44d66034 | ||
|
|
6db67fe4ff | ||
|
|
125c9028a7 | ||
|
|
53e61c7f1f | ||
|
|
da02892d8c | ||
|
|
cd385539a3 | ||
|
|
a718d62f74 | ||
|
|
3931103064 | ||
|
|
238393e58a | ||
|
|
3de8ff865a | ||
|
|
0cb5aa2d53 | ||
|
|
89c61babec | ||
|
|
c5d37e6879 | ||
|
|
9bce9725ce | ||
|
|
fa13af4d59 | ||
|
|
916af07bc8 | ||
|
|
193bdf06d6 | ||
|
|
a3d2a4da0c | ||
|
|
a847d3a9dd | ||
|
|
618e5b21c3 | ||
|
|
3bc9cc5d2d | ||
|
|
da1255b17f | ||
|
|
a2c4aeb659 | ||
|
|
239e693751 | ||
|
|
039dd23c03 | ||
|
|
1d23c4d551 | ||
|
|
2082e22123 | ||
|
|
62f1637939 | ||
|
|
96cae711b9 | ||
|
|
3886f88503 | ||
|
|
d030269743 | ||
|
|
61e2b771d4 | ||
|
|
2e9541bef5 | ||
|
|
43b6cc62b1 | ||
|
|
ab4bfa115c | ||
|
|
3a2fb113bc | ||
|
|
bdad6ef8c1 | ||
|
|
59b098a525 | ||
|
|
a7cb6a8808 | ||
|
|
271e7df5eb | ||
|
|
0a60e71454 | ||
|
|
4163964612 | ||
|
|
29cd249649 | ||
|
|
f444b875b0 | ||
|
|
9327ad7d07 | ||
|
|
74d23c256b | ||
|
|
68aff652b9 | ||
|
|
aa06288173 | ||
|
|
77c460b59f | ||
|
|
d09c0303b8 | ||
|
|
7064084418 | ||
|
|
d605aa7846 | ||
|
|
36a5a19c48 | ||
|
|
71f00b6ab2 | ||
|
|
3bdc15821f | ||
|
|
3222f1defb | ||
|
|
b65cff0f53 | ||
|
|
4e5296741d | ||
|
|
7ec21cca55 | ||
|
|
acab9b33be | ||
|
|
bb7515902c | ||
|
|
8d3bd0f4f7 | ||
|
|
40d8309354 | ||
|
|
62f3ccdea9 | ||
|
|
77598e0382 | ||
|
|
d67ee093e8 | ||
|
|
69644e9272 | ||
|
|
fbb708e211 | ||
|
|
797a132d51 | ||
|
|
3241d7fc46 | ||
|
|
a8a3ae8566 | ||
|
|
f65691dc68 | ||
|
|
91aaefe043 | ||
|
|
e8cd732fb2 | ||
|
|
6a7ed50811 | ||
|
|
bacd5371f4 | ||
|
|
95e9a21e31 | ||
|
|
e1c0bcd35f | ||
|
|
34eb46c6b2 | ||
|
|
67dcd65a57 | ||
|
|
00fa3587ba | ||
|
|
044fba0b64 | ||
|
|
99041df380 | ||
|
|
ee3f17d3ee | ||
|
|
509eca4182 | ||
|
|
6b97f4e98c | ||
|
|
fcf9c0892d | ||
|
|
3c1b0101ef | ||
|
|
7d5b5f3054 | ||
|
|
7a379811d4 | ||
|
|
6749b09d8b | ||
|
|
1a1713a4c7 | ||
|
|
af05fce6b6 | ||
|
|
985122db3b | ||
|
|
216a000ce3 | ||
|
|
3f35f2252d | ||
|
|
480af61b74 | ||
|
|
f67d540a1b | ||
|
|
2452c92c2b | ||
|
|
b6b00a822c | ||
|
|
586f73b1ee | ||
|
|
4bc6ac34ae | ||
|
|
c32445a860 | ||
|
|
0f04dff942 | ||
|
|
70a7fced75 | ||
|
|
47fff9a15d | ||
|
|
50a4e4003a | ||
|
|
e0ffe2f109 | ||
|
|
fa5fbd0a0d | ||
|
|
aac98f3eba | ||
|
|
6f35c85c19 | ||
|
|
5fd210de89 | ||
|
|
49c5edcb9f | ||
|
|
07c6cb2a5b | ||
|
|
9891d3e03d | ||
|
|
c3c311943c | ||
|
|
d0fd3bf62e | ||
|
|
90546a871f | ||
|
|
f2d992c76f | ||
|
|
36b416f514 | ||
|
|
03ba78106d | ||
|
|
c7b537e2c3 | ||
|
|
523d3c122f | ||
|
|
e79de46f3c | ||
|
|
66a74b4c68 | ||
|
|
fd0e9cc044 | ||
|
|
f2dc3a258d | ||
|
|
6330a6078d | ||
|
|
ce726fa710 | ||
|
|
0b640b29d7 | ||
|
|
f0e8e0eae8 | ||
|
|
ef3ed0e4d4 | ||
|
|
6317956d02 | ||
|
|
b1e05a7b4f | ||
|
|
65a2433793 | ||
|
|
a5a29a86df | ||
|
|
7226e7077d | ||
|
|
00c9bd1a33 | ||
|
|
8a340b1572 | ||
|
|
4b03f9f172 | ||
|
|
167c1675b9 | ||
|
|
5ddec61e2d | ||
|
|
77e96aec61 | ||
|
|
9b6a953c91 | ||
|
|
61e90440ce | ||
|
|
0faac783e9 | ||
|
|
95b0546558 | ||
|
|
e5f62e61e6 | ||
|
|
0484413b86 | ||
|
|
59cb64f707 | ||
|
|
af9a8dfaa3 | ||
|
|
01ba76a2ed | ||
|
|
cd067e641a | ||
|
|
1228570437 | ||
|
|
c6b00a1223 | ||
|
|
998a9f4438 | ||
|
|
3959fe2470 | ||
|
|
db5037537b | ||
|
|
88c5b75698 | ||
|
|
c6e0f60774 | ||
|
|
1cae37c3da | ||
|
|
6ab8a6705d | ||
|
|
8c13a77e97 | ||
|
|
f1df31a3fb | ||
|
|
750646d822 | ||
|
|
3f4cf40c45 | ||
|
|
f941d0aeb0 | ||
|
|
331c9a83a3 | ||
|
|
cf476b6a51 | ||
|
|
eacce9faca | ||
|
|
9b68fae9c9 | ||
|
|
c981347ffb | ||
|
|
8360ce27aa | ||
|
|
0bcb369eac | ||
|
|
0c7f673a91 | ||
|
|
02a2e47986 | ||
|
|
3657fef77c | ||
|
|
d75ba00e90 | ||
|
|
1d31caf032 | ||
|
|
a50b0e717f | ||
|
|
b2ccce05e3 | ||
|
|
45a4e123e7 | ||
|
|
8f16f600d5 | ||
|
|
055d1c2134 | ||
|
|
e188ea9d39 | ||
|
|
11031593f3 | ||
|
|
eca839ae19 | ||
|
|
ac70367d73 | ||
|
|
d5830722a5 | ||
|
|
82dae9d9be | ||
|
|
e817baae1e | ||
|
|
7c3962f79d | ||
|
|
2016ad5441 | ||
|
|
67c833661e | ||
|
|
8b765c3c44 | ||
|
|
2daa88cd48 | ||
|
|
32617aea68 | ||
|
|
69d71f67d2 | ||
|
|
f779b01bca | ||
|
|
0036a3e4da | ||
|
|
b2f560dc94 | ||
|
|
501a4edf49 | ||
|
|
c896d7d6d0 | ||
|
|
0285963ec3 | ||
|
|
84a00322eb | ||
|
|
5dbe92d8a7 | ||
|
|
c2e2a30169 | ||
|
|
dee4566360 | ||
|
|
900df55818 | ||
|
|
d0ff60e95f | ||
|
|
98aa5b6eb2 | ||
|
|
4f92686415 | ||
|
|
a2f06a9a3c | ||
|
|
942c837e9f | ||
|
|
890b377094 | ||
|
|
fb5c9e76fc | ||
|
|
d5f88b12c0 | ||
|
|
7dd408c7e5 | ||
|
|
b00c9f4501 | ||
|
|
e81f5ce137 | ||
|
|
6081651c65 | ||
|
|
cbfa37cfad | ||
|
|
797cda2555 | ||
|
|
a540196a41 | ||
|
|
c33bcdda04 | ||
|
|
d85e4ebcc2 | ||
|
|
3b1d4b09da | ||
|
|
36280edc99 | ||
|
|
67bee6eb6e | ||
|
|
7942ff14c4 | ||
|
|
2728e52d58 | ||
|
|
96184fe715 | ||
|
|
5d5e004b34 | ||
|
|
2e67579965 | ||
|
|
f858b30f4e | ||
|
|
094aa8699d | ||
|
|
3d2c4f5670 | ||
|
|
ef3ea48ce0 | ||
|
|
a810fefdde | ||
|
|
2be9172661 | ||
|
|
5c085a9224 | ||
|
|
1665957a8f | ||
|
|
257f58c862 | ||
|
|
c6744a5370 | ||
|
|
643c61277f | ||
|
|
b790562222 | ||
|
|
39f83fc506 | ||
|
|
412fb096fa | ||
|
|
c4c952f023 | ||
|
|
10b2bb1cab | ||
|
|
406847a6cd | ||
|
|
57c5bff123 | ||
|
|
9062b2f967 | ||
|
|
29348ff48b | ||
|
|
2067727a80 | ||
|
|
6fcc1515cb | ||
|
|
08e7f480e1 | ||
|
|
f521b61ce2 | ||
|
|
16bc64121f | ||
|
|
d8cd133a33 | ||
|
|
f1ec84159d | ||
|
|
b9a6022f15 | ||
|
|
b832343962 | ||
|
|
8e3e81256f | ||
|
|
24ec8acb2d | ||
|
|
820516e756 | ||
|
|
09d555e3d0 | ||
|
|
9782bbd297 | ||
|
|
833331a53d | ||
|
|
a9b87039e4 | ||
|
|
327125e313 | ||
|
|
ce886edc0b | ||
|
|
bb3e125185 | ||
|
|
f5722d61b4 | ||
|
|
7d77171b9b | ||
|
|
76d520e9a7 | ||
|
|
aa5feff190 | ||
|
|
16dd07c5e0 | ||
|
|
14c1dc4ab4 | ||
|
|
18079dd248 | ||
|
|
ae5598fa85 | ||
|
|
6183a1ed3e | ||
|
|
177647c99b | ||
|
|
278aee14a5 | ||
|
|
29048d8d7e | ||
|
|
e3b65c75be | ||
|
|
a3858e17e9 | ||
|
|
0d27154a49 | ||
|
|
9ab9402ed9 | ||
|
|
db638b91b3 | ||
|
|
c1c1b21686 | ||
|
|
e62db3b3c8 | ||
|
|
f01310928c | ||
|
|
b003591f19 | ||
|
|
9ae0e91ef4 | ||
|
|
c2c1590d52 | ||
|
|
39916670cc | ||
|
|
14b2c4a1f4 | ||
|
|
2074b6ceee | ||
|
|
120ea84394 | ||
|
|
4ca31d911f | ||
|
|
03a1a3675a | ||
|
|
7052ece4e8 | ||
|
|
f34dafccdb | ||
|
|
65052194b4 | ||
|
|
88d0d5427e | ||
|
|
2c99f0230c | ||
|
|
ea138b85ab | ||
|
|
df93e470cc | ||
|
|
e54698481c | ||
|
|
43004bcaaa | ||
|
|
98c0dd4147 | ||
|
|
85f8b2a830 | ||
|
|
b8c51d4614 | ||
|
|
805fe58a28 | ||
|
|
f5c36b8d9e | ||
|
|
25ab185761 | ||
|
|
e7fcde565b | ||
|
|
6164ea4840 | ||
|
|
470ca9ef6f | ||
|
|
beffd8738e | ||
|
|
bce14e2c6f | ||
|
|
af2ee723dc | ||
|
|
975771b431 | ||
|
|
3f5e121f2b | ||
|
|
a000fe6c06 | ||
|
|
ff8c3d2d67 | ||
|
|
e6df40e831 | ||
|
|
b559075a02 | ||
|
|
1d87b34375 | ||
|
|
942a83b246 | ||
|
|
92689ec8e0 | ||
|
|
dfb664c946 | ||
|
|
8c4eede77d | ||
|
|
4ad82c5ef2 | ||
|
|
ca612d3fc0 | ||
|
|
87fca31a3f | ||
|
|
54b2a4d6a0 | ||
|
|
82a5d700e3 | ||
|
|
982ac8b7a2 | ||
|
|
6aed779dc8 | ||
|
|
69fe08beb2 | ||
|
|
412bae8482 | ||
|
|
27868d1799 | ||
|
|
bb19590b7e | ||
|
|
48dba110e2 | ||
|
|
255f9fc072 | ||
|
|
8f9fa59341 | ||
|
|
872f6e7af8 | ||
|
|
ecca999733 | ||
|
|
38d64188ff | ||
|
|
048aa76cc9 | ||
|
|
5c3249d954 | ||
|
|
b15b80c1b7 | ||
|
|
5facf4becc | ||
|
|
f5ebf71f49 | ||
|
|
7a69f34c69 | ||
|
|
f1b7a88393 | ||
|
|
853d714008 | ||
|
|
077b8f2d25 | ||
|
|
b6bb43ef94 | ||
|
|
6f20f9d285 | ||
|
|
2fb5c4394b | ||
|
|
9ca8a571e9 | ||
|
|
8ee05c9da8 | ||
|
|
a4430a9cfe | ||
|
|
2be03f0d73 | ||
|
|
85fe5f8c34 | ||
|
|
c7f52698c1 | ||
|
|
d775bca68f | ||
|
|
6c763f3721 | ||
|
|
949e461e8f | ||
|
|
59ed068c78 | ||
|
|
d8cd7dac07 | ||
|
|
4945317c28 | ||
|
|
34f4400502 | ||
|
|
259f662488 | ||
|
|
d349734059 | ||
|
|
fa5f20cfce | ||
|
|
435fff2cb1 | ||
|
|
9173e270b0 | ||
|
|
40645cc0a6 | ||
|
|
33e114b37e | ||
|
|
be85bd83e8 | ||
|
|
29099a7470 | ||
|
|
8823289f9f | ||
|
|
78363147b8 | ||
|
|
ac7665fdc2 | ||
|
|
1410d8c0b2 | ||
|
|
5a4158421c | ||
|
|
945115968c | ||
|
|
970f1f9c7f | ||
|
|
65ef16ef31 | ||
|
|
0186acacdb | ||
|
|
bc4a269d3c | ||
|
|
291441a34c | ||
|
|
d8c1e99f02 | ||
|
|
8d0cc271bf | ||
|
|
bbde60d6d2 | ||
|
|
e2b820f0ea | ||
|
|
c970dbb647 | ||
|
|
29c32f04e3 | ||
|
|
00c6777aa1 | ||
|
|
143ae77156 | ||
|
|
87ba25b722 | ||
|
|
dc77b5700c | ||
|
|
0e5c01290d | ||
|
|
ba16543ef5 | ||
|
|
f65e4feda4 | ||
|
|
20181fde3d | ||
|
|
491ed1813e | ||
|
|
caa5dbe679 | ||
|
|
7e6d72f030 | ||
|
|
6ea962c767 | ||
|
|
c87b2d0cee | ||
|
|
c2c31547c2 | ||
|
|
21851b0001 | ||
|
|
bd96cca64f | ||
|
|
02893ad216 | ||
|
|
4f88703159 | ||
|
|
abc62474bf | ||
|
|
3a9754715a | ||
|
|
2f212ab8d5 | ||
|
|
71be1ed5f1 | ||
|
|
1c6896076f | ||
|
|
6a2d265af6 | ||
|
|
6fe9c3735a | ||
|
|
5d43cf4ec4 | ||
|
|
8b3b1eb121 | ||
|
|
836a7b1a88 | ||
|
|
c26edafb17 | ||
|
|
a9bf810ba2 | ||
|
|
a737e92b08 | ||
|
|
54ae55a949 | ||
|
|
5ab53094fa | ||
|
|
aff24aed0d | ||
|
|
b915644ec4 | ||
|
|
28c71a667a | ||
|
|
d45c4f86d3 | ||
|
|
8060534f63 | ||
|
|
80bdf7eae5 | ||
|
|
2dad2b3882 | ||
|
|
aa0a80bea8 | ||
|
|
dec171c4bf | ||
|
|
6d5779844f | ||
|
|
94ed0368b9 | ||
|
|
6c8d9c8c8e | ||
|
|
9de0be49d6 | ||
|
|
5a76218edd | ||
|
|
d84c321376 | ||
|
|
b3262ff512 | ||
|
|
a825563c0b | ||
|
|
da476e0da9 | ||
|
|
46107c39a4 | ||
|
|
a263d88c81 | ||
|
|
9158cd2494 | ||
|
|
2e98f2dd1a | ||
|
|
902b4bda6a | ||
|
|
87b52bb5cd | ||
|
|
e6199b5279 | ||
|
|
e7f995106c | ||
|
|
3bcb1f3af1 | ||
|
|
13a652c81c | ||
|
|
5ddd062e36 | ||
|
|
4bedc6bb31 | ||
|
|
70f94e52ea | ||
|
|
87c3363fa9 | ||
|
|
ca1dc06e04 | ||
|
|
b5ed0a1d3d | ||
|
|
19c8eeb4e8 | ||
|
|
293e62c99d | ||
|
|
2da7dd5982 | ||
|
|
6325b1b630 | ||
|
|
9244e0eee1 | ||
|
|
712d951ffc | ||
|
|
40773632e0 | ||
|
|
88628a2319 | ||
|
|
31120ba5f7 | ||
|
|
75276870db | ||
|
|
fc0b122460 | ||
|
|
d976c362ac | ||
|
|
6c82c26884 | ||
|
|
a0ef3e1865 | ||
|
|
4f91645642 | ||
|
|
46b2bef868 | ||
|
|
26319ee1a1 | ||
|
|
42a8242676 | ||
|
|
57ab773c70 | ||
|
|
219364ee55 | ||
|
|
8b5fc29c7a | ||
|
|
21f4b69b2b | ||
|
|
f76ce400eb | ||
|
|
16204148bb | ||
|
|
1f2d017ae1 | ||
|
|
1b10ad424a | ||
|
|
3e65f6bf57 | ||
|
|
f84d03b2bc | ||
|
|
2db28891e4 | ||
|
|
7adc26fd8b | ||
|
|
fe80df5446 | ||
|
|
8588815ef3 | ||
|
|
a70fc67b0b | ||
|
|
b5c53ae6c7 | ||
|
|
3d018fb061 | ||
|
|
3845e2c145 | ||
|
|
1930c2c33b | ||
|
|
1e2b92b517 | ||
|
|
983fa5a21e | ||
|
|
3ecbb5c314 | ||
|
|
8fa1628958 | ||
|
|
e52b580cad | ||
|
|
4b28e0a8f1 | ||
|
|
91f5ceb3be | ||
|
|
603758b484 | ||
|
|
b6b575c1d5 | ||
|
|
e2f3142c78 | ||
|
|
7623887079 | ||
|
|
1bd6ec4c91 | ||
|
|
33a6aefce8 | ||
|
|
d3f8aaecd8 | ||
|
|
049cca1711 | ||
|
|
a40df45348 | ||
|
|
8f42eaae01 | ||
|
|
ebeefd9f7d | ||
|
|
646f9a4a8b | ||
|
|
b4fa1661af | ||
|
|
ba3c63dbc9 | ||
|
|
350535d498 | ||
|
|
467caa4307 | ||
|
|
01b6956d61 | ||
|
|
61c3a669b4 | ||
|
|
befb6e9b80 | ||
|
|
35e43dabe1 | ||
|
|
b905779950 | ||
|
|
04c32887f1 | ||
|
|
e0a39d68d8 | ||
|
|
92ec8541c1 | ||
|
|
82a7ef78f3 | ||
|
|
236c42c14e | ||
|
|
b8fdc56a8b | ||
|
|
17ad61bd7f | ||
|
|
ec1507ea9d | ||
|
|
69bd1f31fd | ||
|
|
b9d4af72e9 | ||
|
|
fbbc036830 | ||
|
|
c2b0fdd647 | ||
|
|
3706b626fe | ||
|
|
edbfc48fdd | ||
|
|
59c6886c65 | ||
|
|
8091552925 |
No files matched your search
@@ -1,7 +1,8 @@
|
||||
set $zts = 0
|
||||
|
||||
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])
|
||||
if $zts
|
||||
set $eg = ((zend_executor_globals) (*((void ***) tsrm_ls))[executor_globals_id-1])
|
||||
else
|
||||
set $eg = executor_globals
|
||||
end
|
||||
@@ -9,7 +10,7 @@ end
|
||||
|
||||
document ____executor_globals
|
||||
portable way of accessing executor_globals
|
||||
ZTS detection is automatically based on ext/standard module struct
|
||||
type "set $zts = 1" if you use --enable-maintainer-zts on your configure line
|
||||
end
|
||||
|
||||
define dump_bt
|
||||
@@ -43,33 +44,55 @@ document printzv
|
||||
end
|
||||
|
||||
define ____printzv_contents
|
||||
____executor_globals
|
||||
set $zvalue = $arg0
|
||||
set $type = $zvalue->type
|
||||
|
||||
printf "(refcount=%d) ", $zvalue->refcount
|
||||
if $type == 0
|
||||
printf "NULL"
|
||||
if $zvalue.type == 0
|
||||
set $typename = "NULL"
|
||||
end
|
||||
if $type == 1
|
||||
printf "long: %ld", $zvalue->value.lval
|
||||
if $zvalue.type == 1
|
||||
set $typename = "long"
|
||||
end
|
||||
if $type == 2
|
||||
printf "double: %lf", $zvalue->value.dval
|
||||
if $zvalue.type == 2
|
||||
set $typename = "double"
|
||||
end
|
||||
if $type == 3
|
||||
printf "bool: "
|
||||
if $zvalue->value.lval
|
||||
printf "true"
|
||||
else
|
||||
printf "false"
|
||||
end
|
||||
if $zvalue.type == 3
|
||||
set $typename = "string"
|
||||
end
|
||||
if $type == 4
|
||||
printf "array(%d): ", $zvalue->value.ht->nNumOfElements
|
||||
if $zvalue.type == 4
|
||||
set $typename = "array"
|
||||
end
|
||||
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 "(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
|
||||
____print_ht $zvalue.value.ht
|
||||
set $ind = $ind - 1
|
||||
set $i = $ind
|
||||
while $i > 0
|
||||
@@ -78,61 +101,34 @@ define ____printzv_contents
|
||||
end
|
||||
printf "}"
|
||||
end
|
||||
set $type = 0
|
||||
end
|
||||
if $type == 5
|
||||
printf "object"
|
||||
____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
|
||||
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
|
||||
set $ind = $ind - 1
|
||||
set $i = $ind
|
||||
while $i > 0
|
||||
printf " "
|
||||
set $i = $i - 1
|
||||
end
|
||||
printf "}"
|
||||
else
|
||||
echo "no properties found"
|
||||
end
|
||||
printf "(prop examination disabled due to a gdb bug)"
|
||||
if $zvalue.value.obj.handlers->get_properties
|
||||
# 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
|
||||
end
|
||||
set $type = 0
|
||||
end
|
||||
if $type == 6
|
||||
printf "string(%d): ", $zvalue->value.str.len
|
||||
____print_str $zvalue->value.str.val $zvalue->value.str.len
|
||||
if $zvalue.type == 6
|
||||
if $zvalue.value.lval
|
||||
printf "true"
|
||||
else
|
||||
printf "false"
|
||||
end
|
||||
end
|
||||
if $type == 7
|
||||
printf "resource: #%d", $zvalue->value.lval
|
||||
end
|
||||
if $type == 8
|
||||
printf "constant"
|
||||
end
|
||||
if $type == 9
|
||||
printf "const_array"
|
||||
end
|
||||
if $type > 9
|
||||
printf "unknown type %d", $type
|
||||
if $zvalue.type == 7
|
||||
printf "#%d", $zvalue.value.lval
|
||||
end
|
||||
printf "\n"
|
||||
end
|
||||
@@ -147,7 +143,7 @@ define ____printzv
|
||||
printf "*uninitialized* "
|
||||
end
|
||||
|
||||
set $zcontents = (zval*) $zvalue
|
||||
set $zcontents = *(struct _zval_struct *) $zvalue
|
||||
if $arg1
|
||||
____printzv_contents $zcontents $arg1
|
||||
else
|
||||
@@ -160,7 +156,7 @@ define ____print_const_table
|
||||
set $p = $ht->pListHead
|
||||
|
||||
while $p != 0
|
||||
set $const = (zend_constant *) $p->pData
|
||||
set $const = *(zend_constant *) $p->pData
|
||||
|
||||
set $i = $ind
|
||||
while $i > 0
|
||||
@@ -168,14 +164,13 @@ define ____print_const_table
|
||||
set $i = $i - 1
|
||||
end
|
||||
|
||||
if $p->nKeyLength > 0
|
||||
____print_str $p->arKey $p->nKeyLength
|
||||
printf " => "
|
||||
if $p->nKeyLength > 0
|
||||
printf "\"%s\" => ", $p->arKey
|
||||
else
|
||||
printf "%d => ", $p->h
|
||||
end
|
||||
|
||||
____printzv_contents &$const->value 0
|
||||
____printzv_contents $const.value 0
|
||||
set $p = $p->pListNext
|
||||
end
|
||||
end
|
||||
@@ -192,7 +187,7 @@ define ____print_ht
|
||||
set $p = $ht->pListHead
|
||||
|
||||
while $p != 0
|
||||
set $zval = *(zval **)$p->pData
|
||||
set $zval = *(struct _zval_struct **)$p->pData
|
||||
|
||||
set $i = $ind
|
||||
while $i > 0
|
||||
@@ -200,9 +195,8 @@ define ____print_ht
|
||||
set $i = $i - 1
|
||||
end
|
||||
|
||||
if $p->nKeyLength > 0
|
||||
____print_str $p->arKey $p->nKeyLength
|
||||
printf " => "
|
||||
if $p->nKeyLength > 0
|
||||
printf "\"%s\" => ", $p->arKey
|
||||
else
|
||||
printf "%d => ", $p->h
|
||||
end
|
||||
@@ -223,149 +217,6 @@ document print_ht
|
||||
dumps elements of HashTable made of zval
|
||||
end
|
||||
|
||||
define ____print_ft
|
||||
set $ht = $arg0
|
||||
set $p = $ht->pListHead
|
||||
|
||||
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
|
||||
____print_str $p->arKey $p->nKeyLength
|
||||
printf " => "
|
||||
else
|
||||
printf "%d => ", $p->h
|
||||
end
|
||||
|
||||
printf "\"%s\"\n", $func->common.function_name
|
||||
set $p = $p->pListNext
|
||||
end
|
||||
end
|
||||
|
||||
define print_ft
|
||||
set $ind = 1
|
||||
printf "[0x%08x] {\n", $arg0
|
||||
____print_ft $arg0
|
||||
printf "}\n"
|
||||
end
|
||||
|
||||
document print_ft
|
||||
dumps a function table (HashTable)
|
||||
end
|
||||
|
||||
define ____print_inh_class
|
||||
set $ce = $arg0
|
||||
if $ce->ce_flags & 0x10 || $ce->ce_flags & 0x20
|
||||
printf "abstract "
|
||||
else
|
||||
if $ce->ce_flags & 0x40
|
||||
printf "final "
|
||||
end
|
||||
end
|
||||
printf "class %s", $ce->name
|
||||
if $ce->parent != 0
|
||||
printf " extends %s", $ce->parent->name
|
||||
end
|
||||
if $ce->num_interfaces != 0
|
||||
printf " implements"
|
||||
set $tmp = 0
|
||||
while $tmp < $ce->num_interfaces
|
||||
printf " %s", $ce->interfaces[$tmp]->name
|
||||
set $tmp = $tmp + 1
|
||||
if $tmp < $ce->num_interfaces
|
||||
printf ","
|
||||
end
|
||||
end
|
||||
end
|
||||
set $ce = $ce->parent
|
||||
end
|
||||
|
||||
define ____print_inh_iface
|
||||
set $ce = $arg0
|
||||
printf "interface %s", $ce->name
|
||||
if $ce->num_interfaces != 0
|
||||
set $ce = $ce->interfaces[0]
|
||||
printf " extends %s", $ce->name
|
||||
else
|
||||
set $ce = 0
|
||||
end
|
||||
end
|
||||
|
||||
define print_inh
|
||||
set $ce = $arg0
|
||||
set $depth = 0
|
||||
while $ce != 0
|
||||
set $tmp = $depth
|
||||
while $tmp != 0
|
||||
printf " "
|
||||
set $tmp = $tmp - 1
|
||||
end
|
||||
set $depth = $depth + 1
|
||||
if $ce->ce_flags & 0x80
|
||||
____print_inh_iface $ce
|
||||
else
|
||||
____print_inh_class $ce
|
||||
end
|
||||
printf " {\n"
|
||||
end
|
||||
while $depth != 0
|
||||
set $tmp = $depth
|
||||
while $tmp != 1
|
||||
printf " "
|
||||
set $tmp = $tmp - 1
|
||||
end
|
||||
printf "}\n"
|
||||
set $depth = $depth - 1
|
||||
end
|
||||
end
|
||||
|
||||
define print_pi
|
||||
set $pi = $arg0
|
||||
printf "[0x%08x] {\n", $pi
|
||||
printf " h = %lu\n", $pi->h
|
||||
printf " flags = %d (", $pi->flags
|
||||
if $pi->flags & 0x100
|
||||
printf "ZEND_ACC_PUBLIC"
|
||||
else
|
||||
if $pi->flags & 0x200
|
||||
printf "ZEND_ACC_PROTECTED"
|
||||
else
|
||||
if $pi->flags & 0x400
|
||||
printf "ZEND_ACC_PRIVATE"
|
||||
else
|
||||
if $pi->flags & 0x800
|
||||
printf "ZEND_ACC_CHANGED"
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
printf ")\n"
|
||||
printf " name = "
|
||||
____print_str $pi->name $pi->name_length
|
||||
printf "\n}\n"
|
||||
end
|
||||
|
||||
define ____print_str
|
||||
set $tmp = 0
|
||||
set $str = $arg0
|
||||
printf "\""
|
||||
while $tmp < $arg1
|
||||
if $str[$tmp] > 32 && $str[$tmp] < 127
|
||||
printf "%c", $str[$tmp]
|
||||
else
|
||||
printf "\\%o", $str[$tmp]
|
||||
end
|
||||
set $tmp = $tmp + 1
|
||||
end
|
||||
printf "\""
|
||||
end
|
||||
|
||||
define printzn
|
||||
____executor_globals
|
||||
set $ind = 0
|
||||
|
||||
+7
-12
@@ -148,19 +148,20 @@ Naming Conventions
|
||||
'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).
|
||||
[7] Classes should be given descriptive names. Avoid using abbreviations
|
||||
where possible. Each word in the class name should start with a capital
|
||||
letter, with words underscore delimited. The class name should be prefixed
|
||||
with the name of the 'parent set'.
|
||||
|
||||
Good:
|
||||
'Curl'
|
||||
'FooBar'
|
||||
'Foo_Bar'
|
||||
|
||||
Bad:
|
||||
'foobar'
|
||||
'foo_bar'
|
||||
'FooBar'
|
||||
|
||||
|
||||
Syntax and indentation
|
||||
----------------------
|
||||
@@ -207,12 +208,6 @@ Syntax and indentation
|
||||
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
|
||||
-------------------------------
|
||||
|
||||
|
||||
Binary file not shown.
+21
-19
@@ -46,9 +46,9 @@ MAINTENANCE: Maintained
|
||||
STATUS: Experimental
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: apache2handler
|
||||
PRIMARY MAINTAINER: Aaron Bannert <aaron@php.net>, Ilia Alshanetsky <iliaa@php.net>
|
||||
PRIMARY MAINTAINER: Aaron Bannert <aaron@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
STATUS: Experimental
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: caudium
|
||||
MAINTENANCE: Unknown
|
||||
@@ -171,9 +171,9 @@ MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: mysqli
|
||||
PRIMARY MAINTAINER: Georg Richter <georg@php.net>, Andrey Hristov <andrey@php.net>
|
||||
PRIMARY MAINTAINER: Georg Richter <georg@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
STATUS: Experimental
|
||||
SINCE: 5.0
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: oci8
|
||||
@@ -231,7 +231,7 @@ SINCE: 5.0
|
||||
EXTENSION: simplexml
|
||||
PRIMARY MAINTAINER: Sterling Hughes <sterling@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
STATUS: Experimental
|
||||
SINCE: 5.0
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: soap
|
||||
@@ -297,15 +297,15 @@ 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>
|
||||
MAINTENANCE: Maintained
|
||||
EXTENSION: dio
|
||||
MAINTENANCE: Orphaned
|
||||
STATUS: Working
|
||||
SINCE: 4.0.6
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: exif
|
||||
PRIMARY MAINTAINER: Marcus Boerger <helly@php.net>
|
||||
@@ -357,8 +357,8 @@ MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: imap
|
||||
PRIMARY MAINTAINER: Chuck Hagenbuch <chuck@horde.org>, Ilia Alshanetsky <iliaa@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
PRIMARY MAINTAINER: Chuck Hagenbuch <chuck@horde.org>
|
||||
MAINTENANCE: Odd Fixes
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: ircg
|
||||
@@ -452,7 +452,7 @@ STATUS: Working
|
||||
EXTENSION: pspell
|
||||
PRIMARY MAINTAINER: Vlad Krupin <phpdevel@echospace.com>
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Working
|
||||
STATUS: Unknown
|
||||
SINCE: 4.0.2
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: readline
|
||||
@@ -465,7 +465,7 @@ MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
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
|
||||
-------------------------------------------------------------------------------
|
||||
@@ -486,12 +486,6 @@ MAINTENANCE: Maintained
|
||||
STATUS: Experimental
|
||||
SINCE: 4.0.2
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: spl
|
||||
PRIMARY MAINTAINER: Marcus Boerger <helly@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
SINCE: 5.0.0
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: sysvmsg
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
@@ -514,12 +508,20 @@ PRIMARY MAINTAINER: Andrei Zmievski <andrei@php.net>
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: w32api
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Experimental
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: yaz
|
||||
PRIMARY MAINTAINER: Adam Dickmeiss <adam@indexdata.dk>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Unknown
|
||||
SINCE: 4.0.1
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: yp
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: zlib
|
||||
PRIMARY MAINTAINER: Stefan Roehrich <sr@linux.de>
|
||||
MAINTENANCE: Maintained
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
Installing PHP
|
||||
_________________________________________________________________
|
||||
|
||||
@@ -16,7 +17,6 @@ Installing PHP
|
||||
OpenBSD installation notes
|
||||
Solaris specific installation tips
|
||||
Gentoo installation notes
|
||||
Debian GNU/Linux installation notes
|
||||
|
||||
3. Installation on Mac OS X
|
||||
|
||||
@@ -43,8 +43,6 @@ Installing PHP
|
||||
|
||||
The configuration file
|
||||
How to change configuration settings
|
||||
|
||||
7. Installation FAQ
|
||||
_________________________________________________________________
|
||||
|
||||
Preface
|
||||
@@ -166,7 +164,7 @@ Apache 1.3.x on Unix systems
|
||||
your files.
|
||||
|
||||
Example 2-1. Installation Instructions (Apache Shared Module Version)
|
||||
for PHP
|
||||
for PHP
|
||||
1. gunzip apache_xxx.tar.gz
|
||||
2. tar -xvf apache_xxx.tar
|
||||
3. gunzip php-xxx.tar.gz
|
||||
@@ -250,38 +248,36 @@ Apache 1.3.x on Unix systems
|
||||
Alternatively, to install PHP as a static object:
|
||||
|
||||
Example 2-2. Installation Instructions (Static Module Installation for
|
||||
Apache) for PHP
|
||||
Apache) for PHP
|
||||
1. gunzip -c apache_1.3.x.tar.gz | tar xf -
|
||||
2. cd apache_1.3.x
|
||||
3. ./configure
|
||||
4. cd ..
|
||||
|
||||
5. gunzip -c php-5.x.y.tar.gz | tar xf -
|
||||
6. cd php-5.x.y
|
||||
5. gunzip -c php-4.x.y.tar.gz | tar xf -
|
||||
6. cd php-4.x.y
|
||||
7. ./configure --with-mysql --with-apache=../apache_1.3.x
|
||||
8. make
|
||||
9. make install
|
||||
|
||||
10. cd ../apache_1.3.x
|
||||
|
||||
11. ./configure --prefix=/www --activate-module=src/modules/php5/libphp5.a
|
||||
(The above line is correct! Yes, we know libphp5.a does not exist at this
|
||||
11. ./configure --prefix=/www --activate-module=src/modules/php4/libphp4.a
|
||||
(The above line is correct! Yes, we know libphp4.a does not exist at this
|
||||
stage. It isn't supposed to. It will be created.)
|
||||
|
||||
12. make
|
||||
(you should now have an httpd binary which you can copy to your Apache bin
|
||||
dir if
|
||||
it is your first install then you need to "make install" as well)
|
||||
is is your first install then you need to "make install" as well)
|
||||
|
||||
13. cd ../php-5.x.y
|
||||
13. cd ../php-4.x.y
|
||||
14. cp php.ini-dist /usr/local/lib/php.ini
|
||||
|
||||
15. You can edit /usr/local/lib/php.ini file to set PHP options.
|
||||
Edit your httpd.conf or srm.conf file and add:
|
||||
AddType application/x-httpd-php .php
|
||||
|
||||
Note: Replace php-5 by php-4 and php5 by php4 in PHP 4.
|
||||
|
||||
Depending on your Apache install and Unix variant, there are many
|
||||
possible ways to stop and restart the server. Below are some typical
|
||||
lines used in restarting the server, for different apache/unix
|
||||
@@ -313,9 +309,9 @@ stop and start:
|
||||
|
||||
./configure --with-apxs --with-pgsql
|
||||
|
||||
This will create a libphp5.so (or libphp4.so in PHP 4) shared library
|
||||
that is loaded into Apache using a LoadModule line in Apache's
|
||||
httpd.conf file. The PostgreSQL support is embedded into this library.
|
||||
This will create a libphp4.so shared library that is loaded into
|
||||
Apache using a LoadModule line in Apache's httpd.conf file. The
|
||||
PostgreSQL support is embedded into this libphp4.so library.
|
||||
|
||||
./configure --with-apxs --with-pgsql=shared
|
||||
|
||||
@@ -326,14 +322,14 @@ stop and start:
|
||||
|
||||
./configure --with-apache=/path/to/apache_source --with-pgsql
|
||||
|
||||
This will create a libmodphp5.a library, a mod_php5.c and some
|
||||
accompanying files and copy this into the src/modules/php5 directory
|
||||
This will create a libmodphp4.a library, a mod_php4.c and some
|
||||
accompanying files and copy this into the src/modules/php4 directory
|
||||
in the Apache source tree. Then you compile Apache using
|
||||
--activate-module=src/modules/php5/libphp5.a and the Apache build
|
||||
system will create libphp5.a and link it statically into the httpd
|
||||
binary (replace php5 by php4 in PHP 4). The PostgreSQL support is
|
||||
included directly into this httpd binary, so the final result here is
|
||||
a single httpd binary that includes all of Apache and all of PHP.
|
||||
--activate-module=src/modules/php4/libphp4.a and the Apache build
|
||||
system will create libphp4.a and link it statically into the httpd
|
||||
binary. The PostgreSQL support is included directly into this httpd
|
||||
binary, so the final result here is a single httpd binary that
|
||||
includes all of Apache and all of PHP.
|
||||
|
||||
./configure --with-apache=/path/to/apache_source --with-pgsql=shared
|
||||
|
||||
@@ -384,8 +380,8 @@ Apache 2.0 on Unix systems
|
||||
|
||||
* PHP 4.3.0 or later available at http://www.php.net/downloads.php.
|
||||
* the latest stable development version. Get the source code
|
||||
http://snaps.php.net/php5-latest.tar.gz or download binaries for
|
||||
Windows http://snaps.php.net/win32/php5-win32-latest.zip.
|
||||
http://snaps.php.net/php4-latest.tar.gz or download binaries for
|
||||
Windows http://snaps.php.net/win32/php4-win32-latest.zip.
|
||||
* a prerelease version downloadable from http://qa.php.net/.
|
||||
* you have always the option to obtain PHP through anonymous CVS.
|
||||
|
||||
@@ -407,7 +403,7 @@ Apache 2.0 on Unix systems
|
||||
files.
|
||||
|
||||
Example 2-4. Installation Instructions (Apache 2 Shared Module
|
||||
Version)
|
||||
Version)
|
||||
1. gzip -d httpd-2_0_NN.tar.gz
|
||||
2. tar xvf httpd-2_0_NN.tar
|
||||
3. gunzip php-NN.tar.gz
|
||||
@@ -465,11 +461,11 @@ Apache 2.0 on Unix systems
|
||||
|
||||
For PHP 4:
|
||||
|
||||
LoadModule php4_module modules/libphp4.so
|
||||
LoadModule php4_module libexec/libphp4.so
|
||||
|
||||
For PHP 5:
|
||||
|
||||
LoadModule php5_module modules/libphp5.so
|
||||
LoadModule php5_module libexec/libphp5.so
|
||||
|
||||
15. Tell Apache to parse certain extensions as PHP. For example,
|
||||
let's have Apache parse the .php extension as PHP. You could
|
||||
@@ -1101,121 +1097,6 @@ Common Problems
|
||||
"Apache PHP".
|
||||
_________________________________________________________________
|
||||
|
||||
Debian GNU/Linux installation notes
|
||||
|
||||
This section contains notes and hints specific to installing PHP on
|
||||
Debian GNU/Linux.
|
||||
_________________________________________________________________
|
||||
|
||||
Using APT
|
||||
|
||||
While you can just download the PHP source and compile it yourself,
|
||||
using Debian's packaging system is the simplest and cleanest method of
|
||||
installing PHP. If you are not familiar with building software on
|
||||
Linux, this is the way to go.
|
||||
|
||||
The first decision you need to make is whether you want to install
|
||||
Apache 1.3.x or Apache 2.x. The corresponding PHP packages are
|
||||
respectively named libapache-mod-php* and libapache2-mod-php*. The
|
||||
steps given below will use Apache 1.3.x. Please note that, as of this
|
||||
writing, there is no official Debian packages of PHP 5. Then the steps
|
||||
given below will install PHP 4.
|
||||
|
||||
PHP is available in Debian as CGI or CLI flavour too, named
|
||||
respectively php4-cgi and php4-cli. If you need them, you'll just have
|
||||
to reproduce the following steps with the good package names. Another
|
||||
special package you'd want to install is php4-pear. It contains a
|
||||
minimal PEAR installation and the pear commandline utility.
|
||||
|
||||
If you need more recent packages of PHP than the Debian's stable ones
|
||||
or if some PHP modules lacks the Debian official repository, perhaps
|
||||
you should take a look at http://www.apt-get.org/. One of the results
|
||||
found should be Dotdeb. This unofficial repository is maintained by
|
||||
Guillaume Plessis and contains Debian packages of the most recent
|
||||
versions of PHP 4 and PHP 5. To use it, just add the to following two
|
||||
lines to your /etc/apt/sources.lists and run apt-get update :
|
||||
|
||||
Example 2-10. The two Dotdeb related lines
|
||||
deb http://packages.dotdeb.org stable all
|
||||
deb-src http://packages.dotdeb.org stable all
|
||||
|
||||
The last thing to consider is whether your list of packages is up to
|
||||
date. If you have not updated it recently, you need to run apt-get
|
||||
update before anything else. This way, you will be using the most
|
||||
recent stable version of the Apache and PHP packages.
|
||||
|
||||
Now that everything is in place, you can use the following example to
|
||||
install Apache and PHP:
|
||||
|
||||
Example 2-11. Debian Install Example with Apache 1.3
|
||||
# apt-get install libapache-mod-php4
|
||||
|
||||
APT will automatically install the PHP 4 module for Apache 1.3, and
|
||||
all its dependencies and then activate it. If you're not asked to
|
||||
restart Apache during the install process, you'll have to do it
|
||||
manually :
|
||||
|
||||
Example 2-12. Stopping and starting Apache once PHP 4 is installed
|
||||
# /etc/init.d/apache stop
|
||||
# /etc/init.d/apache start
|
||||
_________________________________________________________________
|
||||
|
||||
Better control on configuration
|
||||
|
||||
In the last section, PHP was installed with only core modules. This
|
||||
may not be what you want and you will soon discover that you need more
|
||||
activated modules, like MySQL, cURL, GD, etc.
|
||||
|
||||
When you compile PHP from source yourself, you need to activate
|
||||
modules via the configure command. With APT, you just have to install
|
||||
additional packages. They're all named 'php4-*' (or 'php5-*' if you
|
||||
installed PHP 5 from a third party repository).
|
||||
|
||||
Example 2-13. Getting the list of PHP additional packages
|
||||
# dpkg -l 'php4-*'
|
||||
|
||||
As you can see from the last output, there's a lot of PHP modules that
|
||||
you can install (excluding the php4-cgi, php4-cli or php4-pear special
|
||||
packages). Look at them closely and choose what you need. If you
|
||||
choose a module and you do not have the proper libraries, APT will
|
||||
automatically install all the dependencies for you.
|
||||
|
||||
If you choose to add the MySQL, cURL and GD support to PHP the command
|
||||
will look something like this:
|
||||
|
||||
Example 2-14. Install PHP with MySQL, cURL and GD
|
||||
# apt-get install php4-mysql php4-curl php4-gd
|
||||
|
||||
APT will automatically add the appropriate lines to your different
|
||||
php.ini (/etc/php4/apache/php.ini, /etc/php4/cgi/php.ini, etc).
|
||||
|
||||
Example 2-15. These lines activate MySQL, cURL and GD into PHP
|
||||
extension=mysql.so
|
||||
extension=curl.so
|
||||
extension=gd.so
|
||||
|
||||
You'll only have to stop/start Apache as previously to activate the
|
||||
modules.
|
||||
_________________________________________________________________
|
||||
|
||||
Common Problems
|
||||
|
||||
* If you see the PHP source instead of the result the script should
|
||||
produce, APT has probably not included /etc/apache/conf.d/php4 in
|
||||
your Apache 1.3 configuration. Please ensure that the following
|
||||
line is present in your /etc/apache/httpd.conf file then
|
||||
stop/start Apache:
|
||||
|
||||
Example 2-16. This line activates PHP 4 into Apache
|
||||
# Include /etc/apache/conf.d/
|
||||
|
||||
* If you installed an additional module and if its functions are not
|
||||
available in your scripts, please ensure that the appropriate line
|
||||
is present in your php.ini, as seen before. APT may fail during
|
||||
the installation of the additional module, due to a confusing
|
||||
debconf configuration.
|
||||
_________________________________________________________________
|
||||
|
||||
Chapter 3. Installation on Mac OS X
|
||||
|
||||
This section contains notes and hints specific to installing PHP on
|
||||
@@ -1238,7 +1119,7 @@ Using Packages
|
||||
|
||||
Compiling for OS X Server
|
||||
|
||||
Mac OS X Server install.
|
||||
Mac OS X Server install.
|
||||
|
||||
1. Get the latest distributions of Apache and PHP.
|
||||
2. Untar them, and run the configure program on Apache like so.
|
||||
@@ -1340,24 +1221,24 @@ Chapter 4. Installation of PECL extensions
|
||||
|
||||
Introduction to PECL Installations
|
||||
|
||||
PECL is a repository of PHP extensions that are made available to you
|
||||
via the PEAR packaging system. This section of the manual is intended
|
||||
to demonstrate how to obtain and install PECL extensions.
|
||||
PHP extensions may be installed in a variety of ways. PECL is a
|
||||
repository of PHP extensions living within the PEAR structure, and the
|
||||
following demonstrates how to install these extensions.
|
||||
|
||||
These instructions assume /your/phpsrcdir/ is the path to the PHP
|
||||
source distribution, and that extname is the name of the PECL
|
||||
extension. Adjust accordingly. These instructions also assume a
|
||||
familiarity with the pear command.
|
||||
source, and extname is the name of the PECL extension. Adjust
|
||||
accordingly. These instructions also assume a familiarity with the
|
||||
pear command.
|
||||
|
||||
To be useful, a shared extension must be built, installed, and loaded.
|
||||
The methods described below provide you with various instructions on
|
||||
how to build and install the extensions, but they do not automatically
|
||||
load them. Extensions can be loaded by adding an extension directive.
|
||||
To this php.ini file, or through the use of the dl() function.
|
||||
Shared extensions may be installed by including them inside of php.ini
|
||||
using the extension PHP directive. See also the extensions_dir
|
||||
directive, and dl(). The installation methods described below do not
|
||||
automatically configure PHP to include these extensions, this step
|
||||
must be done manually.
|
||||
|
||||
When building PHP modules, it's important to have known-good versions
|
||||
of the required tools (autoconf, automake, libtool, etc.) See the
|
||||
Anonymous CVS Instructions for details on the required tools, and
|
||||
When building PHP modules, it's important to have the appropriate
|
||||
versions of the required tools (autoconf, automake, libtool, etc.) See
|
||||
the Anonymous CVS Instructions for details on the required tools, and
|
||||
required versions.
|
||||
_________________________________________________________________
|
||||
|
||||
@@ -1366,19 +1247,16 @@ Downloading PECL extensions
|
||||
There are several options for downloading PECL extensions, such as:
|
||||
|
||||
* http://pecl.php.net
|
||||
The PECL web site contains information about the different
|
||||
extensions that are offered by the PHP Development Team. The
|
||||
information available here includes: ChangeLog, release notes,
|
||||
requirements and other similar details.
|
||||
Listed here is information like the ChangeLog, release
|
||||
information, requirements, revisions, etc. Although not every PECL
|
||||
extension has a webpage, most do.
|
||||
* pear download extname
|
||||
PECL extensions that have releases listed on the PECL web site are
|
||||
available for download and installation using the pear command.
|
||||
The pear command may also be used to download source files.
|
||||
Specific revisions may also be specified.
|
||||
* CVS
|
||||
Most PECL extensions also reside in CVS. A web-based view may be
|
||||
seen at http://cvs.php.net/pecl/. To download straight from CVS,
|
||||
the following sequence of commands may be used. Note that phpfi is
|
||||
the password for user cvsread:
|
||||
All PECL files reside in CVS. A web-based view may be seen at
|
||||
http://cvs.php.net/pecl/. To download straight from CVS, consider
|
||||
the following where phpfi is the password for user cvsread:
|
||||
|
||||
$ cvs -d:pserver:cvsread@cvs.php.net:/repository login
|
||||
$ cvs -d:pserver:cvsread@cvs.php.net:/repository co pecl/extname
|
||||
@@ -1392,10 +1270,9 @@ $ cvs -d:pserver:cvsread@cvs.php.net:/repository co pecl/extname
|
||||
|
||||
PECL for Windows users
|
||||
|
||||
As with any other PHP extension DLL, installation is as simple as
|
||||
copying the PECL extension DLLs into the extension_dir folder and
|
||||
loading them from php.ini. For example, add the following line to your
|
||||
php.ini:
|
||||
Like with any other PHP extension DLL, to install move the PECL
|
||||
extension DLLs into the extension_dir folder and include them within
|
||||
php.ini. For example:
|
||||
|
||||
extension=php_extname.dll
|
||||
|
||||
@@ -1409,76 +1286,67 @@ Compiling shared PECL extensions with PEAR
|
||||
|
||||
$ pear install extname
|
||||
|
||||
This will download the source for extname, compile, and install
|
||||
extname.so into your extension_dir. extname.so may then be loaded via
|
||||
php.ini
|
||||
That will download the source for extname, and compile it on the
|
||||
system. This results in an extname.so file that may then be included
|
||||
in php.ini
|
||||
|
||||
By default, the pear command will not install packages that are marked
|
||||
with the alpha or beta state. If no stable packages are available, you
|
||||
may install a beta package using the following command:
|
||||
In case the systems preferred_state is set higher than an available
|
||||
extname version, like it's set to stable and the extension is still in
|
||||
beta, either alter the preferred_state via pear config-set or specify
|
||||
a specific version of the PECL extension. For example:
|
||||
|
||||
$ pear install extname-beta
|
||||
$ pear install extname-0.1.1
|
||||
|
||||
You may also install a specific version using this variant:
|
||||
|
||||
$ pear install extname-0.1
|
||||
Regardless, pear will copy this extname.so into the extensions
|
||||
directory. Adjust php.ini accordingly.
|
||||
_________________________________________________________________
|
||||
|
||||
Compiling shared PECL extensions with phpize
|
||||
|
||||
Sometimes, using the pear installer is not an option. This could be
|
||||
because you're behind a firewall, or it could be because the extension
|
||||
you want to install is not available as a PEAR compatible package,
|
||||
such as unreleased extensions from CVS. If you need to build such an
|
||||
extension, you can use the lower-level build tools to perform the
|
||||
build manually.
|
||||
|
||||
The phpize command is used to prepare the build environment for a PHP
|
||||
extension. In the following sample, the sources for an extension are
|
||||
in a directory named extname:
|
||||
If using pear is not an option, like for building shared PECL
|
||||
extensions from CVS, or for unreleased PECL packages, then creating a
|
||||
shared extension may also be done by manually using the phpize
|
||||
command. The pear command essentially does this but it may also be
|
||||
done manually. Assuming the source file is named extname.tgz, and that
|
||||
it was downloaded into the current directory, consider the following:
|
||||
|
||||
$ pear download extname
|
||||
$ gzip -d < extname.tgz | tar -xvf -
|
||||
$ cd extname
|
||||
$ phpize
|
||||
$ ./configure
|
||||
$ make
|
||||
# make install
|
||||
$ ./configure && make
|
||||
|
||||
A successful install will have created extname.so and put it into the
|
||||
PHP extensions directory. You'll need to and adjust php.ini and add an
|
||||
extension=extname.so line before you can use the extension.
|
||||
Upon success, this will create extname.so and put it into the modules/
|
||||
and/or .libs/ directory within the extname/ source. Move this shared
|
||||
extension (extname.so) into the PHP extensions directory, and adjust
|
||||
php.ini accordingly.
|
||||
_________________________________________________________________
|
||||
|
||||
Compiling PECL extensions statically into PHP
|
||||
|
||||
You might find that you need to build a PECL extension statically into
|
||||
your PHP binary. To do this, you'll need to place the extension source
|
||||
under the php-src/ext/ directory and tell the PHP build system to
|
||||
regenerate its configure script.
|
||||
To statically include the extension within the PHP build, put the
|
||||
extensions source into the ext/ directory found in the PHP source. For
|
||||
example:
|
||||
|
||||
$ cd /your/phpsrcdir/ext
|
||||
$ pear download extname
|
||||
$ gzip -d < extname.tgz | tar -xvf -
|
||||
$ mv extname-x.x.x extname
|
||||
$ rm package.xml
|
||||
|
||||
This will result in the following directory:
|
||||
|
||||
/your/phpsrcdir/ext/extname
|
||||
|
||||
From here, force PHP to rebuild the configure script, and then build
|
||||
PHP as normal:
|
||||
From here, build PHP as normal:
|
||||
|
||||
$ cd /your/phpsrcdir
|
||||
$ rm configure
|
||||
$ ./buildconf --force
|
||||
$ ./buildconf
|
||||
$ ./configure --help
|
||||
$ ./configure --with-extname --enable-someotherext --with-foobar
|
||||
$ make
|
||||
$ make install
|
||||
|
||||
Note: To run the 'buildconf' script you need autoconf 2.13 and
|
||||
automake 1.4+ (newer versions of autoconf may work, but are not
|
||||
supported).
|
||||
|
||||
Whether --enable-extname or --with-extname is used depends on the
|
||||
extension. Typically an extension that does not require external
|
||||
libraries uses --enable. To be sure, run the following after
|
||||
@@ -1535,23 +1403,14 @@ The configuration file
|
||||
versions of PHP, this happens only once when the web server is
|
||||
started. For the CGI and CLI version, it happens on every invocation.
|
||||
|
||||
php.ini is searched in these locations (in order):
|
||||
|
||||
* SAPI module specific location (PHPIniDir directive in Apache 2, -c
|
||||
command line option in CGI and CLI, php_ini parameter in NSAPI,
|
||||
PHP_INI_PATH environment variable in THTTPD)
|
||||
* HKEY_LOCAL_MACHINE\SOFTWARE\PHP\IniFilePath (Windows Registry
|
||||
location)
|
||||
* The PHPRC environment variable
|
||||
* Current working directory (for CLI)
|
||||
* The web server's directory (for SAPI modules), or directory of PHP
|
||||
(otherwise in Windows)
|
||||
* Windows directory (C:\windows or C:\winnt) (for Windows), or
|
||||
--with-config-file-path compile time option
|
||||
The default location of php.ini is a compile time option (see the FAQ
|
||||
entry), but can be changed for the CGI and CLI version with the -c
|
||||
command line switch, see the chapter about using PHP from the command
|
||||
line. You can also use the environment variable PHPRC for an
|
||||
additional path to search for a php.ini file.
|
||||
|
||||
If php-SAPI.ini exists (where SAPI is used SAPI, so the filename is
|
||||
e.g. php-cli.ini or php-apache.ini), it's used instead of php.ini.
|
||||
SAPI name can be determined by php_sapi_name().
|
||||
|
||||
Note: The Apache web server changes the directory to root at
|
||||
startup causing PHP to attempt to read php.ini from the root
|
||||
@@ -1559,11 +1418,11 @@ The configuration file
|
||||
|
||||
The php.ini directives handled by extensions are documented
|
||||
respectively on the pages of the extensions themselves. The list of
|
||||
the core directives is available in the appendix. Probably not all PHP
|
||||
directives are documented in the manual though. For a complete list of
|
||||
directives available in your PHP version, please read your well
|
||||
commented php.ini file. Alternatively, you may find the the latest
|
||||
php.ini from CVS helpful too.
|
||||
the core directives is available in the appendix. Probably not all the
|
||||
PHP directives are documented in the manual though. For a completel
|
||||
list of directives available in your PHP version, please read your
|
||||
well commented php.ini file. Alternatively, you may find the the
|
||||
latest php.ini from CVS helpful too.
|
||||
|
||||
Example 6-1. php.ini example
|
||||
; any text on a line after an unquoted semicolon (;) is ignored
|
||||
@@ -1579,10 +1438,6 @@ include_path = ".:/usr/local/lib/php"
|
||||
|
||||
; backslashes are treated the same as any other character
|
||||
include_path = ".;c:\php\lib"
|
||||
|
||||
Since PHP 5.1.0, it is possible to refer to existing .ini variables
|
||||
from within .ini files. Example: open_basedir = ${open_basedir}
|
||||
":/new/dir".
|
||||
_________________________________________________________________
|
||||
|
||||
How to change configuration settings
|
||||
@@ -1678,420 +1533,3 @@ Other interfaces to PHP
|
||||
function, and review the resulting page. You can also access the
|
||||
values of individual configuration directives at runtime using
|
||||
ini_get() or get_cfg_var().
|
||||
_________________________________________________________________
|
||||
|
||||
Chapter 7. Installation FAQ
|
||||
|
||||
This section holds common questions about the way to install PHP. PHP
|
||||
is available for almost any OS (except maybe for MacOS before OSX),
|
||||
and almost any web server.
|
||||
|
||||
To install PHP, follow the instructions in the INSTALL file located in
|
||||
the distribution. Windows users should also read the install.txt file.
|
||||
There are also some helpful hints for Windows users here.
|
||||
|
||||
1. Why shouldn't I use Apache2 with a threaded MPM in a production
|
||||
environment?
|
||||
|
||||
2. Unix/Windows: Where should my php.ini file be located?
|
||||
3. Unix: I installed PHP, but every time I load a document, I get the
|
||||
message 'Document Contains No Data'! What's going on here?
|
||||
|
||||
4. Unix: I installed PHP using RPMS, but Apache isn't processing the
|
||||
PHP pages! What's going on here?
|
||||
|
||||
5. Unix: I installed PHP 3 using RPMS, but it doesn't compile with the
|
||||
database support I need! What's going on here?
|
||||
|
||||
6. Unix: I patched Apache with the FrontPage extensions patch, and
|
||||
suddenly PHP stopped working. Is PHP incompatible with the
|
||||
Apache FrontPage extensions?
|
||||
|
||||
7. Unix/Windows: I have installed PHP, but when I try to access a PHP
|
||||
script file via my browser, I get a blank screen.
|
||||
|
||||
8. Unix/Windows: I have installed PHP, but when try to access a PHP
|
||||
script file via my browser, I get a server 500 error.
|
||||
|
||||
9. Some operating systems: I have installed PHP without errors, but
|
||||
when I try to start apache I get undefined symbol errors:
|
||||
|
||||
[mybox:user /src/php4] root# apachectl configtest
|
||||
apachectl: /usr/local/apache/bin/httpd Undefined symbols:
|
||||
_compress
|
||||
_uncompress
|
||||
|
||||
10. Windows: I have installed PHP, but when I to access a PHP script
|
||||
file via my browser, I get the error:
|
||||
|
||||
cgi error:
|
||||
The specified CGI application misbehaved by not
|
||||
returning a complete set of HTTP headers.
|
||||
The headers it did return are:
|
||||
|
||||
11. Windows: I've followed all the instructions, but still can't get
|
||||
PHP and IIS to work together!
|
||||
|
||||
12. When running PHP as CGI with IIS, PWS, OmniHTTPD or Xitami, I get
|
||||
the following error: Security Alert! PHP CGI cannot be accessed
|
||||
directly..
|
||||
|
||||
13. How do I know if my php.ini is being found and read? It seems like
|
||||
it isn't as my changes aren't being implemented.
|
||||
|
||||
14. How do I add my PHP directory to the PATH on Windows?
|
||||
15. How do I make the php.ini file available to PHP on windows?
|
||||
16. Is it possible to use Apache content negotiation (MultiViews
|
||||
option) with PHP?
|
||||
|
||||
17. Is PHP limited to process GET and POST request methods only?
|
||||
|
||||
1. Why shouldn't I use Apache2 with a threaded MPM in a production
|
||||
environment?
|
||||
|
||||
PHP is glue. It is the glue used to build cool web applications by
|
||||
sticking dozens of 3rd-party libraries together and making it all
|
||||
appear as one coherent entity through an intuitive and easy to learn
|
||||
language interface. The flexibility and power of PHP relies on the
|
||||
stability and robustness of the underlying platform. It needs a
|
||||
working OS, a working web server and working 3rd-party libraries to
|
||||
glue together. When any of these stop working PHP needs ways to
|
||||
identify the problems and fix them quickly. When you make the
|
||||
underlying framework more complex by not having completely separate
|
||||
execution threads, completely separate memory segments and a strong
|
||||
sandbox for each request to play in, feet of clay are introduced into
|
||||
PHP's system.
|
||||
|
||||
If you feel you have to use a threaded MPM, look at a FastCGI
|
||||
configuration where PHP is running in its own memory space.
|
||||
|
||||
And finally, this warning against using a threaded MPM is not as
|
||||
strong for Windows systems because most libraries on that platform
|
||||
tend to be threadsafe.
|
||||
|
||||
2. Unix/Windows: Where should my php.ini file be located?
|
||||
|
||||
By default on Unix it should be in /usr/local/lib which is
|
||||
<install-path>/lib. Most people will want to change this at
|
||||
compile-time with the --with-config-file-path flag. You would, for
|
||||
example, set it with something like:
|
||||
--with-config-file-path=/etc
|
||||
|
||||
And then you would copy php.ini-dist from the distribution to
|
||||
/etc/php.ini and edit it to make any local changes you want.
|
||||
--with-config-file-scan-dir=PATH
|
||||
|
||||
On Windows the default path for the php.ini file is the Windows
|
||||
directory. If you're using the Apache webserver, php.ini is first
|
||||
searched in the Apaches install directory, e.g. c:\program
|
||||
files\apache group\apache. This way you can have different php.ini
|
||||
files for different versions of Apache on the same machine.
|
||||
|
||||
See also the chapter about the configuration file.
|
||||
|
||||
3. Unix: I installed PHP, but every time I load a document, I get the
|
||||
message 'Document Contains No Data'! What's going on here?
|
||||
|
||||
This probably means that PHP is having some sort of problem and is
|
||||
core-dumping. Look in your server error log to see if this is the
|
||||
case, and then try to reproduce the problem with a small test case. If
|
||||
you know how to use 'gdb', it is very helpful when you can provide a
|
||||
backtrace with your bug report to help the developers pinpoint the
|
||||
problem. If you are using PHP as an Apache module try something like:
|
||||
|
||||
* Stop your httpd processes
|
||||
* gdb httpd
|
||||
* Stop your httpd processes
|
||||
* > run -X -f /path/to/httpd.conf
|
||||
* Then fetch the URL causing the problem with your browser
|
||||
* > run -X -f /path/to/httpd.conf
|
||||
* If you are getting a core dump, gdb should inform you of this now
|
||||
* type: bt
|
||||
* You should include your backtrace in your bug report. This should
|
||||
be submitted to http://bugs.php.net/
|
||||
|
||||
If your script uses the regular expression functions (ereg() and
|
||||
friends), you should make sure that you compiled PHP and Apache with
|
||||
the same regular expression package. This should happen automatically
|
||||
with PHP and Apache 1.3.x
|
||||
|
||||
4. Unix: I installed PHP using RPMS, but Apache isn't processing the
|
||||
PHP pages! What's going on here?
|
||||
|
||||
Assuming you installed both Apache and PHP from RPM packages, you need
|
||||
to uncomment or add some or all of the following lines in your
|
||||
httpd.conf file:
|
||||
# Extra Modules
|
||||
AddModule mod_php.c
|
||||
AddModule mod_php3.c
|
||||
AddModule mod_perl.c
|
||||
|
||||
# Extra Modules
|
||||
LoadModule php_module modules/mod_php.so
|
||||
LoadModule php3_module modules/libphp3.so # for PHP 3
|
||||
LoadModule php4_module modules/libphp4.so # for PHP 4
|
||||
LoadModule perl_module modules/libperl.so
|
||||
|
||||
And add:
|
||||
AddType application/x-httpd-php3 .php3 # for PHP 3
|
||||
AddType application/x-httpd-php .php # for PHP 4
|
||||
|
||||
... to the global properties, or to the properties of the
|
||||
VirtualDomain you want to have PHP support added to.
|
||||
|
||||
5. Unix: I installed PHP 3 using RPMS, but it doesn't compile with the
|
||||
database support I need! What's going on here?
|
||||
|
||||
Due to the way PHP 3 built, it is not easy to build a complete
|
||||
flexible PHP RPM. This issue is addressed in PHP 4. For PHP 3, we
|
||||
currently suggest you use the mechanism described in the
|
||||
INSTALL.REDHAT file in the PHP distribution. If you insist on using an
|
||||
RPM version of PHP 3, read on...
|
||||
|
||||
The RPM packagers are setting up the RPMS to install without database
|
||||
support to simplify installations and because RPMS use /usr/ instead
|
||||
of the standard /usr/local/ directory for files. You need to tell the
|
||||
RPM spec file which databases to support and the location of the
|
||||
top-level of your database server.
|
||||
|
||||
This example will explain the process of adding support for the
|
||||
popular MySQL database server, using the mod installation for Apache.
|
||||
|
||||
Of course all of this information can be adjusted for any database
|
||||
server that PHP supports. We will assume you installed MySQL and
|
||||
Apache completely with RPMS for this example as well.
|
||||
|
||||
* First remove mod_php3 :
|
||||
|
||||
rpm -e mod_php3
|
||||
|
||||
* Then get the source rpm and INSTALL it, NOT --rebuild
|
||||
|
||||
rpm -Uvh mod_php3-3.0.5-2.src.rpm
|
||||
|
||||
* Then edit the /usr/src/redhat/SPECS/mod_php3.spec file
|
||||
In the %build section add the database support you want, and the
|
||||
path.
|
||||
For MySQL you would add --with-mysql=/usr The %build section will
|
||||
look something like this:
|
||||
|
||||
./configure --prefix=/usr \
|
||||
--with-apxs=/usr/sbin/apxs \
|
||||
--with-config-file-path=/usr/lib \
|
||||
--enable-debug=no \
|
||||
--enable-safe-mode \
|
||||
--with-exec-dir=/usr/bin \
|
||||
--with-mysql=/usr \
|
||||
--with-system-regex
|
||||
|
||||
* Once this modification is made then build the binary rpm as
|
||||
follows:
|
||||
|
||||
rpm -bb /usr/src/redhat/SPECS/mod_php3.spec
|
||||
|
||||
* Then install the rpm
|
||||
|
||||
rpm -ivh /usr/src/redhat/RPMS/i386/mod_php3-3.0.5-2.i386.rpm
|
||||
|
||||
Make sure you restart Apache, and you now have PHP 3 with MySQL
|
||||
support using RPM's. Note that it is probably much easier to just
|
||||
build from the distribution tarball of PHP 3 and follow the
|
||||
instructions in INSTALL.REDHAT found in that distribution.
|
||||
|
||||
6. Unix: I patched Apache with the FrontPage extensions patch, and
|
||||
suddenly PHP stopped working. Is PHP incompatible with the Apache
|
||||
FrontPage extensions?
|
||||
|
||||
No, PHP works fine with the FrontPage extensions. The problem is that
|
||||
the FrontPage patch modifies several Apache structures, that PHP
|
||||
relies on. Recompiling PHP (using 'make clean ; make') after the FP
|
||||
patch is applied would solve the problem.
|
||||
|
||||
7. Unix/Windows: I have installed PHP, but when I try to access a PHP
|
||||
script file via my browser, I get a blank screen.
|
||||
|
||||
Do a 'view source' in the web browser and you will probably find that
|
||||
you can see the source code of your PHP script. This means that the
|
||||
web server did not send the script to PHP for interpretation.
|
||||
Something is wrong with the server configuration - double check the
|
||||
server configuration against the PHP installation instructions.
|
||||
|
||||
8. Unix/Windows: I have installed PHP, but when try to access a PHP
|
||||
script file via my browser, I get a server 500 error.
|
||||
|
||||
Something went wrong when the server tried to run PHP. To get to see a
|
||||
sensible error message, from the command line, change to the directory
|
||||
containing the PHP executable (php.exe on Windows) and run php -i. If
|
||||
PHP has any problems running, then a suitable error message will be
|
||||
displayed which will give you a clue as to what needs to be done next.
|
||||
If you get a screen full of HTML codes (the output of the phpinfo()
|
||||
function) then PHP is working, and your problem may be related to your
|
||||
server configuration which you should double check.
|
||||
|
||||
9. Some operating systems: I have installed PHP without errors, but
|
||||
when I try to start apache I get undefined symbol errors:
|
||||
[mybox:user /src/php4] root# apachectl configtest
|
||||
apachectl: /usr/local/apache/bin/httpd Undefined symbols:
|
||||
_compress
|
||||
_uncompress
|
||||
|
||||
This has actually nothing to do with PHP, but with the MySQL client
|
||||
libraries. Some need --with-zlib, others do not. This is also covered
|
||||
in the MySQL FAQ.
|
||||
|
||||
10. Windows: I have installed PHP, but when I to access a PHP script
|
||||
file via my browser, I get the error:
|
||||
cgi error:
|
||||
The specified CGI application misbehaved by not
|
||||
returning a complete set of HTTP headers.
|
||||
The headers it did return are:
|
||||
|
||||
This error message means that PHP failed to output anything at all. To
|
||||
get to see a sensible error message, from the command line, change to
|
||||
the directory containing the PHP executable (php.exe on Windows) and
|
||||
run php -i. If PHP has any problems running, then a suitable error
|
||||
message will be displayed which will give you a clue as to what needs
|
||||
to be done next. If you get a screen full of HTML codes (the output of
|
||||
the phpinfo() function) then PHP is working.
|
||||
|
||||
Once PHP is working at the command line, try accessing the script via
|
||||
the browser again. If it still fails then it could be one of the
|
||||
following:
|
||||
|
||||
* File permissions on your PHP script, php.exe, php4ts.dll, php.ini
|
||||
or any PHP extensions you are trying to load are such that the
|
||||
anonymous internet user ISUR_<machinename> cannot access them.
|
||||
* The script file does not exist (or possibly isn't where you think
|
||||
it is relative to your web root directory). Note that for IIS you
|
||||
can trap this error by ticking the 'check file exists' box when
|
||||
setting up the script mappings in the Internet Services Manager.
|
||||
If a script file does not exist then the server will return a 404
|
||||
error instead. There is also the additional benefit that IIS will
|
||||
do any authentication required for you based on the NTLanMan
|
||||
permissions on your script file.
|
||||
|
||||
11. Windows: I've followed all the instructions, but still can't get
|
||||
PHP and IIS to work together!
|
||||
|
||||
Make sure any user who needs to run a PHP script has the rights to run
|
||||
php.exe! IIS uses an anonymous user which is added at the time IIS is
|
||||
installed. This user needs rights to php.exe. Also, any authenticated
|
||||
user will also need rights to execute php.exe. And for IIS4 you need
|
||||
to tell it that PHP is a script engine. Also, you will want to read
|
||||
this faq.
|
||||
|
||||
12. When running PHP as CGI with IIS, PWS, OmniHTTPD or Xitami, I get
|
||||
the following error: Security Alert! PHP CGI cannot be accessed
|
||||
directly..
|
||||
|
||||
You must set the cgi.force_redirect directive to 0. It defaults to 1
|
||||
so be sure the directive isn't commented out (with a ;). Like all
|
||||
directives, this is set in php.ini
|
||||
|
||||
Because the default is 1, it's critical that you're 100% sure that the
|
||||
correct php.ini file is being read. Read this faq for details.
|
||||
|
||||
13. How do I know if my php.ini is being found and read? It seems like
|
||||
it isn't as my changes aren't being implemented.
|
||||
|
||||
To be sure your php.ini is being read by PHP, make a call to phpinfo()
|
||||
and near the top will be a listing called Configuration File
|
||||
(php.ini). This will tell you where PHP is looking for php.ini and
|
||||
whether or not it's being read. If just a directory PATH exists than
|
||||
it's not being read and you should put your php.ini in that directory.
|
||||
If php.ini is included within the PATH than it is being read.
|
||||
|
||||
If php.ini is being read and you're running PHP as a module, then be
|
||||
sure to restart your web server after making changes to php.ini
|
||||
|
||||
14. How do I add my PHP directory to the PATH on Windows?
|
||||
|
||||
On Windows NT, 2000, XP and 2003:
|
||||
|
||||
* Go to Control Panel and open the System icon (Start -> Settings ->
|
||||
Control Panel -> System, or just Start -> Control Panel -> System
|
||||
for Windows XP/2003)
|
||||
* Go to the Advanced tab
|
||||
* Click on the 'Environment Variables' button
|
||||
* Look into the 'System Variables' pane
|
||||
* Find the Path entry (you may need to scroll to find it)
|
||||
* Double click on the Path entry
|
||||
* Enter your PHP directory ant the end, including ';' before (e.g.
|
||||
;C:\php)
|
||||
* Press OK and restart your computer
|
||||
|
||||
On Windows 98/Me you need to edit the autoexec.bat file:
|
||||
|
||||
* Open the Notepad (Start -> Run and enter notepad)
|
||||
* Open the C:\autoexec.bat file
|
||||
* Locate the line with PATH=C:\WINDOWS;C:\WINDOWS\COMMAND;..... and
|
||||
add: ;C:\php to the end of the line
|
||||
* Save the file and restart your computer
|
||||
|
||||
Note: Be sure to reboot after following the steps above to ensure
|
||||
that the PATH changes are applied.
|
||||
|
||||
The PHP manual used to promote the copying of files into the Windows
|
||||
system directory, this is because this directory (C:\Windows,
|
||||
C:\WINNT, etc.) is by default in the systems PATH. Copying files into
|
||||
the Windows system directory has long since been deprecated and may
|
||||
cause problems.
|
||||
|
||||
15. How do I make the php.ini file available to PHP on windows?
|
||||
|
||||
There are several ways of doing this. If you are using Apache, read
|
||||
their installation specific instructions (Apache 1, Apache 2),
|
||||
otherwise you must set the PHPRC environment variable:
|
||||
|
||||
On Windows NT, 2000, XP and 2003:
|
||||
|
||||
* Go to Control Panel and open the System icon (Start -> Settings ->
|
||||
Control Panel -> System, or just Start -> Control Panel -> System
|
||||
for Windows XP/2003)
|
||||
* Go to the Advanced tab
|
||||
* Click on the 'Environment Variables' button
|
||||
* Look into the 'System variables' pane
|
||||
* Click on 'New' and enter 'PHPRC' as the variable name and the
|
||||
directory where php.ini is located as the variable value (e.g.
|
||||
C:\php)
|
||||
* Press OK and restart your computer
|
||||
|
||||
On Windows 98/Me you need to edit the autoexec.bat file:
|
||||
|
||||
* Open the Notepad (Start -> Run and enter notepad)
|
||||
* Open the C:\autoexec.bat file
|
||||
* Add a new line to the end of the file: set PHPRC=C:\php (replace
|
||||
C:\php with the directory where php.ini is located). Please note
|
||||
that the path cannot contain spaces. For instance, if you have
|
||||
installed PHP in C:\Program Files\PHP, you would enter
|
||||
C:\PROGRA~1\PHP instead.
|
||||
* Save the file and restart your computer
|
||||
|
||||
16. Is it possible to use Apache content negotiation (MultiViews
|
||||
option) with PHP?
|
||||
|
||||
If links to PHP files include extension, everything works perfect.
|
||||
This FAQ is only for the case when links to PHP files don't include
|
||||
extension and you want to use content negotiation to choose PHP files
|
||||
from URL with no extension. In this case, replace the line AddType
|
||||
application/x-httpd-php .php with:
|
||||
# PHP 4
|
||||
AddHandler php-script php
|
||||
AddType text/html php
|
||||
|
||||
# PHP 5
|
||||
AddHandler php5-script php
|
||||
AddType text/html php
|
||||
|
||||
This solution doesn't work for Apache 1 as PHP module doesn't catch
|
||||
php-script.
|
||||
|
||||
17. Is PHP limited to process GET and POST request methods only?
|
||||
|
||||
No, it is possible to handle any request method, e.g. CONNECT. Proper
|
||||
response status can be sent with header(). If only GET and POST
|
||||
methods should be handled, it can be achieved with this Apache
|
||||
configuration:
|
||||
<LimitExcept GET POST>
|
||||
Deny from all
|
||||
</LimitExcept>
|
||||
@@ -1,6 +1,6 @@
|
||||
--------------------------------------------------------------------
|
||||
The PHP License, version 3.01
|
||||
Copyright (c) 1999 - 2006 The PHP Group. All rights reserved.
|
||||
The PHP License, Version 3.0
|
||||
Copyright (c) 1999 - 2003 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>.
|
||||
+4
-4
@@ -7,17 +7,17 @@ $(builddir)/zend_language_scanner.lo: $(builddir)/zend_language_parser.h
|
||||
$(builddir)/zend_ini_scanner.lo: $(builddir)/zend_ini_parser.h
|
||||
|
||||
$(builddir)/zend_language_scanner.c: $(srcdir)/zend_language_scanner.l
|
||||
@$(LEX) -Pzend -S$(srcdir)/flex.skl -o$@ -i $(srcdir)/zend_language_scanner.l
|
||||
$(LEX) -Pzend -S$(srcdir)/flex.skl -o$@ -i $(srcdir)/zend_language_scanner.l
|
||||
|
||||
$(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 $@
|
||||
$(YACC) -p zend -v -d $(srcdir)/zend_language_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 $@
|
||||
$(YACC) -p ini_ -v -d $(srcdir)/zend_ini_parser.y -o $@
|
||||
|
||||
$(builddir)/zend_ini_scanner.c: $(srcdir)/zend_ini_scanner.l
|
||||
@$(LEX) -Pini_ -S$(srcdir)/flex.skl -o$@ -i $(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: $(builddir)/zend_language_parser.h
|
||||
@@ -1,70 +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 'safe_mode=0' -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 'safe_mode=0' -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 | 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.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_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
|
||||
@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" --show-details php_lcov.info
|
||||
|
||||
lcov-clean:
|
||||
rm -f php_lcov.info
|
||||
rm -rf lcov_data/
|
||||
rm -rf lcov_html/
|
||||
|
||||
+14
-38
@@ -5,6 +5,7 @@ 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."
|
||||
@@ -25,10 +26,10 @@ install: $(all_targets) $(install_targets)
|
||||
install-sapi: $(OVERALL_TARGET)
|
||||
@echo "Installing PHP SAPI module: $(PHP_SAPI)"
|
||||
-@$(mkinstalldirs) $(INSTALL_ROOT)$(bindir)
|
||||
-@if test ! -r $(phptempdir)/libphp5.$(SHLIB_DL_SUFFIX_NAME); then \
|
||||
-@if test ! -r $(phptempdir)/libphp5.$(SHLIB_SUFFIX_NAME); then \
|
||||
for i in 0.0.0 0.0 0; do \
|
||||
if test -r $(phptempdir)/libphp5.$(SHLIB_DL_SUFFIX_NAME).$$i; then \
|
||||
$(LN_S) $(phptempdir)/libphp5.$(SHLIB_DL_SUFFIX_NAME).$$i $(phptempdir)/libphp5.$(SHLIB_DL_SUFFIX_NAME); \
|
||||
if test -r $(phptempdir)/libphp5.$(SHLIB_SUFFIX_NAME).$$i; then \
|
||||
$(LN_S) $(phptempdir)/libphp5.$(SHLIB_SUFFIX_NAME).$$i $(phptempdir)/libphp5.$(SHLIB_SUFFIX_NAME); \
|
||||
break; \
|
||||
fi; \
|
||||
done; \
|
||||
@@ -42,44 +43,19 @@ install-modules: build-modules
|
||||
@rm -f modules/*.la >/dev/null 2>&1
|
||||
@$(INSTALL) modules/* $(INSTALL_ROOT)$(EXTENSION_DIR)
|
||||
|
||||
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-su: install-pear
|
||||
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)
|
||||
|
||||
test: all
|
||||
-@if test ! -z "$(PHP_EXECUTABLE)" && test -x "$(PHP_EXECUTABLE)"; then \
|
||||
TEST_PHP_EXECUTABLE=$(PHP_EXECUTABLE) \
|
||||
TEST_PHP_SRCDIR=$(top_srcdir) \
|
||||
CC="$(CC)" \
|
||||
$(PHP_EXECUTABLE) -d 'open_basedir=' -d 'safe_mode=0' -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 \
|
||||
install-su: install-pear install-tester
|
||||
|
||||
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)" \
|
||||
$(top_builddir)/$(SAPI_CLI_PATH) -d 'open_basedir=' -d 'safe_mode=0' -d 'output_buffering=0' -d 'memory_limit=-1' $(top_srcdir)/run-tests.php $(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
|
||||
@@ -93,7 +69,7 @@ clean:
|
||||
|
||||
distclean: clean
|
||||
rm -f config.cache config.log config.status Makefile.objects Makefile.fragments libtool main/php_config.h stamp-h php5.spec sapi/apache/libphp5.module buildmk.stamp
|
||||
$(EGREP) define'.*include/php' $(top_srcdir)/configure | $(SED) 's/.*>//'|xargs rm -f
|
||||
egrep define'.*include/php' configure|sed 's/.*>//'|xargs rm -f
|
||||
find . -name Makefile | xargs rm -f
|
||||
|
||||
.PHONY: all clean install distclean test
|
||||
|
||||
+6
-14
@@ -29,22 +29,14 @@ Having said that, here are the organizational rules:
|
||||
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:
|
||||
HEAD Will become PHP 6.0. This CVS branch is for active development.
|
||||
PHP_5_2 Is used to release the PHP 5.2.x series. Only minor feature
|
||||
enhancements may go in here, but please keep that as infrequent as
|
||||
possible.
|
||||
PHP_5_1 Is used to release the PHP 5.1.x series. Only bugfixes are permitted
|
||||
on this branch (Consult the releasemaster prior to commit).
|
||||
PHP_5_0 This branch is closed.
|
||||
PHP_4_4 Is used to release the PHP 4.4.x series. Only bugfixes are permitted
|
||||
on this branch (Consult the releasemaster prior to commit).
|
||||
PHP_4_3 This branch is closed.
|
||||
HEAD Will become PHP 5.1. This CVS branch is for active development.
|
||||
PHP_5_0 Is used to release the PHP 5.0.x series. Only minor feature
|
||||
enhancements may go in here, but please keep that as infrequent as
|
||||
possible.
|
||||
PHP_4_3 Is used to release the PHP 4.3.x series. Only bugfixes are permitted
|
||||
on this branch.
|
||||
|
||||
The next few rules are more of a technical nature.
|
||||
|
||||
|
||||
+1
-1
@@ -34,7 +34,7 @@ ZEND_END_MODULE_GLOBALS(my_input_filter)
|
||||
|
||||
ZEND_DECLARE_MODULE_GLOBALS(my_input_filter)
|
||||
|
||||
zend_function_entry my_input_filter_functions[] = {
|
||||
function_entry my_input_filter_functions[] = {
|
||||
PHP_FE(my_get_raw, NULL)
|
||||
{NULL, NULL, NULL}
|
||||
};
|
||||
|
||||
@@ -7,6 +7,9 @@ Zend
|
||||
dimensional arrays.
|
||||
* Look at replacing c-lib call tolower().
|
||||
* Make hash API functions work with HASH_OF() to save time.
|
||||
* 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?)
|
||||
* 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
|
||||
@@ -64,6 +67,14 @@ documentation
|
||||
* Add developer documentation.
|
||||
* Add detailed documentation for Java extension.
|
||||
|
||||
ext/bz2
|
||||
-------
|
||||
* Add an ini directive to specify the size of decompression buffer.
|
||||
The default 4k is too small for large files and also requires much time
|
||||
for decompression. 40k is suitable for such files, however it may be too
|
||||
much under certain environments. There should be appropriate default
|
||||
settings for the various SAPI modules (e.g. apache and cli).
|
||||
|
||||
ext/curl
|
||||
--------
|
||||
* Have a warning scheme for when people use unsupported features.
|
||||
|
||||
@@ -1,4 +1,17 @@
|
||||
Zend Engine
|
||||
-----------
|
||||
- Look at making zend_constant value member be a zval* instead of zval. (Andi)
|
||||
- Add the patch for referring to existing .ini vars in .ini files. (Andrei)
|
||||
- Implement inheritance rules for type hints. (Marcus)
|
||||
- Implement true/false/NULL as keywords (apply the patch). (Andi, Marcus)
|
||||
- Implement typehinting for arrays (apply the patch). (Andi, Marcus)
|
||||
- Find a keyword for the if-set-or operator (apply the patch). (Marcus, all)
|
||||
- Fix ZTS destruction (apply the patch). (Marcus)
|
||||
|
||||
Build System
|
||||
------------
|
||||
- Implement load order of built-in extensions (apply the patch). (Wez)
|
||||
|
||||
Standard Library
|
||||
----------------
|
||||
- Implement new time/date parsing and handling functions. (Derick)
|
||||
@@ -0,0 +1,3 @@
|
||||
- clean up .cvsignores
|
||||
- purge Makefile.ins and replace PHP_EXTENSION in config.m4s
|
||||
with appropiate calls to PHP_NEW_EXTENSION
|
||||
+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
|
||||
|
||||
+54
-126
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Thread Safe Resource Manager |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1999-2006, 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,9 @@ typedef struct {
|
||||
size_t size;
|
||||
ts_allocate_ctor ctor;
|
||||
ts_allocate_dtor dtor;
|
||||
#ifdef MBO_0
|
||||
int done;
|
||||
#endif
|
||||
} tsrm_resource_type;
|
||||
|
||||
|
||||
@@ -92,28 +94,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) */
|
||||
@@ -176,9 +162,11 @@ TSRM_API void tsrm_shutdown(void)
|
||||
next_p = p->next;
|
||||
for (j=0; j<p->count; j++) {
|
||||
if (p->storage[j]) {
|
||||
#ifdef MBO_0
|
||||
if (resource_types_table && !resource_types_table[j].done && resource_types_table[j].dtor) {
|
||||
resource_types_table[j].dtor(p->storage[j], &p->storage);
|
||||
}
|
||||
#endif
|
||||
free(p->storage[j]);
|
||||
}
|
||||
}
|
||||
@@ -238,7 +226,9 @@ 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;
|
||||
#ifdef MBO_0
|
||||
resource_types_table[TSRM_UNSHUFFLE_RSRC_ID(*rsrc_id)].done = 0;
|
||||
#endif
|
||||
|
||||
/* enlarge the arrays for the already active threads */
|
||||
for (i=0; i<tsrm_tls_table_size; i++) {
|
||||
@@ -278,16 +268,26 @@ 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 MBO_0
|
||||
if (resource_types_table[i].done) {
|
||||
(*thread_resources_ptr)->storage[i] = NULL;
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
(*thread_resources_ptr)->storage[i] = (void *) malloc(resource_types_table[i].size);
|
||||
if (resource_types_table[i].ctor) {
|
||||
@@ -321,13 +321,22 @@ TSRM_API void *ts_resource_ex(ts_rsrc_id id, THREAD_T *th_id)
|
||||
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.
|
||||
@@ -378,65 +387,6 @@ TSRM_API void *ts_resource_ex(ts_rsrc_id id, THREAD_T *th_id)
|
||||
#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);
|
||||
}
|
||||
|
||||
|
||||
/* frees all resources allocated for the current thread */
|
||||
void ts_free_thread(void)
|
||||
@@ -467,7 +417,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,55 +434,10 @@ 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)
|
||||
{
|
||||
#ifdef MBO_0
|
||||
int i;
|
||||
int j = TSRM_UNSHUFFLE_RSRC_ID(id);
|
||||
|
||||
@@ -557,6 +466,7 @@ void ts_free_id(ts_rsrc_id id)
|
||||
tsrm_mutex_unlock(tsmm_mutex);
|
||||
|
||||
TSRM_ERROR((TSRM_ERROR_LEVEL_CORE, "Successfully freed resource id %d", id));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -625,6 +535,12 @@ TSRM_API void tsrm_mutex_free(MUTEX_T mutexp)
|
||||
#ifdef TSRM_WIN32
|
||||
DeleteCriticalSection(mutexp);
|
||||
free(mutexp);
|
||||
#elif defined(NETWARE)
|
||||
#ifdef USE_MPK
|
||||
kMutexFree(mutexp);
|
||||
#else
|
||||
NXMutexFree(mutexp);
|
||||
#endif
|
||||
#elif defined(GNUPTH)
|
||||
free(mutexp);
|
||||
#elif defined(PTHREADS)
|
||||
@@ -654,6 +570,12 @@ TSRM_API int tsrm_mutex_lock(MUTEX_T mutexp)
|
||||
#ifdef TSRM_WIN32
|
||||
EnterCriticalSection(mutexp);
|
||||
return 1;
|
||||
#elif defined(NETWARE)
|
||||
#ifdef USE_MPK
|
||||
return kMutexLock(mutexp);
|
||||
#else
|
||||
return NXLock(mutexp);
|
||||
#endif
|
||||
#elif defined(GNUPTH)
|
||||
return pth_mutex_acquire(mutexp, 0, NULL);
|
||||
#elif defined(PTHREADS)
|
||||
@@ -679,6 +601,12 @@ TSRM_API int tsrm_mutex_unlock(MUTEX_T mutexp)
|
||||
#ifdef TSRM_WIN32
|
||||
LeaveCriticalSection(mutexp);
|
||||
return 1;
|
||||
#elif defined(NETWARE)
|
||||
#ifdef USE_MPK
|
||||
return kMutexUnlock(mutexp);
|
||||
#else
|
||||
return NXUnlock(mutexp);
|
||||
#endif
|
||||
#elif defined(GNUPTH)
|
||||
return pth_mutex_release(mutexp);
|
||||
#elif defined(PTHREADS)
|
||||
|
||||
+2
-11
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Thread Safe Resource Manager |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1999-2006, 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 |
|
||||
+----------------------------------------------------------------------+
|
||||
@@ -106,9 +106,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);
|
||||
|
||||
@@ -135,18 +132,12 @@ 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 TSRMLS_SET_CTX(ctx) (void ***) ctx = 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
|
||||
|
||||
+2
-2
@@ -87,11 +87,11 @@ int main() {
|
||||
], [
|
||||
dnl For cross compiling running this test is of no use. NetWare supports pthreads
|
||||
pthreads_working=no
|
||||
case $host_alias in
|
||||
case $target_alias in
|
||||
*netware*)
|
||||
pthreads_working=yes
|
||||
esac
|
||||
]
|
||||
]
|
||||
) ] )dnl
|
||||
dnl
|
||||
dnl PTHREADS_CHECK()
|
||||
|
||||
+1
-1
@@ -96,7 +96,7 @@ 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,11 @@
|
||||
#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
|
||||
@@ -42,8 +42,6 @@ char *alloca ();
|
||||
#ifndef MAXPATHLEN
|
||||
# ifdef PATH_MAX
|
||||
# define MAXPATHLEN PATH_MAX
|
||||
# elif defined(MAX_PATH)
|
||||
# define MAXPATHLEN MAX_PATH
|
||||
# else
|
||||
# define MAXPATHLEN 256
|
||||
# endif
|
||||
|
||||
+3
-3
@@ -2,12 +2,12 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| PHP Version 5 |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1997-2006 The PHP Group |
|
||||
| Copyright (c) 1997-2004 The PHP Group |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 3.01 of the PHP license, |
|
||||
| This source file is subject to version 3.0 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 |
|
||||
| http://www.php.net/license/3_0.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. |
|
||||
|
||||
+3
-3
@@ -2,12 +2,12 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| PHP Version 5 |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1997-2006 The PHP Group |
|
||||
| Copyright (c) 1997-2004 The PHP Group |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 3.01 of the PHP license, |
|
||||
| This source file is subject to version 3.0 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 |
|
||||
| http://www.php.net/license/3_0.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. |
|
||||
|
||||
+62
-200
@@ -2,12 +2,12 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| PHP Version 5 |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1997-2006 The PHP Group |
|
||||
| Copyright (c) 1997-2004 The PHP Group |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 3.01 of the PHP license, |
|
||||
| This source file is subject to version 3.0 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 |
|
||||
| http://www.php.net/license/3_0.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. |
|
||||
@@ -27,7 +27,6 @@
|
||||
#include <errno.h>
|
||||
#include <stdlib.h>
|
||||
#include <fcntl.h>
|
||||
#include <time.h>
|
||||
|
||||
#include "tsrm_virtual_cwd.h"
|
||||
#include "tsrm_strtok_r.h"
|
||||
@@ -43,7 +42,8 @@
|
||||
#endif
|
||||
|
||||
#ifdef NETWARE
|
||||
#include <fsio.h>
|
||||
/*#include "pipe.h"*/
|
||||
#include "tsrm_nw.h"
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_REALPATH
|
||||
@@ -60,9 +60,9 @@ MUTEX_T cwd_mutex;
|
||||
#endif
|
||||
|
||||
#ifdef ZTS
|
||||
ts_rsrc_id cwd_globals_id;
|
||||
static ts_rsrc_id cwd_globals_id;
|
||||
#else
|
||||
virtual_cwd_globals cwd_globals;
|
||||
static virtual_cwd_globals cwd_globals;
|
||||
#endif
|
||||
|
||||
cwd_state main_cwd_state; /* True global */
|
||||
@@ -142,9 +142,15 @@ static int php_check_dots(const char *element, int n)
|
||||
|
||||
static int php_is_dir_ok(const cwd_state *state)
|
||||
{
|
||||
#if !(defined(NETWARE) && defined(CLIB_STAT_PATCH))
|
||||
struct stat buf;
|
||||
|
||||
if (stat(state->cwd, &buf) == 0 && S_ISDIR(buf.st_mode))
|
||||
#else
|
||||
struct stat_libc buf;
|
||||
|
||||
if (stat(state->cwd, (struct stat*)(&buf)) == 0 && S_ISDIR(buf.st_mode))
|
||||
#endif
|
||||
return (0);
|
||||
|
||||
return (1);
|
||||
@@ -152,9 +158,15 @@ static int php_is_dir_ok(const cwd_state *state)
|
||||
|
||||
static int php_is_file_ok(const cwd_state *state)
|
||||
{
|
||||
#if !(defined(NETWARE) && defined(CLIB_STAT_PATCH))
|
||||
struct stat buf;
|
||||
|
||||
if (stat(state->cwd, &buf) == 0 && S_ISREG(buf.st_mode))
|
||||
#else
|
||||
struct stat_libc buf;
|
||||
|
||||
if (stat(state->cwd, (struct stat*)(&buf)) == 0 && S_ISREG(buf.st_mode))
|
||||
#endif
|
||||
return (0);
|
||||
|
||||
return (1);
|
||||
@@ -163,27 +175,11 @@ static int php_is_file_ok(const cwd_state *state)
|
||||
static void cwd_globals_ctor(virtual_cwd_globals *cwd_globals TSRMLS_DC)
|
||||
{
|
||||
CWD_STATE_COPY(&cwd_globals->cwd, &main_cwd_state);
|
||||
cwd_globals->realpath_cache_size = 0;
|
||||
cwd_globals->realpath_cache_size_limit = REALPATH_CACHE_SIZE;
|
||||
cwd_globals->realpath_cache_ttl = REALPATH_CACHE_TTL;
|
||||
memset(cwd_globals->realpath_cache, 0, sizeof(cwd_globals->realpath_cache));
|
||||
}
|
||||
|
||||
static void cwd_globals_dtor(virtual_cwd_globals *cwd_globals TSRMLS_DC)
|
||||
{
|
||||
CWD_STATE_FREE(&cwd_globals->cwd);
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < sizeof(cwd_globals->realpath_cache)/sizeof(cwd_globals->realpath_cache[0]); i++) {
|
||||
realpath_cache_bucket *p = cwd_globals->realpath_cache[i];
|
||||
while (p != NULL) {
|
||||
realpath_cache_bucket *r = p;
|
||||
p = p->next;
|
||||
free(r);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static char *tsrm_strndup(const char *s, size_t length)
|
||||
@@ -206,20 +202,7 @@ CWD_API void virtual_cwd_startup(void)
|
||||
char cwd[MAXPATHLEN];
|
||||
char *result;
|
||||
|
||||
#ifdef NETWARE
|
||||
result = getcwdpath(cwd, NULL, 1);
|
||||
if(result)
|
||||
{
|
||||
char *c=cwd;
|
||||
while(c = strchr(c, '\\'))
|
||||
{
|
||||
*c='/';
|
||||
++c;
|
||||
}
|
||||
}
|
||||
#else
|
||||
result = getcwd(cwd, sizeof(cwd));
|
||||
#endif
|
||||
if (!result) {
|
||||
cwd[0] = '\0';
|
||||
}
|
||||
@@ -304,63 +287,6 @@ CWD_API char *virtual_getcwd(char *buf, size_t size TSRMLS_DC)
|
||||
return buf;
|
||||
}
|
||||
|
||||
static inline unsigned long realpath_cache_key(const char *path, int path_len)
|
||||
{
|
||||
register unsigned long h;
|
||||
|
||||
const char *e = path + path_len;
|
||||
for (h = 2166136261U; path < e; ) {
|
||||
h *= 16777619;
|
||||
h ^= *path++;
|
||||
}
|
||||
return h;
|
||||
}
|
||||
|
||||
static inline void realpath_cache_add(const char *path, int path_len, const char *realpath, int realpath_len, time_t t TSRMLS_DC)
|
||||
{
|
||||
long size = sizeof(realpath_cache_bucket) + path_len + 1 + realpath_len + 1;
|
||||
if (CWDG(realpath_cache_size) + size <= CWDG(realpath_cache_size_limit)) {
|
||||
realpath_cache_bucket *bucket = malloc(size);
|
||||
unsigned long n;
|
||||
|
||||
bucket->key = realpath_cache_key(path, path_len);
|
||||
bucket->path = (char*)bucket + sizeof(realpath_cache_bucket);
|
||||
memcpy(bucket->path, path, path_len+1);
|
||||
bucket->path_len = path_len;
|
||||
bucket->realpath = bucket->path + (path_len + 1);
|
||||
memcpy(bucket->realpath, realpath, realpath_len+1);
|
||||
bucket->realpath_len = realpath_len;
|
||||
bucket->expires = t + CWDG(realpath_cache_ttl);
|
||||
n = bucket->key % (sizeof(CWDG(realpath_cache)) / sizeof(CWDG(realpath_cache)[0]));
|
||||
bucket->next = CWDG(realpath_cache)[n];
|
||||
CWDG(realpath_cache)[n] = bucket;
|
||||
CWDG(realpath_cache_size) += size;
|
||||
}
|
||||
}
|
||||
|
||||
static inline realpath_cache_bucket* realpath_cache_find(const char *path, int path_len, time_t t TSRMLS_DC)
|
||||
{
|
||||
unsigned long key = realpath_cache_key(path, path_len);
|
||||
unsigned long n = key % (sizeof(CWDG(realpath_cache)) / sizeof(CWDG(realpath_cache)[0]));
|
||||
realpath_cache_bucket **bucket = &CWDG(realpath_cache)[n];
|
||||
|
||||
while (*bucket != NULL) {
|
||||
if (CWDG(realpath_cache_ttl) && (*bucket)->expires < t) {
|
||||
realpath_cache_bucket *r = *bucket;
|
||||
*bucket = (*bucket)->next;
|
||||
CWDG(realpath_cache_size) -= sizeof(realpath_cache_bucket) + r->path_len + 1 + r->realpath_len + 1;
|
||||
free(r);
|
||||
} else if (key == (*bucket)->key && path_len == (*bucket)->path_len &&
|
||||
memcmp(path, (*bucket)->path, path_len) == 0) {
|
||||
return *bucket;
|
||||
} else {
|
||||
bucket = &(*bucket)->next;
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
/* Resolve path relatively to state and put the real path into state */
|
||||
/* returns 0 for ok, 1 for error */
|
||||
CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func verify_path, int use_realpath)
|
||||
@@ -369,7 +295,7 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func
|
||||
char *ptr, *path_copy;
|
||||
char *tok = NULL;
|
||||
int ptr_length;
|
||||
cwd_state old_state;
|
||||
cwd_state *old_state;
|
||||
int ret = 0;
|
||||
int copy_amount = -1;
|
||||
char *free_path;
|
||||
@@ -379,55 +305,19 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func
|
||||
#else
|
||||
char *new_path;
|
||||
#endif
|
||||
char orig_path[MAXPATHLEN];
|
||||
int orig_path_len = 0;
|
||||
realpath_cache_bucket *bucket;
|
||||
time_t t = 0;
|
||||
TSRMLS_FETCH();
|
||||
|
||||
if (path_length == 0)
|
||||
return (0);
|
||||
if (path_length >= MAXPATHLEN)
|
||||
return (1);
|
||||
|
||||
if (use_realpath && CWDG(realpath_cache_size_limit)) {
|
||||
if (IS_ABSOLUTE_PATH(path, path_length) || (state->cwd_length < 1)) {
|
||||
memcpy(orig_path, path, path_length+1);
|
||||
orig_path_len = path_length;
|
||||
} else {
|
||||
orig_path_len = path_length + state->cwd_length + 1;
|
||||
if (orig_path_len >= MAXPATHLEN) {
|
||||
return 1;
|
||||
}
|
||||
memcpy(orig_path, state->cwd, state->cwd_length);
|
||||
orig_path[state->cwd_length] = DEFAULT_SLASH;
|
||||
memcpy(orig_path + state->cwd_length + 1, path, path_length + 1);
|
||||
}
|
||||
t = CWDG(realpath_cache_ttl)?time(NULL):0;
|
||||
if ((bucket = realpath_cache_find(orig_path, orig_path_len, t TSRMLS_CC)) != NULL) {
|
||||
int len = bucket->realpath_len;
|
||||
|
||||
CWD_STATE_COPY(&old_state, state);
|
||||
state->cwd = (char *) realloc(state->cwd, len+1);
|
||||
memcpy(state->cwd, bucket->realpath, len+1);
|
||||
state->cwd_length = len;
|
||||
if (verify_path && verify_path(state)) {
|
||||
CWD_STATE_FREE(state);
|
||||
*state = old_state;
|
||||
return 1;
|
||||
} else {
|
||||
CWD_STATE_FREE(&old_state);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
#if !defined(TSRM_WIN32) && !defined(NETWARE)
|
||||
/* cwd_length can be 0 when getcwd() fails.
|
||||
* This can happen under solaris when a dir does not have read permissions
|
||||
* but *does* have execute permissions */
|
||||
if (IS_ABSOLUTE_PATH(path, path_length) || (state->cwd_length < 1)) {
|
||||
if (use_realpath) {
|
||||
if (realpath(path, resolved_path)) { /* Note: Not threadsafe on older *BSD's */
|
||||
if (realpath(path, resolved_path)) {
|
||||
path = resolved_path;
|
||||
path_length = strlen(path);
|
||||
} else {
|
||||
@@ -468,14 +358,13 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func
|
||||
#endif
|
||||
#if defined(TSRM_WIN32)
|
||||
{
|
||||
char *dummy = NULL;
|
||||
int new_path_length;
|
||||
|
||||
new_path_length = GetLongPathName(path, NULL, 0);
|
||||
new_path_length = GetLongPathName(path, dummy, 0) + 1;
|
||||
if (new_path_length == 0) {
|
||||
goto php_failed_getlongpath;
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* GetLongPathName already counts the \0 */
|
||||
new_path = (char *) malloc(new_path_length);
|
||||
if (!new_path) {
|
||||
return 1;
|
||||
@@ -486,14 +375,14 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func
|
||||
path_length = new_path_length;
|
||||
} else {
|
||||
free(new_path);
|
||||
php_failed_getlongpath:
|
||||
new_path = NULL;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
free_path = path_copy = tsrm_strndup(path, path_length);
|
||||
|
||||
CWD_STATE_COPY(&old_state, state);
|
||||
old_state = (cwd_state *) malloc(sizeof(cwd_state));
|
||||
CWD_STATE_COPY(old_state, state);
|
||||
#if VIRTUAL_CWD_DEBUG
|
||||
fprintf(stderr,"cwd = %s path = %s\n", state->cwd, path);
|
||||
#endif
|
||||
@@ -513,7 +402,7 @@ php_failed_getlongpath:
|
||||
memcpy(state->cwd, path_copy, copy_amount);
|
||||
path_copy += copy_amount;
|
||||
} else {
|
||||
memcpy(state->cwd, old_state.cwd, copy_amount);
|
||||
memcpy(state->cwd, old_state->cwd, copy_amount);
|
||||
}
|
||||
}
|
||||
state->cwd[copy_amount] = '\0';
|
||||
@@ -556,19 +445,8 @@ php_failed_getlongpath:
|
||||
state->cwd[state->cwd_length++] = DEFAULT_SLASH;
|
||||
}
|
||||
#elif defined(NETWARE)
|
||||
/*
|
||||
Below code keeps appending to state->cwd a File system seperator
|
||||
cases where this appending should not happen is given below,
|
||||
a) sys: should just be left as it is
|
||||
b) sys:system should just be left as it is,
|
||||
Colon is allowed only in the first token as volume names alone can have the : in their names.
|
||||
Files and Directories cannot have : in their names
|
||||
So the check goes like this,
|
||||
For second token and above simply append the DEFAULT_SLASH to the state->cwd.
|
||||
For first token check for the existence of :
|
||||
if it exists don't append the DEFAULT_SLASH to the state->cwd.
|
||||
*/
|
||||
if(((state->cwd_length == 0) && (strchr(ptr, ':') == NULL)) || (state->cwd_length > 0)) {
|
||||
/* If the token is a volume name, it will have colon at the end -- so, no slash before it */
|
||||
if (ptr[ptr_length-1] != ':') {
|
||||
state->cwd[state->cwd_length++] = DEFAULT_SLASH;
|
||||
}
|
||||
#else
|
||||
@@ -592,26 +470,24 @@ php_failed_getlongpath:
|
||||
state->cwd_length = path_length;
|
||||
}
|
||||
|
||||
if (verify_path && verify_path(state)) {
|
||||
CWD_STATE_FREE(state);
|
||||
|
||||
*state = *old_state;
|
||||
|
||||
ret = 1;
|
||||
} else {
|
||||
CWD_STATE_FREE(old_state);
|
||||
ret = 0;
|
||||
}
|
||||
|
||||
free(old_state);
|
||||
#ifdef TSRM_WIN32
|
||||
if (new_path) {
|
||||
free(new_path);
|
||||
}
|
||||
#endif
|
||||
free(free_path);
|
||||
|
||||
if (use_realpath && CWDG(realpath_cache_size_limit)) {
|
||||
realpath_cache_add(orig_path, orig_path_len, state->cwd, state->cwd_length, t TSRMLS_CC);
|
||||
}
|
||||
|
||||
if (verify_path && verify_path(state)) {
|
||||
CWD_STATE_FREE(state);
|
||||
*state = old_state;
|
||||
ret = 1;
|
||||
} else {
|
||||
CWD_STATE_FREE(&old_state);
|
||||
ret = 0;
|
||||
}
|
||||
|
||||
#if VIRTUAL_CWD_DEBUG
|
||||
fprintf (stderr, "virtual_file_ex() = %s\n",state->cwd);
|
||||
#endif
|
||||
@@ -765,7 +641,7 @@ 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)
|
||||
{
|
||||
cwd_state new_state;
|
||||
int ret;
|
||||
@@ -773,15 +649,7 @@ CWD_API int virtual_chown(const char *filename, uid_t owner, gid_t group, int li
|
||||
CWD_STATE_COPY(&new_state, &CWDG(cwd));
|
||||
virtual_file_ex(&new_state, filename, NULL, 0);
|
||||
|
||||
if (link) {
|
||||
#if HAVE_LCHOWN
|
||||
ret = lchown(new_state.cwd, owner, group);
|
||||
#else
|
||||
ret = -1;
|
||||
#endif
|
||||
} else {
|
||||
ret = chown(new_state.cwd, owner, group);
|
||||
}
|
||||
ret = chown(new_state.cwd, owner, group);
|
||||
|
||||
CWD_STATE_FREE(&new_state);
|
||||
return ret;
|
||||
@@ -848,23 +716,37 @@ CWD_API int virtual_rename(char *oldname, char *newname TSRMLS_DC)
|
||||
return retval;
|
||||
}
|
||||
|
||||
#if !(defined(NETWARE) && defined(CLIB_STAT_PATCH))
|
||||
CWD_API int virtual_stat(const char *path, struct stat *buf TSRMLS_DC)
|
||||
{
|
||||
cwd_state new_state;
|
||||
int retval;
|
||||
|
||||
CWD_STATE_COPY(&new_state, &CWDG(cwd));
|
||||
if (virtual_file_ex(&new_state, path, NULL, 1)) {
|
||||
return -1;
|
||||
}
|
||||
virtual_file_ex(&new_state, path, NULL, 1);
|
||||
|
||||
retval = stat(new_state.cwd, buf);
|
||||
|
||||
CWD_STATE_FREE(&new_state);
|
||||
return retval;
|
||||
}
|
||||
#else
|
||||
CWD_API int virtual_stat(const char *path, struct stat_libc *buf TSRMLS_DC)
|
||||
{
|
||||
cwd_state new_state;
|
||||
int retval;
|
||||
|
||||
#if !defined(TSRM_WIN32)
|
||||
CWD_STATE_COPY(&new_state, &CWDG(cwd));
|
||||
virtual_file_ex(&new_state, path, NULL, 1);
|
||||
|
||||
retval = stat(new_state.cwd, (struct stat*)buf);
|
||||
|
||||
CWD_STATE_FREE(&new_state);
|
||||
return retval;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef TSRM_WIN32
|
||||
CWD_API int virtual_lstat(const char *path, struct stat *buf TSRMLS_DC)
|
||||
{
|
||||
cwd_state new_state;
|
||||
@@ -1003,7 +885,7 @@ CWD_API FILE *virtual_popen(const char *command, const char *type TSRMLS_DC)
|
||||
dir_length = CWDG(cwd).cwd_length;
|
||||
dir = CWDG(cwd).cwd;
|
||||
|
||||
ptr = command_line = (char *) malloc(command_length + sizeof("cd '' ; ") + dir_length + extra+1+1);
|
||||
ptr = command_line = (char *) malloc(command_length + sizeof("cd '' ; ") + dir_length +extra+1+1);
|
||||
if (!command_line) {
|
||||
return NULL;
|
||||
}
|
||||
@@ -1043,26 +925,6 @@ CWD_API FILE *virtual_popen(const char *command, const char *type TSRMLS_DC)
|
||||
|
||||
#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)
|
||||
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
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Local variables:
|
||||
|
||||
+30
-35
@@ -2,12 +2,12 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| PHP Version 5 |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1997-2006 The PHP Group |
|
||||
| Copyright (c) 1997-2004 The PHP Group |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 3.01 of the PHP license, |
|
||||
| This source file is subject to version 3.0 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 |
|
||||
| http://www.php.net/license/3_0.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. |
|
||||
@@ -74,9 +74,10 @@ typedef unsigned short mode_t;
|
||||
#define DEFAULT_DIR_SEPARATOR ';'
|
||||
#define IS_SLASH(c) ((c) == '/' || (c) == '\\')
|
||||
#define IS_SLASH_P(c) IS_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
|
||||
@@ -140,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);
|
||||
@@ -166,8 +171,23 @@ CWD_API int virtual_access(const char *pathname, int mode TSRMLS_DC);
|
||||
#endif
|
||||
#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)
|
||||
char *php_realpath_hack(char *src, char *dest);
|
||||
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
|
||||
@@ -175,37 +195,18 @@ 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
|
||||
|
||||
CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func verify_path, int use_realpath);
|
||||
|
||||
#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;
|
||||
time_t expires;
|
||||
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
|
||||
|
||||
@@ -228,7 +229,7 @@ extern virtual_cwd_globals cwd_globals;
|
||||
#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)
|
||||
#ifndef TSRM_WIN32
|
||||
#define VCWD_LSTAT(path, buff) virtual_lstat(path, buff TSRMLS_CC)
|
||||
#endif
|
||||
#define VCWD_UNLINK(path) virtual_unlink(path TSRMLS_CC)
|
||||
@@ -242,10 +243,7 @@ extern virtual_cwd_globals cwd_globals;
|
||||
#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
|
||||
@@ -288,9 +286,6 @@ extern virtual_cwd_globals cwd_globals;
|
||||
#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
|
||||
|
||||
+3
-3
@@ -2,12 +2,12 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| PHP Version 5 |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1997-2006 The PHP Group |
|
||||
| Copyright (c) 1997-2004 The PHP Group |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 3.01 of the PHP license, |
|
||||
| This source file is subject to version 3.0 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 |
|
||||
| http://www.php.net/license/3_0.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. |
|
||||
|
||||
+3
-3
@@ -2,12 +2,12 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| PHP Version 5 |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1997-2006 The PHP Group |
|
||||
| Copyright (c) 1997-2004 The PHP Group |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 3.01 of the PHP license, |
|
||||
| This source file is subject to version 3.0 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 |
|
||||
| http://www.php.net/license/3_0.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. |
|
||||
|
||||
@@ -1,548 +0,0 @@
|
||||
$Id$
|
||||
|
||||
UPGRADE NOTES - PHP 5.1
|
||||
|
||||
1. Changes in reference handling
|
||||
a. Overview
|
||||
b. Code that worked under PHP 4.3, but now fails
|
||||
c. Code that was valid under PHP 4.3, but now throws an error
|
||||
d. Code that failed under PHP 4.3, but now works
|
||||
e. Code that 'should have worked' under PHP 5.0
|
||||
f. Warnings that came and went
|
||||
2. Reading []
|
||||
3. instanceof, is_a(), is_subclass_of(), catch
|
||||
4. Integer values in function parameters
|
||||
5. Abstract private methods
|
||||
6. Access modifiers in interfaces
|
||||
7. Changes in inheritance rules
|
||||
8. Class constants
|
||||
9. Extensions
|
||||
a. Extensions that are gone from the PHP core
|
||||
b. Class constants in new PHP 5.1 extensions
|
||||
10. Date/time support
|
||||
11. Changes in database support
|
||||
a. PDO overview
|
||||
b. Changes in MySQL support
|
||||
c. Changes in SQLite support
|
||||
12. Further migration information
|
||||
13. Checking for E_STRICT errors
|
||||
|
||||
===============================================================================
|
||||
|
||||
1. Changes in reference handling
|
||||
================================
|
||||
|
||||
1a. Overview
|
||||
============
|
||||
|
||||
>From the PHP script writer's point of view, the change most likely to impact
|
||||
legacy code is in the way that references are handled in all PHP versions
|
||||
post-dating the PHP 4.4.0 release.
|
||||
|
||||
Until and including PHP 4.3, it was possible to send, assign or return variables
|
||||
by reference that should really be returned by value, such as a constant, a
|
||||
temporary value (e.g. the result of an expression), or the result of a function
|
||||
that had itself been returned by value, as here:
|
||||
|
||||
<?php
|
||||
|
||||
$foo = "123";
|
||||
|
||||
function return_value() {
|
||||
global $foo;
|
||||
return $foo;
|
||||
}
|
||||
|
||||
$bar = &return_value();
|
||||
|
||||
?>
|
||||
|
||||
Although this code would usually work as expected under PHP 4.3, in the general
|
||||
case the result is undefined. The Zend Engine could not act correctly on these
|
||||
values as references. This bug could and did lead to various hard-to-reproduce
|
||||
memory corruption problems, particularly where the code base was large.
|
||||
|
||||
In PHP 4.4.0, PHP 5.0.4 and all subsequent PHP releases, the Engine was fixed
|
||||
to 'know' when the reference operation is being used on a value that should
|
||||
not be referenced. The actual value is now used in such cases, and a warning
|
||||
is emitted. The warning takes the form of an E_NOTICE in PHP 4.4.0 and up,
|
||||
and E_STRICT in PHP 5.0.4 and up.
|
||||
|
||||
Code that could potentially produce memory corruption can no longer do so.
|
||||
However, some legacy code might work differently as a result.
|
||||
|
||||
1b. Code that worked under PHP 4.3, but now fails
|
||||
=================================================
|
||||
|
||||
<?php
|
||||
|
||||
function func(&$arraykey) {
|
||||
return $arraykey; // function returns by value!
|
||||
}
|
||||
|
||||
$array = array('a', 'b', 'c');
|
||||
foreach (array_keys($array) as $key) {
|
||||
$y = &func($array[$key]);
|
||||
$z[] =& $y;
|
||||
}
|
||||
|
||||
var_dump($z);
|
||||
|
||||
?>
|
||||
Running the above script under any version of PHP that pre-dates the reference
|
||||
fix would produce this output:
|
||||
|
||||
array(3) {
|
||||
[0]=>
|
||||
&string(1) "a"
|
||||
[1]=>
|
||||
&string(1) "b"
|
||||
[2]=>
|
||||
&string(1) "c"
|
||||
}
|
||||
|
||||
Following the reference fix, the same code would result in:
|
||||
|
||||
array(3) {
|
||||
[0]=>
|
||||
&string(1) "c"
|
||||
[1]=>
|
||||
&string(1) "c"
|
||||
[2]=>
|
||||
&string(1) "c"
|
||||
}
|
||||
|
||||
This is because, following the changes, func() assigns by value. The value
|
||||
of $y is re-assigned, and reference-binding is preserved from $z. Prior
|
||||
to the fix, the value was assigned by reference, leading $y to be
|
||||
re-bound on each assignment. The attempt to bind to a temporary value
|
||||
by reference was the cause of the memory corruption.
|
||||
|
||||
Such code can be made to work identically in both the pre-fix and the
|
||||
post-fix PHP versions. The signature of func() can be altered to return
|
||||
by reference, or the reference assignment can be removed from the result
|
||||
of func().
|
||||
|
||||
<?php
|
||||
|
||||
function func() {
|
||||
return 'function return';
|
||||
}
|
||||
|
||||
$x = 'original value';
|
||||
$y =& $x;
|
||||
$y = &func();
|
||||
echo $x;
|
||||
|
||||
?>
|
||||
|
||||
In PHP 4.3 $x would be 'original value', whereas after the changes it would
|
||||
be 'function return' - remember that where the function does not return by
|
||||
reference, the reference assignment is converted to a regular assignment.
|
||||
Again, this can be brought to a common base, either by forcing func() to
|
||||
return by reference or by eliminating the by-reference assignment.
|
||||
|
||||
1c. Code that was valid under PHP 4.3, but now throws an error
|
||||
==============================================================
|
||||
|
||||
<?php
|
||||
|
||||
class Foo {
|
||||
|
||||
function getThis() {
|
||||
return $this;
|
||||
}
|
||||
|
||||
function destroyThis() {
|
||||
$baz =& $this->getThis();
|
||||
}
|
||||
}
|
||||
|
||||
$bar = new Foo();
|
||||
$bar->destroyThis();
|
||||
var_dump($bar);
|
||||
|
||||
?>
|
||||
|
||||
In PHP 5.0.3, $bar evaluated to NULL instead of returning an object.
|
||||
That happened because getThis() returns by value, but the value here
|
||||
is assigned by reference. Although it now works in the expected way,
|
||||
this is actually invalid code which will throw an E_NOTICE under
|
||||
PHP 4.4 or an E_STRICT under PHP 5.0.4 and up.
|
||||
|
||||
1d. Code that failed under PHP 4.3, but now works
|
||||
=================================================
|
||||
|
||||
<?php
|
||||
|
||||
function &f() {
|
||||
$x = "foo";
|
||||
var_dump($x);
|
||||
print "$x\n";
|
||||
return($a);
|
||||
}
|
||||
|
||||
for ($i = 0; $i < 3; $i++) {
|
||||
$h = &f();
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
In PHP 4.3 the third call to var_dump produces NULL, due to the memory
|
||||
corruption caused by returning an uninitialized value by reference.
|
||||
This is valid code in PHP 5.0.4 and up, but threw errors in earlier
|
||||
releases of PHP.
|
||||
|
||||
<?php
|
||||
|
||||
$arr = array('a1' => array('alfa' => 'ok'));
|
||||
$arr =& $arr['a1'];
|
||||
echo '-'.$arr['alfa']."-\n";
|
||||
|
||||
?>
|
||||
|
||||
Until PHP 5.0.5, it wasn't possible to assign an array element by
|
||||
reference in this way. It now is.
|
||||
|
||||
1e. Code that 'should have worked' under PHP 5.0
|
||||
================================================
|
||||
|
||||
There are a couple of instances of bugs reported under PHP 5.0 prior
|
||||
to the reference fixes which now 'work'. However, in both cases errors
|
||||
are thrown by PHP 5.1, because the code was invalid in the first place.
|
||||
Returning values by reference using self:: now works in the general
|
||||
case but throws an E_STRICT warning, and although your mileage may
|
||||
vary when assigning by reference to an overloaded object, you will
|
||||
still see an E_ERROR when you try it, even where the assignment
|
||||
itself appears to work.
|
||||
|
||||
1f. Warnings that came and went
|
||||
===============================
|
||||
|
||||
<?php
|
||||
|
||||
function & foo() {
|
||||
$var = 'ok';
|
||||
return $var;
|
||||
}
|
||||
|
||||
function & bar() {
|
||||
return foo();
|
||||
}
|
||||
|
||||
$a =& bar();
|
||||
echo "$a\n";
|
||||
|
||||
?>
|
||||
|
||||
Nested calls to functions returning by reference are valid code under both
|
||||
PHP 4.3 and PHP 5.1, but threw an unwarranted E_NOTICE or E_STRICT under
|
||||
the intervening PHP releases.
|
||||
|
||||
2. Reading []
|
||||
=============
|
||||
|
||||
<?php
|
||||
|
||||
class XmlTest {
|
||||
|
||||
function test_ref(&$test) {
|
||||
$test = "ok";
|
||||
}
|
||||
|
||||
function test($test) { }
|
||||
|
||||
function run() {
|
||||
$ar = array();
|
||||
$this->test_ref($ar[]);
|
||||
var_dump($ar);
|
||||
$this->test($ar[]);
|
||||
}
|
||||
}
|
||||
|
||||
$o = new XmlTest();
|
||||
$o->run();
|
||||
|
||||
?>
|
||||
|
||||
This should always have thrown a fatal E_ERROR, because [] cannot be used
|
||||
for reading in PHP. It is invalid code in PHP 4.4.2 and PHP 5.0.5 upward.
|
||||
|
||||
3. instanceof, is_a(), is_subclass_of(), catch
|
||||
==============================================
|
||||
|
||||
In PHP 5.0, is_a() was deprecated and replaced by the "instanceof" operator.
|
||||
There were some issues with the initial implementation of "instanceof", which
|
||||
relied on __autoload() to search for missing classes. If the class was not
|
||||
present, "instanceof" would throw a fatal E_ERROR due to the failure of
|
||||
__autoload() to discover that class. The same behaviour occurred in the
|
||||
"catch" operator and the is_subclass_of() function, for the same reason.
|
||||
|
||||
None of these functions or operators call __autoload() in PHP 5.1, and
|
||||
the class_exists() workarounds used in code written for PHP 5.0, while
|
||||
not problematic in any way, are no longer necessary.
|
||||
|
||||
4. Integer values in function parameters
|
||||
========================================
|
||||
|
||||
With the advent of PHP 5.0, a new parameter parsing API was introduced
|
||||
which is used by a large number of PHP functions. In all versions of
|
||||
PHP between 5.0 and 5.1, the handling of integer values was very strict
|
||||
and would reject non-well formed numeric values when a PHP function
|
||||
expected an integer. These checks have now been relaxed to support
|
||||
non-well formed numeric strings such as " 123" and "123 ", and will
|
||||
no longer fail as they did under PHP 5.0. However, to promote code
|
||||
safety and input validation, PHP functions will now emit an E_NOTICE
|
||||
when such strings are passed as integers.
|
||||
|
||||
5. Abstract private methods
|
||||
===========================
|
||||
|
||||
Abstract private methods were supported between PHP 5.0.0 and PHP 5.0.4,
|
||||
but were then disallowed on the grounds that the behaviours of 'private'
|
||||
and 'abstract' are mutually exclusive.
|
||||
|
||||
6. Access modifiers in interfaces
|
||||
=================================
|
||||
|
||||
Under PHP 5.0, function declarations in interfaces were treated in exactly
|
||||
the same way as function declarations in classes. This has not been the case
|
||||
since October 2004, at which point only the 'public' access modifier was
|
||||
allowed in interface function declarations. Since April 2005 - which pre-dates
|
||||
the PHP 5.0b1 release - the 'static' modifier has also been allowed. However,
|
||||
the 'protected' and 'private' modifiers will now throw an E_ERROR, as will
|
||||
'abstract'. Note that this change should not affect your existing code, as
|
||||
none of these modifiers makes sense in the context of interfaces anyway.
|
||||
|
||||
7. Changes in inheritance rules
|
||||
===============================
|
||||
|
||||
Under PHP 5.0, it was possible to have a function declaration in a derived class
|
||||
that did not match the declaration of the same function in the base class, e.g.
|
||||
|
||||
class Base {
|
||||
function &return_by_ref() {
|
||||
$r = 1;
|
||||
return $r;
|
||||
}
|
||||
}
|
||||
|
||||
class Derived extends Base {
|
||||
function return_by_ref() {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
This code will cause an E_STRICT error to be emitted under PHP 5.1.
|
||||
|
||||
8. Class constants
|
||||
==================
|
||||
|
||||
Under PHP 5.0, the following code was valid:
|
||||
|
||||
<?php
|
||||
|
||||
class test {
|
||||
const foobar = 'foo';
|
||||
const foobar = 'bar';
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
Under PHP 5.1, redefinition of a class constant will throw a fatal E_ERROR.
|
||||
|
||||
9. Extensions
|
||||
=============
|
||||
|
||||
9a. Extensions that are gone from the PHP core
|
||||
==============================================
|
||||
|
||||
One of the first things you're likely to notice when you download PHP 5.1 is that
|
||||
several of the older extensions have disappeared. Those extensions that are still
|
||||
actively maintained are available in the PHP Extension Community Library (PECL),
|
||||
at http://pecl.php.net. Windows binaries are built regularly, and you can obtain
|
||||
the binaries for PECL extensions built against PHP 5.1 from
|
||||
http://pecl4win.php.net/list.php/5_1.
|
||||
|
||||
Extension Alternative/status
|
||||
========= ========================
|
||||
ext/cpdf pecl/pdflib
|
||||
ext/dbx pecl/dbx
|
||||
ext/dio pecl/dio
|
||||
ext/fam not actively maintained
|
||||
ext/ingres_ii pecl/ingres
|
||||
ext/ircg not actively maintained
|
||||
ext/mcve pecl/mcve
|
||||
ext/mnogosearch not actively maintained
|
||||
ext/oracle ext/oci8 or ext/pdo_oci
|
||||
ext/ovrimos not actively maintained
|
||||
ext/pfpro not actively maintained
|
||||
- alternatives at http://pecl.php.net/packages.php?catpid=18&catname=Payment
|
||||
ext/w32api pecl/ffi
|
||||
ext/yp not actively maintained
|
||||
sapi/activescript http://pecl4win.php.net/ext.php/php5activescript.dll (PECL package)
|
||||
or pecl/activescript (CVS)
|
||||
|
||||
Modules in PECL that are not actively maintained (i.e. have not been supported
|
||||
for some time, have no active maintainer working on them currently, and do not
|
||||
have any PECL package releases), are still available in CVS at
|
||||
http://cvs.php.net/pecl/. However, unreleased PHP modules are by their nature
|
||||
unsupported, and your mileage may vary when attempting to install or use them.
|
||||
|
||||
9b. Class constants in new PHP 5.1 extensions
|
||||
=============================================
|
||||
|
||||
The Zend Engine 2.1 API allows extension developers to declare class constants
|
||||
in object oriented extensions. New extensions written for PHP 5.1, including SPL,
|
||||
PDO, ext/XMLReader and ext/date, have their constants in the format
|
||||
|
||||
PDO::CLASS_CONSTANT
|
||||
|
||||
rather than in the C format
|
||||
|
||||
PDO_CLASS_CONSTANT
|
||||
|
||||
in order to minimise pollution of the global namespace in PHP.
|
||||
|
||||
10. Date/time support
|
||||
====================
|
||||
|
||||
Date/time support has been fully rewritten in PHP 5.1, and no longer
|
||||
uses the system settings to 'know' the timezone in operation. It will
|
||||
instead utilize, in the following order:
|
||||
|
||||
* The timezone set using the date_default_timezone_set() function (if any)
|
||||
* The TZ environment variable (if non empty)
|
||||
* The date.timezone ini option (if set)
|
||||
* "magical" guess (if the operating system supports it)
|
||||
* If none of the above options succeeds, UTC
|
||||
|
||||
To ensure accuracy (and avoid an E_STRICT warning), you will need to define
|
||||
your timezone in your php.ini using the following format:
|
||||
|
||||
date.timezone = Europe/London
|
||||
|
||||
The supported timezones are listed, in this format, in the PHP manual at
|
||||
http://www.php.net/manual/en/timezones.php.
|
||||
|
||||
11. Changes in database support
|
||||
==============================
|
||||
|
||||
11a. PDO overview
|
||||
================
|
||||
|
||||
PHP Data Objects (PDO) were introduced as a PECL extension under PHP 5.0,
|
||||
and became part of the core PHP distribution in PHP 5.1. The PDO extension
|
||||
provides a consistent interface for database access, and is used alongside
|
||||
database-specific PDO drivers. Each driver may also have database-specific
|
||||
functions of its own, but basic data access functionality such as issuing
|
||||
queries and fetching data is covered by PDO functions, using the driver
|
||||
named in PDO::__construct().
|
||||
|
||||
Note that the PDO extension, and its drivers, are intended to be built as
|
||||
shared extensions. This will enable straightforward driver upgrades from
|
||||
PECL, without forcing you to rebuild all of PHP.
|
||||
|
||||
At the point of the PHP 5.1 release, PDO is more than ready for widespread
|
||||
testing and could be adopted in most situations. However, it is important
|
||||
to understand that PDO and its drivers are comparatively young and may be
|
||||
missing certain database-specific features; evaluate PDO carefully before
|
||||
you use it in new projects.
|
||||
|
||||
Legacy code will generally rely on the pre-existing database extensions,
|
||||
which are still maintained.
|
||||
|
||||
There is more in-depth information about the PDO extension in the manual
|
||||
at http://www.php.net/manual/ref.pdo.php.
|
||||
|
||||
11b. Changes in MySQL support
|
||||
============================
|
||||
|
||||
In PHP 4, MySQL 3 support was built-in. With the release of PHP 5.0 there
|
||||
were two MySQL extensions, named 'mysql' and 'mysqli', which were designed
|
||||
to support MySQL < 4.1 and MySQL 4.1 and up, respectively. With the
|
||||
introduction of PDO, which provides a very fast interface to all the
|
||||
database APIs supported by PHP, the PDO_MYSQL driver can support any
|
||||
of the current versions (MySQL 3, 4 or 5) in PHP code written for PDO,
|
||||
depending on the MySQL library version used during compilation. The
|
||||
older MySQL extensions remain in place for reasons of back compatibility,
|
||||
but are not enabled by default.
|
||||
|
||||
11c. Changes in SQLite support
|
||||
=============================
|
||||
|
||||
In PHP 5.0, SQLite 2 support was provided by the built-in sqlite
|
||||
extension, which was also available as a PECL extension in PHP 4.3
|
||||
and PHP 4.4. With the introduction of PDO, the sqlite extension doubles
|
||||
up to act as a 'sqlite2' driver for PDO; it is due to this that the
|
||||
sqlite extension in PHP 5.1 has a dependency upon the PDO extension.
|
||||
|
||||
PHP 5.1 ships with a number of alternative interfaces to sqlite:
|
||||
|
||||
The sqlite extension provides the "classic" sqlite procedural/OO API
|
||||
that you may have used in prior versions of PHP. It also provides the
|
||||
PDO 'sqlite2' driver, which allows you to access legacy SQLite 2
|
||||
databases using the PDO API.
|
||||
|
||||
PDO_SQLITE provides the 'sqlite' version 3 driver. SQLite version 3
|
||||
is vastly superior to SQLite version 2, but the file formats of the
|
||||
two versions are not compatible.
|
||||
|
||||
If your SQLite-based project is already written and working against
|
||||
earlier PHP versions, then you can continue to use ext/sqlite without
|
||||
problems, but will need to explicitly enable both PDO and sqlite. New
|
||||
projects should use PDO and the 'sqlite' (version 3) driver, as this is
|
||||
faster than SQLite 2, has improved locking concurrency, and supports
|
||||
both prepared statements and binary columns natively.
|
||||
|
||||
12. Further migration information
|
||||
================================
|
||||
|
||||
For general information about migrating from PHP 4 to PHP 5, please refer to
|
||||
the relevant section in the PHP manual at http://www.php.net/manual/migration5.php.
|
||||
|
||||
13. Checking for E_STRICT errors
|
||||
================================
|
||||
|
||||
If you only have a single script to check, you can pick up E_STRICT
|
||||
errors using PHP's commandline lint facility:
|
||||
|
||||
php -d error_reporting=4095 -l script_to_check.php
|
||||
|
||||
For larger projects, the shell script below will achieve the same task:
|
||||
|
||||
#!/bin/sh
|
||||
|
||||
directory=$1
|
||||
|
||||
shift
|
||||
|
||||
# These extensions are checked
|
||||
extensions="php inc"
|
||||
|
||||
check_file ()
|
||||
{
|
||||
echo -ne "Doing PHP syntax check on $1 ..."
|
||||
|
||||
# Options:
|
||||
ERRORS=`/www/php/bin/php -d display_errors=1 -d html_errors=0 -d error_prepend_string=" " -d error_append_string=" " -d error_reporting=4095 -l $1 | grep -v "No syntax errors detected"`
|
||||
|
||||
if test -z "$ERRORS"; then
|
||||
echo -ne "OK."
|
||||
else
|
||||
echo -e "Errors found!\n$ERRORS"
|
||||
fi
|
||||
|
||||
echo
|
||||
}
|
||||
|
||||
# loop over remaining file args
|
||||
for FILE in "$@" ; do
|
||||
for ext in $extensions; do
|
||||
if echo $FILE | grep "\.$ext$" > /dev/null; then
|
||||
if test -f $FILE; then
|
||||
check_file "$FILE"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
done
|
||||
-4468
File diff suppressed because it is too large.
Load diff
+1
-1
@@ -1,6 +1,6 @@
|
||||
--------------------------------------------------------------------
|
||||
The Zend Engine License, Version 2.00
|
||||
Copyright (c) 1999-2006 Zend Technologies Ltd. All rights reserved.
|
||||
Copyright (c) 1999-2003 Zend Technologies Ltd. All rights reserved.
|
||||
--------------------------------------------------------------------
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@ libZend_la_SOURCES=\
|
||||
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_mm.c \
|
||||
zend_default_classes.c \
|
||||
zend_default_classes.c zend_reflection_api.c \
|
||||
zend_iterators.c zend_interfaces.c zend_exceptions.c \
|
||||
zend_strtod.c zend_multibyte.c
|
||||
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
Zend/zend_execute.lo: $(srcdir)/zend_vm_execute.h $(srcdir)/zend_vm_opcodes.h
|
||||
@@ -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().
|
||||
|
||||
@@ -227,6 +227,10 @@ 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
|
||||
@@ -403,6 +407,10 @@ 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
|
||||
|
||||
+19
-53
@@ -4,6 +4,21 @@ dnl
|
||||
dnl This file contains Zend specific autoconf functions.
|
||||
dnl
|
||||
|
||||
AC_DEFUN([LIBZEND_BISON_CHECK],[
|
||||
|
||||
if test "$YACC" != "bison -y"; then
|
||||
AC_MSG_WARN(You will need bison if you want to regenerate the Zend parser.)
|
||||
else
|
||||
AC_MSG_CHECKING(bison version)
|
||||
set `bison --version| grep 'GNU Bison' | cut -d ' ' -f 4 | sed -e 's/\./ /' | tr -d 'a-z'`
|
||||
if test "${1}" = "1" -a "${2}" -lt "28"; then
|
||||
AC_MSG_WARN(You will need bison 1.28 if you want to regenerate the Zend parser (found ${1}.${2}).)
|
||||
fi
|
||||
AC_MSG_RESULT(${1}.${2} (ok))
|
||||
fi
|
||||
|
||||
])
|
||||
|
||||
AC_DEFUN([LIBZEND_CHECK_INT_TYPE],[
|
||||
AC_MSG_CHECKING(for $1)
|
||||
AC_TRY_COMPILE([
|
||||
@@ -121,25 +136,8 @@ AC_ARG_ENABLE(debug,
|
||||
|
||||
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(zend-memory-manager,
|
||||
[ --disable-zend-memory-manager
|
||||
Disable the Zend memory manager - FOR DEVELOPERS ONLY!!],
|
||||
[
|
||||
ZEND_USE_ZEND_ALLOC=$enableval
|
||||
], [
|
||||
ZEND_USE_ZEND_ALLOC=yes
|
||||
])
|
||||
|
||||
AC_ARG_ENABLE(maintainer-zts,
|
||||
[ --enable-maintainer-zts Enable thread safety - for code maintainers only!!],[
|
||||
[ --enable-maintainer-zts Enable thread safety - for code maintainers only],[
|
||||
ZEND_MAINTAINER_ZTS=$enableval
|
||||
],[
|
||||
ZEND_MAINTAINER_ZTS=no
|
||||
@@ -147,32 +145,26 @@ AC_ARG_ENABLE(maintainer-zts,
|
||||
|
||||
AC_ARG_ENABLE(inline-optimization,
|
||||
[ --disable-inline-optimization
|
||||
If building zend_execute.lo fails, try this switch],[
|
||||
If building zend_execute.lo fails, try this switch.],[
|
||||
ZEND_INLINE_OPTIMIZATION=$enableval
|
||||
],[
|
||||
ZEND_INLINE_OPTIMIZATION=yes
|
||||
])
|
||||
|
||||
AC_ARG_ENABLE(memory-limit,
|
||||
[ --enable-memory-limit Compile with memory limit support], [
|
||||
[ --enable-memory-limit Compile with memory limit support. ], [
|
||||
ZEND_MEMORY_LIMIT=$enableval
|
||||
],[
|
||||
ZEND_MEMORY_LIMIT=no
|
||||
])
|
||||
|
||||
AC_ARG_ENABLE(zend-multibyte,
|
||||
[ --enable-zend-multibyte Compile with zend multibyte support], [
|
||||
[ --enable-zend-multibyte Compile with zend multibyte support. ], [
|
||||
ZEND_MULTIBYTE=$enableval
|
||||
],[
|
||||
ZEND_MULTIBYTE=no
|
||||
])
|
||||
|
||||
AC_MSG_CHECKING([virtual machine dispatch method])
|
||||
AC_MSG_RESULT($PHP_ZEND_VM)
|
||||
|
||||
AC_MSG_CHECKING(whether to enable the Zend memory manager)
|
||||
AC_MSG_RESULT($ZEND_USE_ZEND_ALLOC)
|
||||
|
||||
AC_MSG_CHECKING(whether to enable thread-safety)
|
||||
AC_MSG_RESULT($ZEND_MAINTAINER_ZTS)
|
||||
|
||||
@@ -188,19 +180,6 @@ AC_MSG_RESULT($ZEND_DEBUG)
|
||||
AC_MSG_CHECKING(whether to enable Zend multibyte)
|
||||
AC_MSG_RESULT($ZEND_MULTIBYTE)
|
||||
|
||||
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"
|
||||
@@ -216,12 +195,6 @@ fi
|
||||
|
||||
test -n "$DEBUG_CFLAGS" && CFLAGS="$CFLAGS $DEBUG_CFLAGS"
|
||||
|
||||
if test "$ZEND_USE_ZEND_ALLOC" = "yes"; then
|
||||
AC_DEFINE(USE_ZEND_ALLOC,1,[Use Zend memory manager])
|
||||
else
|
||||
AC_DEFINE(USE_ZEND_ALLOC,0,[Use Zend memory manager])
|
||||
fi
|
||||
|
||||
if test "$ZEND_MAINTAINER_ZTS" = "yes"; then
|
||||
AC_DEFINE(ZTS,1,[ ])
|
||||
CFLAGS="$CFLAGS -DZTS"
|
||||
@@ -250,13 +223,6 @@ 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.
|
||||
|
||||
@@ -260,6 +260,10 @@ 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
|
||||
@@ -440,6 +444,10 @@ 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
|
||||
|
||||
+1
-15
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2006 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2004 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 |
|
||||
@@ -65,13 +65,6 @@ int zend_sprintf(char *buffer, const char *format, ...);
|
||||
|
||||
#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)
|
||||
@@ -105,13 +98,6 @@ int zend_sprintf(char *buffer, const char *format, ...);
|
||||
|
||||
#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
|
||||
|
||||
@@ -2,39 +2,6 @@ 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"
|
||||
|
||||
# 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([
|
||||
|
||||
-419
@@ -1,419 +0,0 @@
|
||||
<?php
|
||||
|
||||
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");
|
||||
?>
|
||||
-19
@@ -1,19 +0,0 @@
|
||||
/*
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2006 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,24 +0,0 @@
|
||||
--TEST--
|
||||
Test for abstract static classes
|
||||
--FILE--
|
||||
<?php
|
||||
abstract class ezcDbHandler extends PDO
|
||||
{
|
||||
public function __construct( $dbParams, $dsn )
|
||||
{
|
||||
$user = null;
|
||||
$pass = null;
|
||||
$driverOptions = null;
|
||||
}
|
||||
|
||||
abstract static public function getName();
|
||||
|
||||
static public function hasFeature( $feature )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
?>
|
||||
DONE
|
||||
--EXPECT--
|
||||
DONE
|
||||
@@ -1,15 +0,0 @@
|
||||
--TEST--
|
||||
Array type hint
|
||||
--FILE--
|
||||
<?php
|
||||
function foo(array $a) {
|
||||
echo count($a)."\n";
|
||||
}
|
||||
|
||||
foo(array(1,2,3));
|
||||
foo(123);
|
||||
?>
|
||||
--EXPECTF--
|
||||
3
|
||||
|
||||
Fatal error: Argument 1 passed to foo() must be an array, called in %sarray_type_hint_001.php on line 7 and defined in %sarray_type_hint_001.php on line 2
|
||||
@@ -34,3 +34,6 @@ $c->viewMom();
|
||||
--EXPECT--
|
||||
protected method
|
||||
protected property
|
||||
--EXPECT--
|
||||
protected method
|
||||
protected property
|
||||
@@ -18,17 +18,57 @@ for ($i = 0; $i < 8; $i++) {
|
||||
--EXPECTF--
|
||||
string(3) "foo"
|
||||
'foo'
|
||||
|
||||
Notice: Undefined variable: a in %s on line %d
|
||||
|
||||
Strict Standards: Only variable references should be returned by reference in %s on line %d
|
||||
string(3) "foo"
|
||||
'foo'
|
||||
|
||||
Notice: Undefined variable: a in %s on line %d
|
||||
|
||||
Strict Standards: Only variable references should be returned by reference in %s on line %d
|
||||
string(3) "foo"
|
||||
'foo'
|
||||
|
||||
Notice: Undefined variable: a in %s on line %d
|
||||
|
||||
Strict Standards: Only variable references should be returned by reference in %s on line %d
|
||||
string(3) "foo"
|
||||
'foo'
|
||||
|
||||
Notice: Undefined variable: a in %s on line %d
|
||||
|
||||
Strict Standards: Only variable references should be returned by reference in %s on line %d
|
||||
string(3) "foo"
|
||||
'foo'
|
||||
|
||||
Notice: Undefined variable: a in %s on line %d
|
||||
|
||||
Strict Standards: Only variable references should be returned by reference in %s on line %d
|
||||
string(3) "foo"
|
||||
'foo'
|
||||
|
||||
Notice: Undefined variable: a in %s on line %d
|
||||
|
||||
Strict Standards: Only variable references should be returned by reference in %s on line %d
|
||||
string(3) "foo"
|
||||
'foo'
|
||||
|
||||
Notice: Undefined variable: a in %s on line %d
|
||||
|
||||
Strict Standards: Only variable references should be returned by reference in %s on line %d
|
||||
string(3) "foo"
|
||||
'foo'
|
||||
|
||||
Notice: Undefined variable: a in %s on line %d
|
||||
|
||||
Strict Standards: Only variable references should be returned by reference in %s on line %d
|
||||
string(3) "foo"
|
||||
'foo'
|
||||
|
||||
Notice: Undefined variable: a in %s on line %d
|
||||
|
||||
Strict Standards: Only variable references should be returned by reference in %s on line %d
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ class Test {
|
||||
function __copy()
|
||||
{
|
||||
$string = PHP_VERSION;
|
||||
$version = $string[0];
|
||||
$version = $string{0};
|
||||
if($string < 5)
|
||||
{
|
||||
return $this;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
Bug #26077 (Memory leaks when creating an instance of an object)
|
||||
Bug #26077 Memory leaks when creating an instance of an object
|
||||
--FILE--
|
||||
<?php
|
||||
class foo {} new foo();
|
||||
|
||||
@@ -3,7 +3,7 @@ Bug #26281 (switch() crash when condition is a string offset)
|
||||
--FILE--
|
||||
<?php
|
||||
$x = 'abc';
|
||||
switch ($x[0]) {
|
||||
switch ($x{0}) {
|
||||
case 'a':
|
||||
echo "no crash\n";
|
||||
break;
|
||||
|
||||
@@ -4,14 +4,14 @@ Bug #26801 (switch ($a{0}) crash)
|
||||
<?php
|
||||
|
||||
$a = '11';
|
||||
$b = $a[0];
|
||||
$b = $a{0};
|
||||
switch ($b) {
|
||||
case '-':
|
||||
break;
|
||||
}
|
||||
|
||||
$a = '22';
|
||||
switch ($a[0]) {
|
||||
switch ($a{0}) {
|
||||
case '-':
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
--TEST--
|
||||
Bug #27268 (Bad references accentuated by clone)
|
||||
--FILE--
|
||||
<?php
|
||||
class A
|
||||
{
|
||||
public function &getA()
|
||||
{
|
||||
return $this->a;
|
||||
}
|
||||
}
|
||||
|
||||
$A = new A;
|
||||
$A->a = array(1);
|
||||
$x = $A->getA();
|
||||
$clone = clone $A;
|
||||
$clone->a = array();
|
||||
print_r($A);
|
||||
?>
|
||||
--EXPECT--
|
||||
A Object
|
||||
(
|
||||
[a] => Array
|
||||
(
|
||||
[0] => 1
|
||||
)
|
||||
|
||||
)
|
||||
@@ -1,23 +0,0 @@
|
||||
--TEST--
|
||||
Bug #27304
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class Staticexample
|
||||
{
|
||||
static function test()
|
||||
{
|
||||
var_dump(isset($this));
|
||||
}
|
||||
}
|
||||
|
||||
$b = new Staticexample();
|
||||
Staticexample::test();
|
||||
$b->test();
|
||||
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECT--
|
||||
bool(false)
|
||||
bool(false)
|
||||
===DONE===
|
||||
@@ -1,12 +0,0 @@
|
||||
--TEST--
|
||||
Bug #27598 (list() array key assignment causes HUGE memory leak)
|
||||
--FILE--
|
||||
<?php
|
||||
list($out[0]) = array(1);
|
||||
var_dump($out);
|
||||
?>
|
||||
--EXPECT--
|
||||
array(1) {
|
||||
[0]=>
|
||||
int(1)
|
||||
}
|
||||
@@ -2,8 +2,6 @@
|
||||
Bug #27641 (zend.ze1_compatibility_mode = On causes object properties to be misreported)
|
||||
--SKIPIF--
|
||||
<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 is needed'); ?>
|
||||
--INI--
|
||||
error_reporting=4095
|
||||
--FILE--
|
||||
<?php
|
||||
class A {
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
--TEST--
|
||||
Bug #27669 (PHP 5 didn't support all possibilities for calling static methods dynamically)
|
||||
--FILE--
|
||||
<?php
|
||||
error_reporting(E_ALL & !E_STRICT);
|
||||
|
||||
class A {
|
||||
function hello() {
|
||||
echo "Hello World\n";
|
||||
}
|
||||
}
|
||||
$y[0] = 'hello';
|
||||
A::$y[0]();
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECTF--
|
||||
Hello World
|
||||
===DONE===
|
||||
@@ -1,46 +0,0 @@
|
||||
--TEST--
|
||||
Bug #28072 (static array with some constant keys will be incorrectly ordered)
|
||||
--FILE--
|
||||
<?php
|
||||
define("FIRST_KEY", "a");
|
||||
define("THIRD_KEY", "c");
|
||||
|
||||
|
||||
function test()
|
||||
{
|
||||
static $arr = array(
|
||||
FIRST_KEY => "111",
|
||||
"b" => "222",
|
||||
THIRD_KEY => "333",
|
||||
"d" => "444"
|
||||
);
|
||||
print_r($arr);
|
||||
}
|
||||
|
||||
function test2()
|
||||
{
|
||||
static $arr = array(
|
||||
FIRST_KEY => "111",
|
||||
"a" => "222",
|
||||
"c" => "333",
|
||||
THIRD_KEY => "444"
|
||||
);
|
||||
print_r($arr);
|
||||
}
|
||||
|
||||
test();
|
||||
test2();
|
||||
?>
|
||||
--EXPECT--
|
||||
Array
|
||||
(
|
||||
[a] => 111
|
||||
[b] => 222
|
||||
[c] => 333
|
||||
[d] => 444
|
||||
)
|
||||
Array
|
||||
(
|
||||
[a] => 111
|
||||
[c] => 444
|
||||
)
|
||||
@@ -1,23 +0,0 @@
|
||||
--TEST--
|
||||
Bug #28377 (debug_backtrace is intermittently passing args)
|
||||
--FILE--
|
||||
<?php
|
||||
function doit($a, $b)
|
||||
{
|
||||
$trace = debug_backtrace();
|
||||
custom_callback('dereferenced', $trace);
|
||||
custom_callback('direct', debug_backtrace());
|
||||
}
|
||||
|
||||
function custom_callback($traceName, $btInfo)
|
||||
{
|
||||
echo $traceName ." -- args: ";
|
||||
echo isset($btInfo[0]['args']) ? count($btInfo[0]['args']) : 'does not exist';
|
||||
echo "\n";
|
||||
}
|
||||
|
||||
doit('a','b');
|
||||
?>
|
||||
--EXPECT--
|
||||
dereferenced -- args: 2
|
||||
direct -- args: 2
|
||||
@@ -1,11 +0,0 @@
|
||||
--TEST--
|
||||
Bug #29015 (Incorrect behavior of member vars(non string ones)-numeric mem vars und others)
|
||||
--FILE--
|
||||
<?php
|
||||
$a = new stdClass();
|
||||
$x = "";
|
||||
$a->$x = "string('')";
|
||||
var_dump($a);
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Cannot access empty property in %sbug29015.php on line 4
|
||||
@@ -1,27 +0,0 @@
|
||||
--TEST--
|
||||
Bug #29104 Function declaration in method doesn't work
|
||||
--FILE--
|
||||
<?php
|
||||
class A
|
||||
{
|
||||
function g()
|
||||
{
|
||||
echo "function g - begin\n";
|
||||
|
||||
function f()
|
||||
{
|
||||
echo "function f\n";
|
||||
}
|
||||
|
||||
echo "function g - end\n";
|
||||
}
|
||||
}
|
||||
|
||||
$a = new A;
|
||||
$a->g();
|
||||
f();
|
||||
?>
|
||||
--EXPECT--
|
||||
function g - begin
|
||||
function g - end
|
||||
function f
|
||||
@@ -1,104 +0,0 @@
|
||||
--TEST--
|
||||
Bug #29210 Function: is_callable - no support for private and protected classes
|
||||
--FILE--
|
||||
<?php
|
||||
class test_class {
|
||||
private function test_func1() {
|
||||
echo "test_func1\n";
|
||||
}
|
||||
protected function test_func2() {
|
||||
echo "test_func2\n";
|
||||
}
|
||||
static private function test_func3() {
|
||||
echo "test_func3\n";
|
||||
}
|
||||
static protected function test_func4() {
|
||||
echo "test_func4\n";
|
||||
}
|
||||
function test() {
|
||||
if (is_callable(array($this,'test_func1'))) {
|
||||
$this->test_func1();
|
||||
} else {
|
||||
echo "test_func1 isn't callable from inside\n";
|
||||
}
|
||||
if (is_callable(array($this,'test_func2'))) {
|
||||
$this->test_func2();
|
||||
} else {
|
||||
echo "test_func2 isn't callable from inside\n";
|
||||
}
|
||||
if (is_callable(array('test_class','test_func3'))) {
|
||||
test_class::test_func3();
|
||||
} else {
|
||||
echo "test_func3 isn't callable from inside\n";
|
||||
}
|
||||
if (is_callable(array('test_class','test_func4'))) {
|
||||
test_class::test_func4();
|
||||
} else {
|
||||
echo "test_func4 isn't callable from inside\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class foo extends test_class {
|
||||
function test() {
|
||||
if (is_callable(array($this,'test_func1'))) {
|
||||
$this->test_func1();
|
||||
} else {
|
||||
echo "test_func1 isn't callable from child\n";
|
||||
}
|
||||
if (is_callable(array($this,'test_func2'))) {
|
||||
$this->test_func2();
|
||||
} else {
|
||||
echo "test_func2 isn't callable from child\n";
|
||||
}
|
||||
if (is_callable(array('test_class','test_func3'))) {
|
||||
test_class::test_func3();
|
||||
} else {
|
||||
echo "test_func3 isn't callable from child\n";
|
||||
}
|
||||
if (is_callable(array('test_class','test_func4'))) {
|
||||
test_class::test_func4();
|
||||
} else {
|
||||
echo "test_func4 isn't callable from child\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$object = new test_class;
|
||||
$object->test();
|
||||
if (is_callable(array($object,'test_func1'))) {
|
||||
$object->test_func1();
|
||||
} else {
|
||||
echo "test_func1 isn't callable from outside\n";
|
||||
}
|
||||
if (is_callable(array($object,'test_func2'))) {
|
||||
$object->test_func2();
|
||||
} else {
|
||||
echo "test_func2 isn't callable from outside\n";
|
||||
}
|
||||
if (is_callable(array('test_class','test_func3'))) {
|
||||
test_class::test_func3();
|
||||
} else {
|
||||
echo "test_func3 isn't callable from outside\n";
|
||||
}
|
||||
if (is_callable(array('test_class','test_func4'))) {
|
||||
test_class::test_func4();
|
||||
} else {
|
||||
echo "test_func4 isn't callable from outside\n";
|
||||
}
|
||||
$object = new foo();
|
||||
$object->test();
|
||||
?>
|
||||
--EXPECTF--
|
||||
test_func1
|
||||
test_func2
|
||||
test_func3
|
||||
test_func4
|
||||
test_func1 isn't callable from outside
|
||||
test_func2 isn't callable from outside
|
||||
test_func3 isn't callable from outside
|
||||
test_func4 isn't callable from outside
|
||||
test_func1 isn't callable from child
|
||||
test_func2
|
||||
test_func3 isn't callable from child
|
||||
test_func4
|
||||
@@ -1,7 +1,7 @@
|
||||
--TEST--
|
||||
Bug #29368 (The destructor is called when an exception is thrown from the constructor)
|
||||
--FILE--
|
||||
<?php
|
||||
<?
|
||||
|
||||
class Foo
|
||||
{
|
||||
|
||||
@@ -1,41 +0,0 @@
|
||||
--TEST--
|
||||
Bug #29674 (inherited method doesn't have access to private variables of the derived class)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class BaseClass
|
||||
{
|
||||
private $private_base = "Base";
|
||||
|
||||
function printVars ()
|
||||
{
|
||||
var_dump($this->private_base);
|
||||
var_dump($this->private_child);
|
||||
}
|
||||
}
|
||||
|
||||
class ChildClass extends BaseClass
|
||||
{
|
||||
private $private_child = "Child";
|
||||
}
|
||||
|
||||
echo "===BASE===\n";
|
||||
$obj = new BaseClass;
|
||||
$obj->printVars();
|
||||
|
||||
echo "===CHILD===\n";
|
||||
$obj = new ChildClass;
|
||||
$obj->printVars();
|
||||
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECTF--
|
||||
===BASE===
|
||||
string(4) "Base"
|
||||
|
||||
Notice: Undefined property: BaseClass::$private_child in %sbug29674.php on line %d
|
||||
NULL
|
||||
===CHILD===
|
||||
string(4) "Base"
|
||||
|
||||
Fatal error: Cannot access private property ChildClass::$private_child in %sbug29674.php on line %d
|
||||
@@ -1,62 +0,0 @@
|
||||
--TEST--
|
||||
Bug #29689 (default value of protected member overrides default value of private)
|
||||
--FILE--
|
||||
<?php
|
||||
class foo {
|
||||
private $foo = 'foo';
|
||||
private $foo2 = 'foo2';
|
||||
|
||||
function printFoo()
|
||||
{
|
||||
echo __CLASS__, ': ', $this->foo, " ", $this->foo2, "\n";
|
||||
}
|
||||
}
|
||||
|
||||
class bar extends foo {
|
||||
protected $foo = 'bar';
|
||||
|
||||
function printFoo()
|
||||
{
|
||||
parent::printFoo();
|
||||
echo __CLASS__, ': ', $this->foo, " ", $this->foo2, "\n";
|
||||
}
|
||||
}
|
||||
|
||||
class baz extends bar {
|
||||
protected $foo = 'baz';
|
||||
protected $foo2 = 'baz2';
|
||||
}
|
||||
|
||||
class bar2 extends foo {
|
||||
function printFoo()
|
||||
{
|
||||
parent::printFoo();
|
||||
echo __CLASS__, ': ', $this->foo, " ", $this->foo2, "\n";
|
||||
}
|
||||
}
|
||||
|
||||
class baz2 extends bar2 {
|
||||
protected $foo = 'baz2';
|
||||
protected $foo2 = 'baz22';
|
||||
}
|
||||
|
||||
$bar = new bar;
|
||||
$bar->printFoo();
|
||||
echo "---baz--\n";
|
||||
$baz = new baz();
|
||||
$baz->printFoo();
|
||||
echo "---baz2--\n";
|
||||
$baz = new baz2();
|
||||
$baz->printFoo();
|
||||
?>
|
||||
--EXPECTF--
|
||||
foo: foo foo2
|
||||
bar: bar
|
||||
Notice: Undefined property: bar::$foo2 in %s on line %d
|
||||
|
||||
---baz--
|
||||
foo: foo foo2
|
||||
bar: baz baz2
|
||||
---baz2--
|
||||
foo: foo foo2
|
||||
bar2: baz2 baz22
|
||||
@@ -1,23 +0,0 @@
|
||||
--TEST--
|
||||
Bug #29890 (crash if error handler fails)
|
||||
--FILE--
|
||||
<?php
|
||||
function customErrorHandler($fErrNo,$fErrStr,$fErrFile,$fErrLine,&$fClass) {
|
||||
echo "error :".$fErrStr."\n";
|
||||
}
|
||||
|
||||
set_time_limit(5);
|
||||
|
||||
error_reporting(E_ALL);
|
||||
|
||||
set_error_handler("customErrorHandler");
|
||||
|
||||
define("TEST",2);
|
||||
|
||||
//should return a notice that the constant is already defined
|
||||
|
||||
define("TEST",3);
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
error :Constant TEST already defined
|
||||
@@ -1,28 +0,0 @@
|
||||
--TEST--
|
||||
Bug #29896 (Backtrace argument list out of sync)
|
||||
--FILE--
|
||||
<?php
|
||||
function userErrorHandler($num, $msg, $file, $line, $vars)
|
||||
{
|
||||
debug_print_backtrace();
|
||||
}
|
||||
|
||||
$OldErrorHandler = set_error_handler("userErrorHandler");
|
||||
|
||||
function GenerateError1($A1)
|
||||
{
|
||||
$a = $b;
|
||||
}
|
||||
|
||||
function GenerateError2($A1)
|
||||
{
|
||||
GenerateError1("Test1");
|
||||
}
|
||||
|
||||
GenerateError2("Test2");
|
||||
?>
|
||||
--EXPECTF--
|
||||
#0 userErrorHandler(8, Undefined variable: b, %sbug29896.php, 11, Array ([A1] => Test1)) called at [%sbug29896.php:11]
|
||||
#1 GenerateError1(Test1) called at [%sbug29896.php:16]
|
||||
#2 GenerateError2(Test2) called at [%sbug29896.php:19]
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
--TEST--
|
||||
Bug #29944 (Function defined in switch, crashes)
|
||||
--FILE--
|
||||
<?php
|
||||
$a = 1;
|
||||
switch ($a) {
|
||||
case 1:
|
||||
function foo($a) {
|
||||
return "ok\n";
|
||||
}
|
||||
echo foo($a);
|
||||
}
|
||||
?>
|
||||
--EXPECT--
|
||||
ok
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
--TEST--
|
||||
Bug #30080 (Passing array or non array of objects)
|
||||
--FILE--
|
||||
<?php
|
||||
class foo {
|
||||
function foo($arrayobj) {
|
||||
var_dump($arrayobj);
|
||||
}
|
||||
}
|
||||
|
||||
new foo(array(new stdClass));
|
||||
?>
|
||||
--EXPECT--
|
||||
array(1) {
|
||||
[0]=>
|
||||
object(stdClass)#2 (0) {
|
||||
}
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
--TEST--
|
||||
Bug #30140 (Problem with array in static properties)
|
||||
--FILE--
|
||||
<?php
|
||||
class A {
|
||||
public static $test1 = true;
|
||||
public static $test2 = array();
|
||||
public static $test3 = "str";
|
||||
}
|
||||
|
||||
class B extends A {
|
||||
}
|
||||
|
||||
A::$test1 = "x";
|
||||
A::$test2 = "y";
|
||||
A::$test3 = "z";
|
||||
var_dump(A::$test1);
|
||||
var_dump(A::$test2);
|
||||
var_dump(A::$test3);
|
||||
var_dump(B::$test1);
|
||||
var_dump(B::$test2);
|
||||
var_dump(B::$test3);
|
||||
?>
|
||||
--EXPECT--
|
||||
string(1) "x"
|
||||
string(1) "y"
|
||||
string(1) "z"
|
||||
string(1) "x"
|
||||
string(1) "y"
|
||||
string(1) "z"
|
||||
@@ -1,34 +0,0 @@
|
||||
--TEST--
|
||||
Bug #30161 (Segmentation fault with exceptions)
|
||||
--FILE--
|
||||
<?php
|
||||
class FIIFO {
|
||||
|
||||
public function __construct() {
|
||||
throw new Exception;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class hariCow extends FIIFO {
|
||||
|
||||
public function __construct() {
|
||||
try {
|
||||
parent::__construct();
|
||||
} catch(Exception $e) {
|
||||
}
|
||||
}
|
||||
|
||||
public function __toString() {
|
||||
return "ok\n";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
$db = new hariCow;
|
||||
|
||||
echo $db;
|
||||
?>
|
||||
--EXPECT--
|
||||
ok
|
||||
@@ -1,52 +0,0 @@
|
||||
--TEST--
|
||||
Bug #30162 (Catching exception in constructor couses lose of $this)
|
||||
--FILE--
|
||||
<?php
|
||||
class FIIFO {
|
||||
|
||||
public function __construct() {
|
||||
$this->x = "x";
|
||||
throw new Exception;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class hariCow extends FIIFO {
|
||||
|
||||
public function __construct() {
|
||||
try {
|
||||
parent::__construct();
|
||||
} catch(Exception $e) {
|
||||
}
|
||||
$this->y = "y";
|
||||
try {
|
||||
$this->z = new FIIFO;
|
||||
} catch(Exception $e) {
|
||||
}
|
||||
}
|
||||
|
||||
public function __toString() {
|
||||
return "Rusticus in asino sedet.";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
try {
|
||||
$db = new FIIFO();
|
||||
} catch(Exception $e) {
|
||||
}
|
||||
var_dump($db);
|
||||
|
||||
$db = new hariCow;
|
||||
|
||||
var_dump($db);
|
||||
?>
|
||||
--EXPECTF--
|
||||
Notice: Undefined variable: db in %sbug30162.php on line 35
|
||||
NULL
|
||||
object(hariCow)#1 (2) {
|
||||
["x"]=>
|
||||
string(1) "x"
|
||||
["y"]=>
|
||||
string(1) "y"
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
--TEST--
|
||||
Bug #30332 (zend.ze1_compatibility_mode isnt fully compatable with array_push())
|
||||
--INI--
|
||||
zend.ze1_compatibility_mode=on
|
||||
error_reporting=4095
|
||||
--FILE--
|
||||
<?php
|
||||
class x { };
|
||||
|
||||
$first = new x;
|
||||
$second = $first;
|
||||
$container = array();
|
||||
array_push($container, $first);
|
||||
|
||||
$first->first = " im in the first";
|
||||
|
||||
print_r($first);
|
||||
print_r($second);
|
||||
print_r($container);
|
||||
?>
|
||||
--EXPECTF--
|
||||
Strict Standards: Implicit cloning object of class 'x' because of 'zend.ze1_compatibility_mode' in %sbug30332.php on line 4
|
||||
|
||||
Strict Standards: Implicit cloning object of class 'x' because of 'zend.ze1_compatibility_mode' in %sbug30332.php on line 5
|
||||
|
||||
Strict Standards: Implicit cloning object of class 'x' because of 'zend.ze1_compatibility_mode' in %sbug30332.php on line 7
|
||||
x Object
|
||||
(
|
||||
[first] => im in the first
|
||||
)
|
||||
x Object
|
||||
(
|
||||
)
|
||||
Array
|
||||
(
|
||||
[0] => x Object
|
||||
(
|
||||
)
|
||||
|
||||
)
|
||||
@@ -1,24 +0,0 @@
|
||||
--TEST--
|
||||
Bug #30346 (arrayAccess and using $this)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class Test implements ArrayAccess
|
||||
{
|
||||
public function __construct() { }
|
||||
public function offsetExists( $offset ) { return false; }
|
||||
public function offsetGet( $offset ) { return $offset; }
|
||||
public function offsetSet( $offset, $data ) { }
|
||||
public function offsetUnset( $offset ) { }
|
||||
}
|
||||
|
||||
$post = new Test;
|
||||
$id = 'page';
|
||||
echo $post[$id.'_show'];
|
||||
echo "\n";
|
||||
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECT--
|
||||
page_show
|
||||
===DONE===
|
||||
@@ -1,30 +0,0 @@
|
||||
--TEST--
|
||||
Bug #30394 (Assignment operators yield wrong result with __get/__set)
|
||||
--FILE--
|
||||
<?php
|
||||
class Container
|
||||
{
|
||||
public function __get( $what )
|
||||
{
|
||||
return $this->_p[ $what ];
|
||||
}
|
||||
|
||||
public function __set( $what, $value )
|
||||
{
|
||||
$this->_p[ $what ] = $value;
|
||||
}
|
||||
|
||||
private $_p = array();
|
||||
}
|
||||
|
||||
$c = new Container();
|
||||
$c->a = 1;
|
||||
$c->a += 1;
|
||||
print $c->a; // --> 2
|
||||
|
||||
print " - ";
|
||||
$c->a += max( 0, 1 );
|
||||
print $c->a; // --> 4 (!)
|
||||
?>
|
||||
--EXPECT--
|
||||
2 - 3
|
||||
@@ -1,18 +0,0 @@
|
||||
--TEST--
|
||||
Bug #30407 (Strange behaviour of default arguments)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
function haricow($a = 'one') {
|
||||
var_dump($a);
|
||||
$a = 'two';
|
||||
}
|
||||
|
||||
haricow();
|
||||
haricow();
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECT--
|
||||
string(3) "one"
|
||||
string(3) "one"
|
||||
===DONE===
|
||||
@@ -1,36 +0,0 @@
|
||||
--TEST--
|
||||
Bug #30451 (static properties permissions broken)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class A {
|
||||
|
||||
protected static $property = TRUE;
|
||||
|
||||
protected static function method() {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class B extends A {
|
||||
|
||||
public function __construct() {
|
||||
|
||||
var_dump(self::method());
|
||||
var_dump(parent::method());
|
||||
|
||||
var_dump(self::$property);
|
||||
var_dump(parent::$property);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
new B;
|
||||
?>
|
||||
--EXPECT--
|
||||
bool(true)
|
||||
bool(true)
|
||||
bool(true)
|
||||
bool(true)
|
||||
@@ -1,10 +0,0 @@
|
||||
--TEST--
|
||||
Bug #30519 Interface not existing says Class not found
|
||||
--FILE--
|
||||
<?php
|
||||
class test implements a {
|
||||
}
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Interface 'a' not found in %sbug30519.php on line 2
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
--TEST--
|
||||
Bug #30702 cannot initialize class variable from class constant
|
||||
--FILE--
|
||||
<?php
|
||||
class foo {
|
||||
const C1=1;
|
||||
}
|
||||
|
||||
class bar extends foo {
|
||||
const C2=2;
|
||||
|
||||
public $c1=bar::C1;
|
||||
public $c2=bar::C2;
|
||||
|
||||
public $c3=self::C1;
|
||||
public $c4=self::C2;
|
||||
|
||||
public $c5=foo::C1;
|
||||
public $c6=parent::C1;
|
||||
}
|
||||
|
||||
$x= new bar();
|
||||
var_dump($x);
|
||||
?>
|
||||
--EXPECT--
|
||||
object(bar)#1 (6) {
|
||||
["c1"]=>
|
||||
int(1)
|
||||
["c2"]=>
|
||||
int(2)
|
||||
["c3"]=>
|
||||
int(1)
|
||||
["c4"]=>
|
||||
int(2)
|
||||
["c5"]=>
|
||||
int(1)
|
||||
["c6"]=>
|
||||
int(1)
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
--TEST--
|
||||
Bug #30707 (Segmentation fault on exception in method)
|
||||
--FILE--
|
||||
<?php
|
||||
class C {
|
||||
function byePHP($plop) {
|
||||
echo "ok\n";
|
||||
}
|
||||
|
||||
function plip() {
|
||||
try {
|
||||
$this->plap($this->plop());
|
||||
} catch(Exception $e) {
|
||||
}
|
||||
}
|
||||
|
||||
function plap($a) {
|
||||
}
|
||||
|
||||
function plop() {
|
||||
throw new Exception;
|
||||
}
|
||||
}
|
||||
|
||||
$x = new C;
|
||||
$x->byePHP($x->plip());
|
||||
?>
|
||||
--EXPECT--
|
||||
ok
|
||||
@@ -1,23 +0,0 @@
|
||||
--TEST--
|
||||
Bug #30791 magic methods (__sleep/__wakeup/__toString) call __call if object is overloaded
|
||||
--FILE--
|
||||
<?php
|
||||
class a {
|
||||
public $a = 4;
|
||||
function __call($a,$b) {
|
||||
return "unknown method";
|
||||
}
|
||||
}
|
||||
$b = new a;
|
||||
echo $b,"\n";
|
||||
$c = unserialize(serialize($b));
|
||||
echo $c,"\n";
|
||||
var_dump($c);
|
||||
?>
|
||||
--EXPECT--
|
||||
Object id #1
|
||||
Object id #2
|
||||
object(a)#2 (1) {
|
||||
["a"]=>
|
||||
int(4)
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
--TEST--
|
||||
Bug #30820 (static member conflict with $this->member silently ignored)
|
||||
--INI--
|
||||
error_reporting=4095
|
||||
--FILE--
|
||||
<?php
|
||||
class Blah {
|
||||
private static $x;
|
||||
|
||||
public function show() {
|
||||
Blah::$x = 1;
|
||||
$this->x = 5; // no warning, but refers to different variable
|
||||
|
||||
echo 'Blah::$x = '. Blah::$x ."\n";
|
||||
echo '$this->x = '. $this->x ."\n";
|
||||
}
|
||||
}
|
||||
|
||||
$b = new Blah();
|
||||
$b->show();
|
||||
?>
|
||||
--EXPECTF--
|
||||
Strict Standards: Accessing static property Blah::$x as non static in %sbug30820.php on line 7
|
||||
Blah::$x = 1
|
||||
|
||||
Strict Standards: Accessing static property Blah::$x as non static in %sbug30820.php on line 10
|
||||
$this->x = 5
|
||||
@@ -1,61 +0,0 @@
|
||||
--TEST--
|
||||
Bug #30828 (debug_backtrace() reports incorrect class in overridden methods)
|
||||
--FILE--
|
||||
<?php
|
||||
class A {
|
||||
function __construct() {
|
||||
debug_print_backtrace();
|
||||
$bt = debug_backtrace();
|
||||
foreach ($bt as $t) {
|
||||
print $t['class'].$t['type'].$t['function']."\n";
|
||||
}
|
||||
}
|
||||
|
||||
function foo() {
|
||||
debug_print_backtrace();
|
||||
$bt = debug_backtrace();
|
||||
foreach ($bt as $t) {
|
||||
print $t['class'].$t['type'].$t['function']."\n";
|
||||
}
|
||||
}
|
||||
|
||||
static function bar() {
|
||||
debug_print_backtrace();
|
||||
$bt = debug_backtrace();
|
||||
foreach ($bt as $t) {
|
||||
print $t['class'].$t['type'].$t['function']."\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class B extends A {
|
||||
function __construct() {
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
function foo() {
|
||||
parent::foo();
|
||||
}
|
||||
|
||||
static function bar() {
|
||||
parent::bar();
|
||||
}
|
||||
}
|
||||
|
||||
$b = new B();
|
||||
$b->foo();
|
||||
B::bar();
|
||||
?>
|
||||
--EXPECTF--
|
||||
#0 A->__construct() called at [%sbug30828.php:30]
|
||||
#1 B->__construct() called at [%sbug30828.php:42]
|
||||
A->__construct
|
||||
B->__construct
|
||||
#0 A->foo() called at [%sbug30828.php:34]
|
||||
#1 B->foo() called at [%sbug30828.php:43]
|
||||
A->foo
|
||||
B->foo
|
||||
#0 A::bar() called at [%sbug30828.php:38]
|
||||
#1 B::bar() called at [%sbug30828.php:44]
|
||||
A::bar
|
||||
B::bar
|
||||
@@ -1,31 +0,0 @@
|
||||
--TEST--
|
||||
Bug #30889 Conflict between __get/__set and ++ operator
|
||||
--FILE--
|
||||
<?php
|
||||
class overloaded
|
||||
{
|
||||
private $values;
|
||||
function __construct()
|
||||
{
|
||||
$this->values = array('a' => 0);
|
||||
}
|
||||
function __set($name, $value)
|
||||
{
|
||||
print "set $name = $value ($name was ".$this->values[$name].")\n";
|
||||
$this->values[$name] = $value;
|
||||
}
|
||||
function __get($name)
|
||||
{
|
||||
print "get $name (returns ".$this->values[$name].")\n";
|
||||
return $this->values[$name];
|
||||
}
|
||||
}
|
||||
$test = new overloaded();
|
||||
$test->a++; // __get(), then __set()
|
||||
++$test->a;
|
||||
?>
|
||||
--EXPECT--
|
||||
get a (returns 0)
|
||||
set a = 1 (a was 0)
|
||||
get a (returns 1)
|
||||
set a = 2 (a was 1)
|
||||
@@ -1,21 +0,0 @@
|
||||
--TEST--
|
||||
Bug #30998 (Crash when user error handler returns false)
|
||||
--FILE--
|
||||
<?php
|
||||
error_reporting(-1);
|
||||
|
||||
function my_error($errno, $errstr, $errfile, $errline)
|
||||
{
|
||||
print "$errstr ($errno) in $errfile:$errline\n";
|
||||
return false;
|
||||
}
|
||||
set_error_handler('my_error');
|
||||
|
||||
$f = fopen("/tmp/blah", "r");
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECTF--
|
||||
fopen(/tmp/blah): failed to open stream: No such file or directory (2) in %s:%d
|
||||
|
||||
Warning: fopen(/tmp/blah): failed to open stream: No such file or directory in %s on line %d
|
||||
===DONE===
|
||||
@@ -9,11 +9,11 @@ var_dump(isset($a->b));
|
||||
$a = '0';
|
||||
var_dump(isset($a->b));
|
||||
$a = '';
|
||||
var_dump(isset($a['b']));
|
||||
var_dump(isset($a{'b'}));
|
||||
$a = 'a';
|
||||
var_dump(isset($a['b']));
|
||||
var_dump(isset($a{'b'}));
|
||||
$a = '0';
|
||||
var_dump(isset($a['b']));
|
||||
var_dump(isset($a{'b'}));
|
||||
|
||||
$simpleString = "Bogus String Text";
|
||||
echo isset($simpleString->wrong)?"bug\n":"ok\n";
|
||||
|
||||
@@ -1,48 +0,0 @@
|
||||
--TEST--
|
||||
Bug #31102 (Exception not handled when thrown inside __autoload())
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$test = 0;
|
||||
|
||||
function __autoload($class)
|
||||
{
|
||||
global $test;
|
||||
|
||||
echo __METHOD__ . "($class,$test)\n";
|
||||
switch($test)
|
||||
{
|
||||
case 1:
|
||||
eval("class $class { function __construct(){throw new Exception('$class::__construct');}}");
|
||||
return;
|
||||
case 2:
|
||||
eval("class $class { function __construct(){throw new Exception('$class::__construct');}}");
|
||||
throw new Exception(__METHOD__);
|
||||
return;
|
||||
case 3:
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
while($test++ < 5)
|
||||
{
|
||||
try
|
||||
{
|
||||
eval("\$bug = new Test$test();");
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
echo "Caught: " . $e->getMessage() . "\n";
|
||||
}
|
||||
}
|
||||
?>
|
||||
===DONE===
|
||||
<?php exit(0); ?>
|
||||
--EXPECTF--
|
||||
__autoload(Test1,1)
|
||||
Caught: Test1::__construct
|
||||
__autoload(Test2,2)
|
||||
Caught: __autoload
|
||||
__autoload(Test3,3)
|
||||
|
||||
Fatal error: Class 'Test3' not found in %sbug31102.php(%d) : eval()'d code on line 1
|
||||
@@ -1,18 +0,0 @@
|
||||
--TEST--
|
||||
Bug #31177 (memory corruption because of incorrect refcounting)
|
||||
--FILE--
|
||||
<?php
|
||||
class foo {
|
||||
function foo($n=0) {
|
||||
if($n) throw new Exception("new");
|
||||
}
|
||||
}
|
||||
$x = new foo();
|
||||
try {
|
||||
$y=$x->foo(1);
|
||||
} catch (Exception $e) {
|
||||
var_dump($x);
|
||||
}
|
||||
--EXPECT--
|
||||
object(foo)#1 (0) {
|
||||
}
|
||||
@@ -1,44 +0,0 @@
|
||||
--TEST--
|
||||
Bug #31177 (Memory leak)
|
||||
--FILE--
|
||||
<?php
|
||||
class DbGow {
|
||||
|
||||
public function query() {
|
||||
throw new Exception;
|
||||
}
|
||||
|
||||
public function select() {
|
||||
return new DbGowRecordSet($this->query());
|
||||
}
|
||||
|
||||
public function select2() {
|
||||
new DbGowRecordSet($this->query());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class DbGowRecordSet {
|
||||
|
||||
public function __construct($resource) {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$db = new DbGow;
|
||||
|
||||
try {
|
||||
$rs = $db->select();
|
||||
} catch(Exception $e) {
|
||||
echo "ok\n";
|
||||
}
|
||||
|
||||
try {
|
||||
$db->select2();
|
||||
} catch(Exception $e) {
|
||||
echo "ok\n";
|
||||
}
|
||||
?>
|
||||
--EXPECT--
|
||||
ok
|
||||
ok
|
||||
@@ -1,29 +0,0 @@
|
||||
--TEST--
|
||||
Bug #31341 (escape on curly inconsistent)
|
||||
--FILE--
|
||||
<?php
|
||||
$a = array(
|
||||
"$ \{ ",
|
||||
" \{ $",
|
||||
" \{$ ",
|
||||
" $\{ ",
|
||||
" \$\{ ",
|
||||
" \{\$ ",
|
||||
"\$ \{ ",
|
||||
" \{ \$",
|
||||
"% \{ ");
|
||||
|
||||
foreach ($a as $v) {
|
||||
echo("'$v'\n");
|
||||
}
|
||||
?>
|
||||
--EXPECT--
|
||||
'$ \{ '
|
||||
' \{ $'
|
||||
' \{$ '
|
||||
' $\{ '
|
||||
' $\{ '
|
||||
' \{$ '
|
||||
'$ \{ '
|
||||
' \{ $'
|
||||
'% \{ '
|
||||
@@ -1,22 +0,0 @@
|
||||
--TEST--
|
||||
Bug #31525 (object reference being dropped. $this getting lost)
|
||||
--INI--
|
||||
error_reporting=4095
|
||||
--FILE--
|
||||
<?php
|
||||
class Foo {
|
||||
function getThis() {
|
||||
return $this;
|
||||
}
|
||||
function destroyThis() {
|
||||
$baz =& $this->getThis();
|
||||
}
|
||||
}
|
||||
$bar = new Foo();
|
||||
$bar->destroyThis();
|
||||
var_dump($bar);
|
||||
?>
|
||||
--EXPECTF--
|
||||
Strict Standards: Only variables should be assigned by reference in %sbug31525.php on line 7
|
||||
object(Foo)#1 (0) {
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
--TEST--
|
||||
Bug #31720 (Invalid object callbacks not caught in array_walk())
|
||||
--FILE--
|
||||
<?php
|
||||
<?
|
||||
$array = array('at least one element');
|
||||
|
||||
array_walk($array, array($nonesuchvar,'show'));
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
--TEST--
|
||||
Bug #31828 (Crash with zend.ze1_compatibility_mode=On)
|
||||
--INI--
|
||||
zend.ze1_compatibility_mode=on
|
||||
error_reporting=4095
|
||||
--FILE--
|
||||
<?php
|
||||
$o = new stdClass();
|
||||
$o->id = 77;
|
||||
$o->name = "Aerospace";
|
||||
$a[] = $o;
|
||||
$a = $a[0];
|
||||
print_r($a);
|
||||
?>
|
||||
--EXPECTF--
|
||||
Strict Standards: Implicit cloning object of class 'stdClass' because of 'zend.ze1_compatibility_mode' in %sbug31828.php on line 2
|
||||
|
||||
Strict Standards: Implicit cloning object of class 'stdClass' because of 'zend.ze1_compatibility_mode' in %sbug31828.php on line 5
|
||||
|
||||
Strict Standards: Implicit cloning object of class 'stdClass' because of 'zend.ze1_compatibility_mode' in %sbug31828.php on line 6
|
||||
stdClass Object
|
||||
(
|
||||
[id] => 77
|
||||
[name] => Aerospace
|
||||
)
|
||||
@@ -1,18 +0,0 @@
|
||||
--TEST--
|
||||
Bug #32080 (segfault when assigning object to itself with zend.ze1_compatibility_mode=On)
|
||||
--INI--
|
||||
zend.ze1_compatibility_mode=on
|
||||
error_reporting=4095
|
||||
--FILE--
|
||||
<?php
|
||||
class test { }
|
||||
$t = new test;
|
||||
$t = $t; // gives segfault
|
||||
var_dump($t);
|
||||
?>
|
||||
--EXPECTF--
|
||||
Strict Standards: Implicit cloning object of class 'test' because of 'zend.ze1_compatibility_mode' in %sbug32080.php on line 3
|
||||
|
||||
Strict Standards: Implicit cloning object of class 'test' because of 'zend.ze1_compatibility_mode' in %sbug32080.php on line 5
|
||||
object(test)#%d (0) {
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
--TEST--
|
||||
Bug #32226 (SEGV with exception handler on non existing instance)
|
||||
Bug # 32226 (SEGV with exception handler on non existing instance)
|
||||
--FILE--
|
||||
<?php
|
||||
<?
|
||||
|
||||
class A
|
||||
{
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
--TEST--
|
||||
Bug #32252 (Segfault when offsetSet throws an Exception (only without debug))
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class Test implements ArrayAccess
|
||||
{
|
||||
function offsetExists($offset)
|
||||
{
|
||||
echo __METHOD__ . "($offset)\n";
|
||||
return false;
|
||||
}
|
||||
|
||||
function offsetGet($offset)
|
||||
{
|
||||
echo __METHOD__ . "($offset)\n";
|
||||
return null;
|
||||
}
|
||||
|
||||
function offsetSet($offset, $value)
|
||||
{
|
||||
echo __METHOD__ . "($offset, $value)\n";
|
||||
throw new Exception("Ooops");
|
||||
}
|
||||
|
||||
function offsetUnset($offset)
|
||||
{
|
||||
echo __METHOD__ . "($offset)\n";
|
||||
}
|
||||
}
|
||||
|
||||
$list = new Test();
|
||||
try
|
||||
{
|
||||
$list[-1] = 123;
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
echo "CAUGHT\n";
|
||||
}
|
||||
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECT--
|
||||
Test::offsetSet(-1, 123)
|
||||
CAUGHT
|
||||
===DONE===
|
||||
@@ -7,31 +7,7 @@ class TestA
|
||||
{
|
||||
public function doSomething($i)
|
||||
{
|
||||
echo __METHOD__ . "($i)\n";
|
||||
return --$i;
|
||||
}
|
||||
|
||||
public function doSomethingThis($i)
|
||||
{
|
||||
echo __METHOD__ . "($i)\n";
|
||||
return --$i;
|
||||
}
|
||||
|
||||
public function doSomethingParent($i)
|
||||
{
|
||||
echo __METHOD__ . "($i)\n";
|
||||
return --$i;
|
||||
}
|
||||
|
||||
public function doSomethingParentThis($i)
|
||||
{
|
||||
echo __METHOD__ . "($i)\n";
|
||||
return --$i;
|
||||
}
|
||||
|
||||
public static function doSomethingStatic($i)
|
||||
{
|
||||
echo __METHOD__ . "($i)\n";
|
||||
echo __METHOD__ . "($this)\n";
|
||||
return --$i;
|
||||
}
|
||||
}
|
||||
@@ -40,87 +16,20 @@ class TestB extends TestA
|
||||
{
|
||||
public function doSomething($i)
|
||||
{
|
||||
echo __METHOD__ . "($i)\n";
|
||||
echo __METHOD__ . "($this)\n";
|
||||
$i++;
|
||||
if ($i >= 5) return 5;
|
||||
return call_user_func_array(array("TestA", "doSomething"), array($i));
|
||||
}
|
||||
|
||||
public function doSomethingThis($i)
|
||||
{
|
||||
echo __METHOD__ . "($i)\n";
|
||||
$i++;
|
||||
if ($i >= 5) return 5;
|
||||
return call_user_func_array(array($this, "TestA::doSomethingThis"), array($i));
|
||||
}
|
||||
|
||||
public function doSomethingParent($i)
|
||||
{
|
||||
echo __METHOD__ . "($i)\n";
|
||||
$i++;
|
||||
if ($i >= 5) return 5;
|
||||
return call_user_func_array(array("parent", "doSomethingParent"), array($i));
|
||||
}
|
||||
|
||||
public function doSomethingParentThis($i)
|
||||
{
|
||||
echo __METHOD__ . "($i)\n";
|
||||
$i++;
|
||||
if ($i >= 5) return 5;
|
||||
return call_user_func_array(array($this, "parent::doSomethingParentThis"), array($i));
|
||||
}
|
||||
|
||||
public static function doSomethingStatic($i)
|
||||
{
|
||||
echo __METHOD__ . "($i)\n";
|
||||
$i++;
|
||||
if ($i >= 5) return 5;
|
||||
return call_user_func_array(array("TestA", "doSomethingStatic"), array($i));
|
||||
return call_user_func_array(array("TestA","doSomething"), array($i));
|
||||
}
|
||||
}
|
||||
|
||||
$x = new TestB();
|
||||
echo "===A===\n";
|
||||
var_dump($x->doSomething(1));
|
||||
echo "\n===B===\n";
|
||||
var_dump($x->doSomethingThis(1));
|
||||
echo "\n===C===\n";
|
||||
var_dump($x->doSomethingParent(1));
|
||||
echo "\n===D===\n";
|
||||
var_dump($x->doSomethingParentThis(1));
|
||||
echo "\n===E===\n";
|
||||
var_dump($x->doSomethingStatic(1));
|
||||
|
||||
?>
|
||||
===DONE===
|
||||
<?php exit(0); ?>
|
||||
--EXPECTF--
|
||||
===A===
|
||||
TestB::doSomething(1)
|
||||
|
||||
Strict Standards: Non-static method TestA::doSomething() cannot be called statically, assuming $this from compatible context TestB in %sbug32290.php on line %d
|
||||
TestA::doSomething(2)
|
||||
int(1)
|
||||
|
||||
===B===
|
||||
TestB::doSomethingThis(1)
|
||||
TestA::doSomethingThis(2)
|
||||
int(1)
|
||||
|
||||
===C===
|
||||
TestB::doSomethingParent(1)
|
||||
|
||||
Strict Standards: Non-static method TestA::doSomethingParent() cannot be called statically, assuming $this from compatible context TestB in %sbug32290.php on line %d
|
||||
TestA::doSomethingParent(2)
|
||||
int(1)
|
||||
|
||||
===D===
|
||||
TestB::doSomethingParentThis(1)
|
||||
TestA::doSomethingParentThis(2)
|
||||
int(1)
|
||||
|
||||
===E===
|
||||
TestB::doSomethingStatic(1)
|
||||
TestA::doSomethingStatic(2)
|
||||
TestB::doSomething(Object id #%d)
|
||||
TestA::doSomething(Object id #%d)
|
||||
int(1)
|
||||
===DONE===
|
||||
@@ -1,60 +0,0 @@
|
||||
--TEST--
|
||||
Bug #32296 get_class_methods output has changed between 5.0.2 and 5.0.3
|
||||
--FILE--
|
||||
<?php
|
||||
abstract class space{
|
||||
function __construct(){}
|
||||
abstract protected function unfold();
|
||||
}
|
||||
|
||||
abstract class shape extends space{
|
||||
private function x1() {}
|
||||
protected final function unfold(){}
|
||||
}
|
||||
|
||||
abstract class quad extends shape{
|
||||
private function x2() {}
|
||||
function buggy(){
|
||||
$c = get_class($this);
|
||||
$a = get_class_methods(get_class($this));
|
||||
$b = get_class_methods($this);
|
||||
print($c."\n".'a:');
|
||||
print_r($a);
|
||||
print('b:');
|
||||
print_r($b);
|
||||
}
|
||||
}
|
||||
|
||||
class square extends quad{}
|
||||
|
||||
$a = new square();
|
||||
$a->buggy();
|
||||
print_r(get_class_methods("square"));
|
||||
print_r(get_class_methods($a));
|
||||
?>
|
||||
--EXPECT--
|
||||
square
|
||||
a:Array
|
||||
(
|
||||
[0] => x2
|
||||
[1] => buggy
|
||||
[2] => unfold
|
||||
[3] => __construct
|
||||
)
|
||||
b:Array
|
||||
(
|
||||
[0] => x2
|
||||
[1] => buggy
|
||||
[2] => unfold
|
||||
[3] => __construct
|
||||
)
|
||||
Array
|
||||
(
|
||||
[0] => buggy
|
||||
[1] => __construct
|
||||
)
|
||||
Array
|
||||
(
|
||||
[0] => buggy
|
||||
[1] => __construct
|
||||
)
|
||||
@@ -1,80 +0,0 @@
|
||||
--TEST--
|
||||
Bug #32322 (Return values by reference broken( using self::),example singleton instance)
|
||||
--INI--
|
||||
error_reporting=4095
|
||||
--FILE--
|
||||
<?php
|
||||
class test
|
||||
{
|
||||
private static $instance = null;
|
||||
private $myname = '';
|
||||
|
||||
private function __construct( $value = '' )
|
||||
{
|
||||
echo "New class $value created \n";
|
||||
$this -> myname = $value;
|
||||
}
|
||||
private function __clone() {}
|
||||
static public function getInstance()
|
||||
{
|
||||
if ( self::$instance == null )
|
||||
{
|
||||
self::$instance = new test('Singleton1');
|
||||
}
|
||||
else {
|
||||
echo "Using old class " . self::$instance -> myname . "\n";
|
||||
}
|
||||
return self::$instance;
|
||||
}
|
||||
static public function getInstance2()
|
||||
{
|
||||
static $instance2 = null;
|
||||
if ( $instance2 == null )
|
||||
{
|
||||
$instance2 = new test('Singleton2');
|
||||
}
|
||||
else {
|
||||
echo "Using old class " . $instance2 -> myname . "\n";
|
||||
}
|
||||
return $instance2;
|
||||
}
|
||||
public function __destruct()
|
||||
{
|
||||
if ( defined('SCRIPT_END') )
|
||||
{
|
||||
echo "Class " . $this -> myname . " destroyed at script end\n";
|
||||
} else {
|
||||
echo "Class " . $this -> myname . " destroyed beforce script end\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
echo "Try static instance inside class :\n";
|
||||
$getCopyofSingleton = test::getInstance();
|
||||
$getCopyofSingleton = null;
|
||||
$getCopyofSingleton = &test::getInstance();
|
||||
$getCopyofSingleton = null;
|
||||
$getCopyofSingleton = test::getInstance();
|
||||
echo "Try static instance inside function :\n";
|
||||
$getCopyofSingleton2 = test::getInstance2();
|
||||
$getCopyofSingleton2 = null;
|
||||
$getCopyofSingleton2 = &test::getInstance2();
|
||||
$getCopyofSingleton2 = null;
|
||||
$getCopyofSingleton2 = test::getInstance2();
|
||||
|
||||
define('SCRIPT_END',1);
|
||||
?>
|
||||
--EXPECTF--
|
||||
Try static instance inside class :
|
||||
New class Singleton1 created
|
||||
Using old class Singleton1
|
||||
|
||||
Strict Standards: Only variables should be assigned by reference in %sbug32322.php on line 49
|
||||
Using old class Singleton1
|
||||
Try static instance inside function :
|
||||
New class Singleton2 created
|
||||
Using old class Singleton2
|
||||
|
||||
Strict Standards: Only variables should be assigned by reference in %sbug32322.php on line 55
|
||||
Using old class Singleton2
|
||||
Class Singleton1 destroyed at script end
|
||||
Class Singleton2 destroyed at script end
|
||||
@@ -1,19 +0,0 @@
|
||||
--TEST--
|
||||
Bug #32427 Interfaces are not allowed 'static' access modifier
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
interface Example {
|
||||
public static function sillyError();
|
||||
}
|
||||
|
||||
class ExampleImpl implements Example {
|
||||
public static function sillyError() {
|
||||
echo "I am a silly error\n";
|
||||
}
|
||||
}
|
||||
|
||||
ExampleImpl::sillyError();
|
||||
?>
|
||||
--EXPECT--
|
||||
I am a silly error
|
||||
@@ -1,13 +0,0 @@
|
||||
--TEST--
|
||||
Bug #32428 (The @ warning error supression operator is broken)
|
||||
--FILE--
|
||||
<?php
|
||||
$data = @$not_exists;
|
||||
$data = @($not_exists);
|
||||
$data = @!$not_exists;
|
||||
$data = !@$not_exists;
|
||||
$data = @($not_exists+1);
|
||||
echo "ok\n";
|
||||
?>
|
||||
--EXPECT--
|
||||
ok
|
||||
@@ -1,28 +0,0 @@
|
||||
--TEST--
|
||||
Bug #32429 (method_exists() always return TRUE if __call method exists)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class TestClass {
|
||||
public function __construct() {
|
||||
var_dump(method_exists($this, 'test'));
|
||||
|
||||
if (method_exists($this, 'test')) {
|
||||
$this->test();
|
||||
}
|
||||
}
|
||||
|
||||
public function __call($name, $args) {
|
||||
throw new Exception('Call to undefined method'.get_class($this).'::'.$name.'()');
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
$test = new TestClass;
|
||||
} catch (Exception $e) {
|
||||
exit($e->getMessage());
|
||||
}
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
bool(false)
|
||||
Loaded 100 of 3050 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user