mirror of
https://github.com/bdnugget/php-src.git
synced 2026-11-18 06:26:37 +00:00
Compare commits
404
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a0d7ba2fe9 | ||
|
|
44e1c60e97 | ||
|
|
63998d3512 | ||
|
|
c65a552288 | ||
|
|
2242d15b5d | ||
|
|
122ad9c5c9 | ||
|
|
6bc7370532 | ||
|
|
8cd6acd69b | ||
|
|
3938bfb564 | ||
|
|
eedc988a4e | ||
|
|
6c3896b1e9 | ||
|
|
66c3a174f5 | ||
|
|
0bff67c0ab | ||
|
|
c446d68f7c | ||
|
|
f0736631d9 | ||
|
|
a75a4a4a70 | ||
|
|
fb86a176ba | ||
|
|
5c164a2223 | ||
|
|
ead72aabfb | ||
|
|
574b551567 | ||
|
|
6afbb74194 | ||
|
|
c455f49a6a | ||
|
|
28e7addb9d | ||
|
|
b300c6b87f | ||
|
|
f6c15e2caf | ||
|
|
63c558bcbb | ||
|
|
23a3bbb468 | ||
|
|
e96b984026 | ||
|
|
6fa4493f7b | ||
|
|
33a93b5ed7 | ||
|
|
ef3e0ee08a | ||
|
|
6ccbaa12e0 | ||
|
|
2558acbd66 | ||
|
|
04078a597c | ||
|
|
0c57ebb116 | ||
|
|
7fbfcfa851 | ||
|
|
090627048c | ||
|
|
c2b5284734 | ||
|
|
d2d227e547 | ||
|
|
1c2e7b4ea0 | ||
|
|
ab3052ab26 | ||
|
|
57918b1a1b | ||
|
|
f547bddcc0 | ||
|
|
af948ae24c | ||
|
|
54e2ef0b81 | ||
|
|
e8361eb0e3 | ||
|
|
a3c38c2596 | ||
|
|
12118d592a | ||
|
|
0413cf3c20 | ||
|
|
9bf1224d07 | ||
|
|
674b884c7a | ||
|
|
bcea74fd13 | ||
|
|
8deadfa31b | ||
|
|
fb2bf8bd58 | ||
|
|
f95f8a3c1e | ||
|
|
d87d2f006c | ||
|
|
dd3e56ba24 | ||
|
|
178bbe3478 | ||
|
|
bf9dc53435 | ||
|
|
068c8db276 | ||
|
|
9e51b487f3 | ||
|
|
896e4d3428 | ||
|
|
8294ad3295 | ||
|
|
125fc0b8d4 | ||
|
|
bb0107b63d | ||
|
|
f020d537b0 | ||
|
|
d1c0cbdcb1 | ||
|
|
0cafd53d18 | ||
|
|
398cfb982e | ||
|
|
5ce0fa2129 | ||
|
|
0328ff49cc | ||
|
|
c2a06f5d9a | ||
|
|
42c72ef463 | ||
|
|
30d3062c9b | ||
|
|
645815c5b7 | ||
|
|
272df442f5 | ||
|
|
7bc9df4af2 | ||
|
|
b8e49fe872 | ||
|
|
47bed58a53 | ||
|
|
2ceef24f4a | ||
|
|
028dd891f9 | ||
|
|
5acab7ebb4 | ||
|
|
220ffb90d0 | ||
|
|
67c4d1f5b9 | ||
|
|
76d1120a48 | ||
|
|
af9fadc55a | ||
|
|
c340f97ab0 | ||
|
|
4a5bda6a8d | ||
|
|
c7387ab92f | ||
|
|
98a071e880 | ||
|
|
9ce5776922 | ||
|
|
3f71ba2611 | ||
|
|
4c80e439a8 | ||
|
|
7f83976200 | ||
|
|
606b2c39fc | ||
|
|
66308af539 | ||
|
|
98c8ad9218 | ||
|
|
e1f8763a2c | ||
|
|
20b62ade29 | ||
|
|
096f148c61 | ||
|
|
3e518e069d | ||
|
|
12e15be921 | ||
|
|
60a68a45c3 | ||
|
|
7544f66da9 | ||
|
|
310c0561a9 | ||
|
|
a4d9ccbcd6 | ||
|
|
568df31698 | ||
|
|
37962c61d2 | ||
|
|
eed03fce59 | ||
|
|
2b3346208a | ||
|
|
1b88c85cd8 | ||
|
|
6de2d54425 | ||
|
|
76637017ac | ||
|
|
9f7e8b777c | ||
|
|
d1e590fe72 | ||
|
|
2bce26f2aa | ||
|
|
c0ae3a7fb7 | ||
|
|
bc6fc61c04 | ||
|
|
7f9183ce20 | ||
|
|
361df6d39c | ||
|
|
33d49551d1 | ||
|
|
09696eee9d | ||
|
|
97f8ca52fa | ||
|
|
418fcd22e8 | ||
|
|
fe219d912e | ||
|
|
a2771296c0 | ||
|
|
cb84e5c332 | ||
|
|
23a192d12d | ||
|
|
39ddf6b89c | ||
|
|
b0f030509a | ||
|
|
054fad6d63 | ||
|
|
3c6480552d | ||
|
|
1fcea24efb | ||
|
|
0f40426450 | ||
|
|
263f14ac60 | ||
|
|
ffb1ff371c | ||
|
|
8a7b786b7f | ||
|
|
cb262cd974 | ||
|
|
ea3c992bff | ||
|
|
d4a206b276 | ||
|
|
d918c1443e | ||
|
|
0071c7ed7e | ||
|
|
ecc4bf14f0 | ||
|
|
09f55604ec | ||
|
|
c0b1bdcdc3 | ||
|
|
d0fd118f9b | ||
|
|
46f9fed0d8 | ||
|
|
f40c8fdf67 | ||
|
|
a3e6735999 | ||
|
|
7c6cf09463 | ||
|
|
80f921d7e0 | ||
|
|
976e71a2fa | ||
|
|
6fd13d0afd | ||
|
|
ec24f14820 | ||
|
|
5ccb5fd91e | ||
|
|
f20ca94b1c | ||
|
|
f99926f554 | ||
|
|
79872ac9c2 | ||
|
|
3c06794e93 | ||
|
|
8e48895f48 | ||
|
|
2ebd1c4e86 | ||
|
|
fac39fa36d | ||
|
|
d4f7e8cedc | ||
|
|
1395b874f4 | ||
|
|
a1fdfa700b | ||
|
|
8effbd1cb0 | ||
|
|
d74c61c133 | ||
|
|
0a36d417e8 | ||
|
|
6700198d64 | ||
|
|
a04fac84e7 | ||
|
|
4e98e65d53 | ||
|
|
9c6b926dae | ||
|
|
600402d986 | ||
|
|
4f236635e7 | ||
|
|
340a06778c | ||
|
|
7f4784c1c9 | ||
|
|
da3a807f22 | ||
|
|
26d417d758 | ||
|
|
454d297564 | ||
|
|
61e385a358 | ||
|
|
7a8ffcec7d | ||
|
|
332a367538 | ||
|
|
29fa4d203a | ||
|
|
59b2a899ca | ||
|
|
0826a54836 | ||
|
|
f421ebc056 | ||
|
|
25f5a1b2e1 | ||
|
|
032905b5a0 | ||
|
|
eebcfeb68e | ||
|
|
ba6714a200 | ||
|
|
0a181ca27a | ||
|
|
de9734a5bb | ||
|
|
9688071679 | ||
|
|
304190c49d | ||
|
|
50f476591f | ||
|
|
e0996decc3 | ||
|
|
39d8fc1edc | ||
|
|
443478109b | ||
|
|
206fd35a98 | ||
|
|
b95b553489 | ||
|
|
dd227f61df | ||
|
|
75cb678206 | ||
|
|
d7ae64627f | ||
|
|
6800f0a3c2 | ||
|
|
5832be768c | ||
|
|
498eb8e052 | ||
|
|
733b514326 | ||
|
|
688e56d0ac | ||
|
|
90be86fc91 | ||
|
|
838951c2d6 | ||
|
|
4dca1140cf | ||
|
|
bc7ea73da5 | ||
|
|
713b82131b | ||
|
|
538f95b1b7 | ||
|
|
c483b59124 | ||
|
|
2a1ed81ffc | ||
|
|
06bfada99b | ||
|
|
97cfdcd73b | ||
|
|
bccca0b53a | ||
|
|
465cfc499b | ||
|
|
4dce2f83f5 | ||
|
|
4be867e910 | ||
|
|
7e494d9225 | ||
|
|
34e39ebaf5 | ||
|
|
d80118dc16 | ||
|
|
c17434429d | ||
|
|
faf1567212 | ||
|
|
fddd0ac552 | ||
|
|
a08847ab39 | ||
|
|
c7fadd2328 | ||
|
|
38ebb55c7c | ||
|
|
82622d7583 | ||
|
|
c2ff964de0 | ||
|
|
4adc08a403 | ||
|
|
7dbe27222c | ||
|
|
5e4ee3d0bd | ||
|
|
eb1d1fe373 | ||
|
|
465aa1d38f | ||
|
|
b03438ba3a | ||
|
|
5ecc078a17 | ||
|
|
eae69fcf71 | ||
|
|
f448b0e6dd | ||
|
|
50254de0a2 | ||
|
|
282355efd5 | ||
|
|
6493b516f9 | ||
|
|
c93b461ad7 | ||
|
|
3306baca50 | ||
|
|
fc4cd598a2 | ||
|
|
703bbf5210 | ||
|
|
eaf9421df6 | ||
|
|
3b377b51a2 | ||
|
|
7931956805 | ||
|
|
f901bec494 | ||
|
|
3880b8785b | ||
|
|
5787f91c55 | ||
|
|
0f8312342f | ||
|
|
8462a3de1a | ||
|
|
8fc0bdfb0a | ||
|
|
797edd6211 | ||
|
|
ae23852e41 | ||
|
|
1c16749eaa | ||
|
|
e0e167e581 | ||
|
|
187ba4353a | ||
|
|
4f478af16d | ||
|
|
303a4ae44a | ||
|
|
90b24401d6 | ||
|
|
51e2015af3 | ||
|
|
957cb13a49 | ||
|
|
37c9728615 | ||
|
|
71297a254b | ||
|
|
75a4f484f0 | ||
|
|
5875bf754e | ||
|
|
2c508c4d40 | ||
|
|
2c182a77f7 | ||
|
|
e857936518 | ||
|
|
1ee6aad248 | ||
|
|
8813f2e0c3 | ||
|
|
988c3f9659 | ||
|
|
18071aaa08 | ||
|
|
ae0585c98e | ||
|
|
fb683030bf | ||
|
|
a480bf8093 | ||
|
|
ddea5c0816 | ||
|
|
f06efce387 | ||
|
|
8309c04464 | ||
|
|
44ef32ff2c | ||
|
|
766f827e26 | ||
|
|
aaea81de7c | ||
|
|
3ec37a74a2 | ||
|
|
78b0a85de6 | ||
|
|
b7fa5268e4 | ||
|
|
8162c3d1fd | ||
|
|
67bb06cc9b | ||
|
|
729cd8bacd | ||
|
|
3f282e57ec | ||
|
|
81396ea890 | ||
|
|
79cf2c56d3 | ||
|
|
b418fe266d | ||
|
|
963e50c8c4 | ||
|
|
1d2bbce532 | ||
|
|
073b6ea818 | ||
|
|
6dcd640f35 | ||
|
|
d7c98ca1ac | ||
|
|
ab98944195 | ||
|
|
ed4f90f0c7 | ||
|
|
6dd85f83f7 | ||
|
|
85ffe8dcdc | ||
|
|
553a0c52b1 | ||
|
|
84b6152842 | ||
|
|
cbdd21a22d | ||
|
|
8c6db654e7 | ||
|
|
7f68a7afe6 | ||
|
|
408272b8d9 | ||
|
|
fad87a24da | ||
|
|
edb9229b8b | ||
|
|
9552cf6b84 | ||
|
|
b63ea1047a | ||
|
|
cb9785add1 | ||
|
|
2dc75a9e93 | ||
|
|
2d858fbfb1 | ||
|
|
f73e419996 | ||
|
|
6d3d9104e6 | ||
|
|
2d7ada2c0b | ||
|
|
4fb8252186 | ||
|
|
7566742754 | ||
|
|
afe17cc1b6 | ||
|
|
f43097a2d7 | ||
|
|
64b1085464 | ||
|
|
882862563a | ||
|
|
7b7d99839c | ||
|
|
c70220205e | ||
|
|
8b9dd0a301 | ||
|
|
3646604203 | ||
|
|
8e9eeca0b3 | ||
|
|
44a80b64b9 | ||
|
|
6ec25f386f | ||
|
|
5199686873 | ||
|
|
226395a335 | ||
|
|
c34c523467 | ||
|
|
7215261349 | ||
|
|
cec5e30889 | ||
|
|
d80d918547 | ||
|
|
39c6aaa9cc | ||
|
|
fd5ff37db7 | ||
|
|
ce7935e82a | ||
|
|
40ba9f6a1a | ||
|
|
cff35ca0b2 | ||
|
|
788abb8cc8 | ||
|
|
32d128d219 | ||
|
|
45fa7596dc | ||
|
|
57cb01a927 | ||
|
|
838ae016d7 | ||
|
|
d4aff25473 | ||
|
|
f5768eaa2e | ||
|
|
186f9bab45 | ||
|
|
44192ce80b | ||
|
|
3549f48edc | ||
|
|
ab92ffee22 | ||
|
|
ff8da0dcff | ||
|
|
4f508003a9 | ||
|
|
92f71d9d42 | ||
|
|
03713ace23 | ||
|
|
f731477cd7 | ||
|
|
ca7547c9e2 | ||
|
|
e2c30c6a2e | ||
|
|
5e06dad411 | ||
|
|
f23bfc4b43 | ||
|
|
95e405023e | ||
|
|
4ff2665509 | ||
|
|
4be5b4aa25 | ||
|
|
3f8d21b922 | ||
|
|
0c6ff5eafa | ||
|
|
8b7aaad7d6 | ||
|
|
5cb25a2d32 | ||
|
|
767ddb1cd5 | ||
|
|
958e3b93c3 | ||
|
|
06c9633b43 | ||
|
|
f4332a36b4 | ||
|
|
1bb2a4f91c | ||
|
|
665e1f324a | ||
|
|
37ab72768f | ||
|
|
3d09626f0d | ||
|
|
039ca4e219 | ||
|
|
f1cf553437 | ||
|
|
8c04944b66 | ||
|
|
b20362c24b | ||
|
|
0ec7bfaa43 | ||
|
|
54fa0a69f8 | ||
|
|
f1a988af4b | ||
|
|
51d76c346e | ||
|
|
efe69168b4 | ||
|
|
675a9b2831 | ||
|
|
57257a4335 | ||
|
|
766d5846b1 | ||
|
|
7e9479083d | ||
|
|
cab1ea46e7 | ||
|
|
9efd7ddd0a | ||
|
|
217b9e7b41 | ||
|
|
c72957b409 | ||
|
|
ab8177de2c | ||
|
|
12d08db913 | ||
|
|
d94d0dda29 | ||
|
|
86de4d7af6 | ||
|
|
3c939e3f69 |
No files matched your search
@@ -11,9 +11,7 @@ end
|
||||
|
||||
define ____executor_globals
|
||||
if basic_functions_module.zts
|
||||
if !$tsrm_ls
|
||||
set $tsrm_ls = ts_resource_ex(0, 0)
|
||||
end
|
||||
set $tsrm_ls = _tsrm_ls_cache
|
||||
set $eg = ((zend_executor_globals*) (*((void ***) $tsrm_ls))[executor_globals_id-1])
|
||||
set $cg = ((zend_compiler_globals*) (*((void ***) $tsrm_ls))[compiler_globals_id-1])
|
||||
set $eg_ptr = $eg
|
||||
|
||||
@@ -68,12 +68,6 @@ env:
|
||||
|
||||
jobs:
|
||||
include:
|
||||
- env: ENABLE_ZTS=0 ENABLE_DEBUG=0
|
||||
arch: amd64
|
||||
if: type = cron
|
||||
- env: ENABLE_ZTS=1 ENABLE_DEBUG=1
|
||||
arch: amd64
|
||||
if: type = cron
|
||||
- env: ENABLE_ZTS=1 ENABLE_DEBUG=1 SKIP_IO_CAPTURE_TESTS=1 ARM64=1
|
||||
arch: arm64
|
||||
if: type = cron
|
||||
|
||||
+1
-2
@@ -327,8 +327,7 @@ Currently we have the following branches in use:
|
||||
|
||||
| Branch | |
|
||||
| --------- | --------- |
|
||||
| master | Active development branch for PHP 8.1, which is open for backwards incompatible changes and major internal API changes. |
|
||||
| PHP-8.0 | Is used to release the PHP 8.0.x series. This is a current stable version and is open for bugfixes only. |
|
||||
| master | Active development branch for PHP 8.0, which is open for backwards incompatible changes and major internal API changes. |
|
||||
| PHP-7.4 | Is used to release the PHP 7.4.x series. This is a current stable version and is open for bugfixes only. |
|
||||
| PHP-7.3 | Is used to release the PHP 7.3.x series. This is a current stable version and is open for bugfixes only. |
|
||||
| PHP-7.2 | Is used to release the PHP 7.2.x series. This is an old stable version and is open for security fixes only. |
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--------------------------------------------------------------------
|
||||
The PHP License, version 3.01
|
||||
Copyright (c) 1999 - 2019 The PHP Group. All rights reserved.
|
||||
Copyright (c) 1999 - 2021 The PHP Group. All rights reserved.
|
||||
--------------------------------------------------------------------
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
|
||||
@@ -1,38 +1,771 @@
|
||||
PHP NEWS
|
||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||
?? ??? ????, PHP 8.1.0alpha1
|
||||
03 Jun 2021, PHP 8.0.7
|
||||
|
||||
- Core:
|
||||
. Fixed inclusion order for phpize builds on Windows. (cmb)
|
||||
. Added missing hashtable insertion APIs for arr/obj/ref. (Sara)
|
||||
. Fixed bug #80960 (opendir() warning wrong info when failed on Windows).
|
||||
(cmb)
|
||||
. Fixed bug #67792 (HTTP Authorization schemes are treated as case-sensitive).
|
||||
(cmb)
|
||||
. Fixed bug #80972 (Memory exhaustion on invalid string offset). (girgias)
|
||||
|
||||
- FPM:
|
||||
. Fixed bug #65800 (Events port mechanism). (psumbera)
|
||||
|
||||
- FTP:
|
||||
. Convert resource<ftp> to object \FTPConnection. (Sara)
|
||||
. Fixed bug #80901 (Info leak in ftp extension). (cmb)
|
||||
. Fixed bug #79100 (Wrong FTP error messages). (cmb)
|
||||
|
||||
- GD:
|
||||
. Convert resource<gd font> to object \GdFont. (Sara)
|
||||
. Fixed bug #81032 (GD install is affected by external libgd installation).
|
||||
(Flavio Heleno, cmb)
|
||||
|
||||
- hash:
|
||||
. Implemented FR #68109 (Add MurmurHash V3). (Anatol, Michael)
|
||||
. Implemented xxHash support. (Anatol)
|
||||
- Intl:
|
||||
. Fixed bug #81019 (Unable to clone NumberFormatter after failed parse()).
|
||||
(Nikita)
|
||||
|
||||
- MBString:
|
||||
. Fixed bug #81011 (mb_convert_encoding removes references from arrays). (cmb)
|
||||
|
||||
- ODBC:
|
||||
. Fixed bug #80460 (ODBC doesn't account for SQL_NO_TOTAL indicator). (cmb)
|
||||
|
||||
- Opcache:
|
||||
. Fixed bug #81007 (JIT "not supported" on 32-bit x86 -- build problem?).
|
||||
(Nikita)
|
||||
. Fixed bug #81015 (Opcache optimization assumes wrong part of ternary
|
||||
operator in if-condition). (Nikita)
|
||||
. Fixed bug #81046 (Literal compaction merges non-equal related literals).
|
||||
(Nikita)
|
||||
|
||||
- PDO_MySQL:
|
||||
. Fixed bug #81037 (PDO discards error message text from prepared
|
||||
statement). (Kamil Tekiela)
|
||||
|
||||
- PDO_ODBC:
|
||||
. Fixed bug #44643 (bound parameters ignore explicit type definitions). (cmb)
|
||||
|
||||
- pgsql:
|
||||
. Fixed php_pgsql_fd_cast() wrt. php_stream_can_cast(). (cmb)
|
||||
|
||||
- SPL:
|
||||
. Fixed bug #80933 (SplFileObject::DROP_NEW_LINE is broken for NUL and CR).
|
||||
(cmb, Nikita)
|
||||
|
||||
- XMLReader:
|
||||
. Fixed bug #73246 (XMLReader: encoding length not checked). (cmb)
|
||||
|
||||
- Zip:
|
||||
. Fixed bug #80863 (ZipArchive::extractTo() ignores references). (cmb)
|
||||
|
||||
06 May 2021, PHP 8.0.6
|
||||
|
||||
- PDO_pgsql:
|
||||
. Revert "Fixed bug #80892 (PDO::PARAM_INT is treated the same as PDO::PARAM_STR)"
|
||||
from PHP 8.0.5.
|
||||
|
||||
29 Apr 2021, PHP 8.0.5
|
||||
|
||||
- Core:
|
||||
. Changed PowerPC CPU registers used by Zend VM to work around GCC bug.
|
||||
Old registers (r28/r29) might be clobbered by _restgpr routine used for
|
||||
return from C function compiled with -Os. (Dmitry)
|
||||
|
||||
- DOM:
|
||||
. Fixed bug #66783 (UAF when appending DOMDocument to element). (cmb)
|
||||
|
||||
- FFI:
|
||||
. Fixed bug #80847 (CData structs with fields of type struct can't be passed
|
||||
as C function argument). (Nickolas Daniel da Silva, Dmitry)
|
||||
|
||||
- FPM:
|
||||
. Fixed bug #80024 (Duplication of info about inherited socket after pool
|
||||
removing). (Jakub Zelenka)
|
||||
|
||||
- FTP:
|
||||
. Fixed bug #80880 (SSL_read on shutdown, ftp/proc_open). (cmb, Jakub
|
||||
Zelenka)
|
||||
|
||||
- Imap:
|
||||
. Fixed bug #80710 (imap_mail_compose() header injection). (cmb, Stas)
|
||||
|
||||
- LibXML:
|
||||
. Fixed bug #73533 (Invalid memory access in php_libxml_xmlCheckUTF8). (cmb)
|
||||
|
||||
- Opcache:
|
||||
. Fixed bug #80839 (PHP problem with JIT). (Dmitry)
|
||||
. Fixed bug #80861 (erronous array key overflow in 2D array with JIT).
|
||||
(Dmitry)
|
||||
|
||||
- Pcntl:
|
||||
. Fixed bug #79812 (Potential integer overflow in pcntl_exec()). (cmb)
|
||||
|
||||
- PDO_ODBC:
|
||||
. Fixed bug #80783 (PDO ODBC truncates BLOB records at every 256th byte).
|
||||
(cmb)
|
||||
|
||||
- PDO_pgsql:
|
||||
. Fixed bug #80892 (PDO::PARAM_INT is treated the same as PDO::PARAM_STR).
|
||||
(Matteo)
|
||||
|
||||
- Session:
|
||||
. Fixed bug #80889 (Cannot set save handler when save_handler is invalid).
|
||||
(cmb)
|
||||
|
||||
- SOAP:
|
||||
. Fixed bug #69668 (SOAP special XML characters in namespace URIs not
|
||||
encoded). (cmb)
|
||||
|
||||
- Standard:
|
||||
. Fixed bug #80915 (Taking a reference to $_SERVER hides its values from
|
||||
phpinfo()). (Rowan Tommins)
|
||||
. Fixed bug #80914 ('getdir' accidentally defined as an alias of 'dir').
|
||||
(Rowan Tommins)
|
||||
|
||||
01 Apr 2021, PHP 8.0.4
|
||||
|
||||
- Core:
|
||||
. Fixed bug #75776 (Flushing streams with compression filter is broken). (cmb)
|
||||
. Fixed bug #80811 (Function exec without $output but with $restult_code
|
||||
parameter crashes). (Nikita)
|
||||
. Fixed bug #80814 (threaded mod_php won't load on FreeBSD: No space
|
||||
available for static Thread Local Storage). (Dmitry)
|
||||
|
||||
- Dba:
|
||||
. Fixed bug #80817 (dba_popen() may cause segfault during RSHUTDOWN). (cmb)
|
||||
|
||||
- IMAP:
|
||||
. Fixed bug #80800 (imap_open() fails when the flags parameter includes
|
||||
CL_EXPUNGE). (girgias)
|
||||
|
||||
- Intl:
|
||||
. Fixed bug #80763 (msgfmt_format() does not accept DateTime references).
|
||||
(cmb)
|
||||
|
||||
- Libxml:
|
||||
. Fixed bug #51903 (simplexml_load_file() doesn't use HTTP headers). (cmb)
|
||||
|
||||
- MySQLnd:
|
||||
. Fixed bug #80837 (Calling stmt_store_result after fetch doesn't throw an
|
||||
error). (Kamil Tekiela)
|
||||
|
||||
- Opcache:
|
||||
. Fixed bug #80786 (PHP crash using JIT). (Nikita)
|
||||
. Fixed bug #80782 (DASM_S_RANGE_VREG on PHP_INT_MIN-1). (Dmitry)
|
||||
|
||||
- PCRE:
|
||||
. Fixed bug #80866 (preg_split ignores limit flag when pattern with \K has
|
||||
0-width fullstring match). (Kamil Tekiela)
|
||||
|
||||
- Session:
|
||||
. Fixed bug #80774 (session_name() problem with backslash). (cmb)
|
||||
|
||||
- Standard:
|
||||
. Fixed bug #80771 (phpinfo(INFO_CREDITS) displays nothing in CLI). (cmb)
|
||||
. Fixed bug #78719 (http wrapper silently ignores long Location headers).
|
||||
(cmb)
|
||||
. Fixed bug #80838 (HTTP wrapper waits for HTTP 1 response after HTTP 101).
|
||||
(manuelm)
|
||||
|
||||
- Zip:
|
||||
. Fixed bug #80825 (ZipArchive::isCompressionMethodSupported does not exist).
|
||||
(cmb)
|
||||
|
||||
18 Feb 2021, PHP 8.0.3
|
||||
|
||||
- Core:
|
||||
. Fixed #80706 (mail(): Headers after Bcc headers may be ignored). (cmb)
|
||||
|
||||
- DOM:
|
||||
. Fixed bug #80600 (DOMChildNode::remove() doesn't work on CharacterData
|
||||
nodes). (beberlei)
|
||||
|
||||
- Gettext:
|
||||
. Fixed bug #53251 (bindtextdomain with null dir doesn't return old value).
|
||||
(cmb)
|
||||
|
||||
- MySQLnd:
|
||||
. Fixed bug #78680 (mysqlnd's mysql_clear_password does not transmit
|
||||
null-terminated password). (Daniel Black)
|
||||
. Fixed bug #80713 (SegFault when disabling ATTR_EMULATE_PREPARES and
|
||||
MySQL 8.0). (Nikita)
|
||||
|
||||
- MySQLi:
|
||||
. Fixed bug #70372 (Emulate mysqli_fetch_all() for libmysqlclient). (Nikita)
|
||||
. Fixed bug #80330 (Replace language in APIs and source code/docs).
|
||||
(Darek Ślusarczyk)
|
||||
. Fixed bug #74779 (x() and y() truncating floats to integers). (cmb)
|
||||
|
||||
- Opcache:
|
||||
. Fixed bug #80634 (write_property handler of internal classes is skipped on
|
||||
preloaded JITted code). (Dmitry)
|
||||
. Fixed bug #80682 (opcache doesn't honour pcre.jit option). (Remi)
|
||||
. Fixed bug #80742 (Opcache JIT makes some boolean logic unexpectedly be
|
||||
true). (Dmitry)
|
||||
. Fixed bug #80745 (JIT produces Assert failure and UNKNOWN:0 var_dumps in
|
||||
code involving bitshifts). (Dmitry)
|
||||
|
||||
- OpenSSL:
|
||||
. Bump minimal OpenSSL version to 1.0.2. (Jakub Zelenka)
|
||||
. Fixed bug #80747 (Providing RSA key size < 512 generates key that crash
|
||||
PHP). (Nikita)
|
||||
|
||||
- Phar:
|
||||
. Fixed bug #75850 (Unclear error message wrt. __halt_compiler() w/o
|
||||
semicolon) (cmb)
|
||||
. Fixed bug #70091 (Phar does not mark UTF-8 filenames in ZIP archives). (cmb)
|
||||
. Fixed bug #53467 (Phar cannot compress large archives). (cmb, lserni)
|
||||
|
||||
- Socket:
|
||||
. Fixed bug #80723 (Different sockets compare as equal (regression in 8.0)).
|
||||
(Nikita)
|
||||
|
||||
- SPL:
|
||||
. Fixed bug#80719 (Iterating after failed ArrayObject::setIteratorClass()
|
||||
causes Segmentation fault). (Nikita)
|
||||
|
||||
- Standard:
|
||||
. Fixed bug #80654 (file_get_contents() maxlen fails above (2**31)-1 bytes).
|
||||
(cmb)
|
||||
. Fixed bug #80718 (ext/standard/dl.c fallback code path with syntax error).
|
||||
(Nikita)
|
||||
|
||||
21 Jan 2021, PHP 8.0.2
|
||||
|
||||
- Core:
|
||||
. Fixed bug #80523 (bogus parse error on >4GB source code). (Nikita)
|
||||
. Fixed bug #80384 (filter buffers entire read until file closed). (Adam
|
||||
Seitz, cmb)
|
||||
. Fixed bug #80596 (Invalid union type TypeError in anonymous classes).
|
||||
(Daniil Gentili)
|
||||
. Fixed bug #80617 (GCC throws warning about type narrowing in
|
||||
ZEND_TYPE_INIT_CODE). (Nikita)
|
||||
|
||||
- BCMath:
|
||||
. Fixed bug #80545 (bcadd('a', 'a') doesn't throw an exception).
|
||||
(Jens de Nies)
|
||||
|
||||
- Curl:
|
||||
. Fixed bug #80595 (Resetting POSTFIELDS to empty array breaks request). (cmb)
|
||||
|
||||
- Date:
|
||||
. Fixed bug #80376 (last day of the month causes runway cpu usage). (Derick)
|
||||
|
||||
- DOM:
|
||||
. Fixed bug #80537 (Wrong parameter type in DOMElement::removeAttributeNode
|
||||
stub). (Nikita)
|
||||
|
||||
- Filter:
|
||||
. Fixed bug #80584 (0x and 0X are considered valid hex numbers by
|
||||
filter_var()). (girgias)
|
||||
|
||||
- GMP:
|
||||
. Fixed bug #80560 (Strings containing only a base prefix return 0 object).
|
||||
(girgias)
|
||||
|
||||
- Intl:
|
||||
. Fixed bug #80644 (Missing resource causes subsequent get() calls to fail).
|
||||
(Nikita)
|
||||
|
||||
- MySQLi:
|
||||
. Fixed bug #67983 (mysqlnd with MYSQLI_OPT_INT_AND_FLOAT_NATIVE fails to
|
||||
interpret bit columns). (Nikita)
|
||||
. Fixed bug #64638 (Fetching resultsets from stored procedure with cursor
|
||||
fails). (Nikita)
|
||||
. Fixed bug #72862 (segfault using prepared statements on stored procedures
|
||||
that use a cursor). (Nikita)
|
||||
. Fixed bug #77935 (Crash in mysqlnd_fetch_stmt_row_cursor when calling an SP
|
||||
with a cursor). (Nikita)
|
||||
|
||||
- ODBC:
|
||||
. Fixed bug #80592 (all floats are the same in ODBC parameters). (cmb)
|
||||
|
||||
- Opcache:
|
||||
. Fixed bug #80422 (php_opcache.dll crashes when using Apache 2.4 with JIT).
|
||||
(Dmitry)
|
||||
|
||||
- PDO_Firebird:
|
||||
. Fixed bug #80521 (Parameters with underscores no longer recognized). (cmb,
|
||||
Simonov Denis)
|
||||
|
||||
- Phar:
|
||||
. Fixed bug #76929 (zip-based phar does not respect phar.require_hash).
|
||||
(david at bamsoftware, cmb)
|
||||
. Fixed bug #77565 (Incorrect locator detection in ZIP-based phars). (cmb)
|
||||
. Fixed bug #69279 (Compressed ZIP Phar extractTo() creates garbage files).
|
||||
(cmb)
|
||||
|
||||
- Phpdbg:
|
||||
. Reverted fix for bug #76813 (Access violation near NULL on source operand).
|
||||
(cmb)
|
||||
|
||||
07 Jan 2021, PHP 8.0.1
|
||||
|
||||
- Core:
|
||||
. Fixed bug #80345 (PHPIZE configuration has outdated PHP_RELEASE_VERSION).
|
||||
(cmb)
|
||||
. Fixed bug #72964 (White space not unfolded for CC/Bcc headers). (cmb)
|
||||
. Fixed bug #80391 (Iterable not covariant to mixed). (Nikita)
|
||||
. Fixed bug #80393 (Build of PHP extension fails due to configuration gap
|
||||
with libtool). (kir dot morozov at gmail dot com)
|
||||
. Fixed bug #77069 (stream filter loses final block of data). (cmb)
|
||||
|
||||
- Fileinfo:
|
||||
. Fixed bug #77961 (finfo_open crafted magic parsing SIGABRT). (cmb)
|
||||
|
||||
- FPM:
|
||||
. Fixed bug #69625 (FPM returns 200 status on request without
|
||||
SCRIPT_FILENAME env). (Jakub Zelenka)
|
||||
|
||||
- IMAP
|
||||
. Fixed bug #80438 (imap_msgno() incorrectly warns and return false on valid UIDs in PHP 8.0.0). (girgias)
|
||||
. Fix a regression with valid UIDs in imap_savebody() (girgias)
|
||||
. Make warnings for invalid message numbers/UIDs between functions consistent (girgias)
|
||||
|
||||
- Intl:
|
||||
. Fixed bug #80425 (MessageFormatAdapter::getArgTypeList redefined). (Nikita)
|
||||
|
||||
- OCI8
|
||||
. Create Windows DLLs for Oracle Client 19c. (cmb)
|
||||
|
||||
- Opcache:
|
||||
. Fixed bug #80404 (Incorrect range inference result when division results
|
||||
in float). (Nikita)
|
||||
. Fixed bug #80377 (Opcache misses executor_globals). (Nikita)
|
||||
. Fixed bug #80433 (Unable to disable the use of the AVX command when using
|
||||
JIT). (Nikita)
|
||||
. Fixed bug #80447 (Strange out of memory error when running with JIT).
|
||||
(Dmitry)
|
||||
. Fixed bug #80480 (Segmentation fault with JIT enabled). (Dmitry)
|
||||
. Fixed bug #80506 (Immediate SIGSEGV upon ini_set("opcache.jit_debug", 1)).
|
||||
(Dmitry)
|
||||
|
||||
- OpenSSL:
|
||||
. Fixed bug #80368 (OpenSSL extension fails to build against LibreSSL due to
|
||||
lack of OCB support). (Nikita)
|
||||
|
||||
- PDO MySQL:
|
||||
. Fixed bug #80458 (PDOStatement::fetchAll() throws for upsert queries).
|
||||
(Kamil Tekiela)
|
||||
. Fixed bug #63185 (nextRowset() ignores MySQL errors with native prepared
|
||||
statements). (Nikita)
|
||||
. Fixed bug #78152 (PDO::exec() - Bad error handling with multiple commands).
|
||||
(Nikita)
|
||||
. Fixed bug #66878 (Multiple rowsets not returned unless PDO statement object
|
||||
is unset()). (Nikita)
|
||||
. Fixed bug #70066 (Unexpected "Cannot execute queries while other unbuffered
|
||||
queries"). (Nikita)
|
||||
. Fixed bug #71145 (Multiple statements in init command triggers unbuffered
|
||||
query error). (Nikita)
|
||||
. Fixed bug #76815 (PDOStatement cannot be GCed/closeCursor-ed when a
|
||||
PROCEDURE resultset SIGNAL). (Nikita)
|
||||
. Fixed bug #79872 (Can't execute query with pending result sets). (Nikita)
|
||||
. Fixed bug #79131 (PDO does not throw an exception when parameter values are
|
||||
missing). (Nikita)
|
||||
. Fixed bug #72368 (PdoStatement->execute() fails but does not throw an
|
||||
exception). (Nikita)
|
||||
. Fixed bug #62889 (LOAD DATA INFILE broken). (Nikita)
|
||||
. Fixed bug #67004 (Executing PDOStatement::fetch() more than once prevents
|
||||
releasing resultset). (Nikita)
|
||||
. Fixed bug #79132 (PDO re-uses parameter values from earlier calls to
|
||||
execute()). (Nikita)
|
||||
|
||||
- Phar:
|
||||
. Fixed bug #73809 (Phar Zip parse crash - mmap fail). (cmb)
|
||||
. Fixed bug #75102 (`PharData` says invalid checksum for valid tar). (cmb)
|
||||
. Fixed bug #77322 (PharData::addEmptyDir('/') Possible integer overflow).
|
||||
(cmb)
|
||||
|
||||
- Phpdbg:
|
||||
. Fixed bug #76813 (Access violation near NULL on source operand). (cmb)
|
||||
|
||||
- SPL:
|
||||
. Fixed #62004 (SplFileObject: fgets after seek returns wrong line). (cmb)
|
||||
|
||||
- Standard:
|
||||
. Fixed bug #77423 (FILTER_VALIDATE_URL accepts URLs with invalid userinfo).
|
||||
(CVE-2020-7071) (cmb)
|
||||
. Fixed bug #80366 (Return Value of zend_fstat() not Checked). (sagpant, cmb)
|
||||
|
||||
- Tidy:
|
||||
. Fixed bug #77594 (ob_tidyhandler is never reset). (cmb)
|
||||
|
||||
- Tokenizer:
|
||||
. Fixed bug #80462 (Nullsafe operator tokenize with TOKEN_PARSE flag fails).
|
||||
(Nikita)
|
||||
|
||||
- XML:
|
||||
. XmlParser opaque object renamed to XMLParser for consistency with other XML objects. (girgias)
|
||||
|
||||
- Zlib:
|
||||
. Fixed #48725 (Support for flushing in zlib stream). (cmb)
|
||||
|
||||
26 Nov 2020, PHP 8.0.0
|
||||
|
||||
- BZ2:
|
||||
. Fixed bug #71263 (fread() does not report bzip2.decompress errors). (cmb)
|
||||
|
||||
- CLI:
|
||||
. Allow debug server binding to an ephemeral port via `-S localhost:0`. (Sara)
|
||||
|
||||
- COM:
|
||||
. Fixed bug #55847 (DOTNET .NET 4.0 GAC new location). (cmb)
|
||||
. Fixed bug #62474 (com_event_sink crashes on certain arguments). (cmb)
|
||||
|
||||
- Calendar:
|
||||
. Fixed bug #80007 (Potential type confusion in unixtojd() parameter parsing).
|
||||
(Andy Postnikov)
|
||||
|
||||
- Core:
|
||||
. Fixed bug #36365 (scandir duplicates file name at every 65535th file).
|
||||
(cmb)
|
||||
. Fixed bug #49555 (Fatal error "Function must be a string" message should be
|
||||
renamed). (Nikita)
|
||||
. Fixed bug #62294 (register_shutdown_function() does not correctly handle
|
||||
exit code). (Nikita)
|
||||
. Fixed bug #62609 (Allow implementing Traversable on abstract classes).
|
||||
(Nikita)
|
||||
. Fixed bug #65274 (Enhance undefined class constant error with class name).
|
||||
(Nikita)
|
||||
. Fixed bug #65275 (Calling exit() in a shutdown function does not change the
|
||||
exit value in CLI). (Nikita)
|
||||
. Fixed bug #69084 (Unclear error message when not implementing a renamed
|
||||
abstract trait function). (Nikita)
|
||||
. Fixed bug #70839 (Converting optional argument to variadic forbidden by LSP
|
||||
checks). (Nikita)
|
||||
. Fixed bug #74558 (Can't rebind closure returned by Closure::fromCallable()).
|
||||
(cmb)
|
||||
. Fixed bug #77561 (Shebang line not stripped for non-primary script).
|
||||
(Nikita)
|
||||
. Fixed bug #77619 (Wrong reflection on MultipleIterator::__construct).
|
||||
(Fabien Villepinte)
|
||||
. Fixed bug #77966 (Cannot alias a method named "namespace"). (Nikita)
|
||||
. Fixed bug #78236 (convert error on receiving variables when duplicate [).
|
||||
(cmb)
|
||||
. Fixed bug #78770 (Incorrect callability check inside internal methods).
|
||||
(Nikita)
|
||||
. Fixed bug #79108 (Referencing argument in a function makes it a reference
|
||||
in the stack trace). (Nikita)
|
||||
. Fixed bug #79368 ("Unexpected end of file" is not an acceptable error
|
||||
message). (Alex Dowad)
|
||||
. Fixed bug #79462 (method_exists and property_exists incoherent behavior).
|
||||
(cmb)
|
||||
. Fixed bug #79467 (data:// wrappers are writable). (cmb)
|
||||
. Fixed bug #79521 (Check __set_state structure). (carusogabriel)
|
||||
. Fixed bug #79790 ("Illegal offset type" exception during AST evaluation
|
||||
not handled properly). (Nikita)
|
||||
. Fixed bug #79791 (Assertion failure when unsetting variable during binary
|
||||
op). (Nikita)
|
||||
. Fixed bug #79828 (Segfault when trying to access non-existing variable).
|
||||
(Nikita)
|
||||
. Fixed bug #79841 (Syntax error in configure / unescaped "[]" in php.m4).
|
||||
(Nikita)
|
||||
. Fixed bug #79852 (count(DOMNodeList) doesn't match
|
||||
count(IteratorIterator(DOMNodeList))). (Nikita)
|
||||
. Fixed bug #79867 (Promoted untyped properties should get null default
|
||||
value). (Nikita)
|
||||
. Fixed bug #79897 (Promoted constructor params with attribs cause crash).
|
||||
(Deus Kane)
|
||||
. Fixed bug #79927 (Generator doesn't throw exception after multiple yield
|
||||
from iterable). (Nikita)
|
||||
. Fixed bug #79946 (Build fails due to undeclared UINT32_C). (Nikita)
|
||||
. Fixed bug #79948 (Exit in auto-prepended file does not abort PHP execution).
|
||||
(Nikita)
|
||||
. Fixed bug #80045 (memleak after two set_exception_handler calls with
|
||||
__call). (Nikita)
|
||||
. Fixed bug #80096 (Segmentation fault with named arguments in nested call).
|
||||
(Nikita)
|
||||
. Fixed bug #80109 (Cannot skip arguments when extended debug is enabled).
|
||||
(Nikita)
|
||||
. Fixed bug #80225 (broken namespace usage in eval code). (Nikita)
|
||||
. Fixed bug #80258 (Windows Deduplication Enabled, randon permission errors).
|
||||
(cmb)
|
||||
. Fixed bug #80280 (ADD_EXTENSION_DEP() fails for ext/standard and ext/date).
|
||||
(cmb)
|
||||
. Fixed bug #80334 (assert() vs named parameters - confusing error). (Nikita)
|
||||
. Fixed bug #80055 (Abstract trait methods returning "self" cannot be
|
||||
fulfilled by traits). (Nikita)
|
||||
. Fixed faulty generator cleanup with yield from. (Bob)
|
||||
. Implement #[Attr] Attribute syntax as per final vote in RFC
|
||||
https://wiki.php.net/rfc/shorter_attribute_syntax_change
|
||||
. Implemented FR #47074 (phpinfo() reports "On" as 1 for the some
|
||||
extensions). (cmb)
|
||||
. Implemented FR #72089 (require() throws fatal error instead of exception).
|
||||
(Nikita)
|
||||
. Removed the pdo_odbc.db2_instance_name php.ini directive. (Kalle)
|
||||
. Use SSE2 instructions do locale independent strtolower. (Laruence)
|
||||
|
||||
- Curl:
|
||||
. Bumped required libcurl version to 7.29.0. (cmb)
|
||||
. Fixed bug #80121 (Null pointer deref if CurlHandle directly instantiated).
|
||||
(Nikita)
|
||||
|
||||
- DOM:
|
||||
. Add property DOMXPath::$registerNodeNamespaces and constructor argument
|
||||
that allow global flag to configure query() or evaluate() calls.
|
||||
. Fixed bug #79968 (DOMChildNode API crash on unattached nodes). (Benjamin)
|
||||
. Fixed bug #80268 (loadHTML() truncates at NUL bytes). (cmb)
|
||||
|
||||
- Date:
|
||||
. Fixed bug #60302 (DateTime::createFromFormat should new static(), not new
|
||||
self()). (Derick)
|
||||
. Fixed bug #65547 (Default value for sunrise/sunset zenith still wrong).
|
||||
(cmb)
|
||||
. Fixed bug #69044 (discrepancy between time and microtime). (krakjoe)
|
||||
. Fixed bug #80057 (DateTimeImmutable::createFromFormat() does not populate
|
||||
time). (Derick)
|
||||
. Implemented FR #79903 (datetime: new format "p", same as "P" but returning
|
||||
"Z" for UTC). (gharlan)
|
||||
|
||||
- Enchant:
|
||||
. Add LIBENCHANT_VERSION macro.
|
||||
. Add enchant_dict_add and enchant_dict_is_added functions.
|
||||
. Deprecate enchant_broker_set_dict_path, enchant_broker_get_dict_path,
|
||||
enchant_dict_add_to_personal and enchant_dict_is_in_session.
|
||||
. Use libenchant-2 when available.
|
||||
|
||||
- FFI:
|
||||
. Added FFI\CType::getName() method. (chopins)
|
||||
. Fixed bug #79177 (FFI doesn't handle well PHP exceptions within callback).
|
||||
(cmb, Dmitry, Nikita)
|
||||
. Fixed bug #79749 (Converting FFI instances to bool fails). (cmb)
|
||||
|
||||
- FPM:
|
||||
. Add pm.status_listen option. (Jakub Zelenka)
|
||||
|
||||
- Fileinfo:
|
||||
. Upgrade to libmagic 5.39. (Anatol)
|
||||
|
||||
- GD:
|
||||
. Added imagegetinterpolation(). (cmb)
|
||||
. Fixed bug #55005 (imagepolygon num_points requirement). (cmb)
|
||||
. Made the $num_points parameter of php_imagepolygon optional. (cmb)
|
||||
. Removed deprecated image2wbmp(). (cmb)
|
||||
. Removed deprecated png2wbmp() and jpeg2wbmp(). (cmb)
|
||||
. Replaced gd resources with objects. (Mark Randall)
|
||||
|
||||
- IMAP:
|
||||
. Fixed bug #64076 (imap_sort() does not return FALSE on failure). (cmb)
|
||||
. Fixed bug #76618 (segfault on imap_reopen). (girgias)
|
||||
. Fixed bug #80213 (imap_mail_compose() segfaults on certain $bodies). (cmb)
|
||||
. Fixed bug #80215 (imap_mail_compose() may modify by-val parameters). (cmb)
|
||||
. Fixed bug #80216 (imap_mail_compose() does not validate types/encodings).
|
||||
(cmb)
|
||||
. Fixed bug #80220 (imap_mail_compose() may leak memory). (cmb)
|
||||
. Fixed bug #80223 (imap_mail_compose() leaks envelope on malformed bodies).
|
||||
(cmb)
|
||||
. Fixed bug #80226 (imap_sort() leaks sortpgm memory). (cmb)
|
||||
. Fixed bug #80239 (imap_rfc822_write_address() leaks memory). (cmb)
|
||||
. Fixed bug #80242 (imap_mail_compose() segfaults for multipart with rfc822).
|
||||
(cmb)
|
||||
. Fixed minor regression caused by fixing bug #80220. (cmb)
|
||||
|
||||
- Iconv:
|
||||
. Dropped support for iconv without proper errno setting. (cmb)
|
||||
|
||||
- Intl:
|
||||
. Removed deprecated INTL_IDNA_VARIANT_2003. (cmb)
|
||||
|
||||
- JIT:
|
||||
. Fixed bug #77857 (Wrong result if executed with JIT). (Laruence)
|
||||
. Fixed bug #79255 (PHP cannot be compiled with enable JIT).
|
||||
(Laruence, Dmitry)
|
||||
. Fixed bug #79582 (Crash seen when opcache.jit=1235 and
|
||||
opcache.jit_debug=2). (Laruence)
|
||||
. Fixed bug #79743 (Fatal error when assigning to array property
|
||||
with JIT enabled). (Laruence)
|
||||
. Fixed bug #79864 (JIT segfault in Symfony OptionsResolver). (Dmitry)
|
||||
. Fixed bug #79888 (Incorrect execution with JIT enabled). (Dmitry)
|
||||
|
||||
- JSON:
|
||||
. The JSON extension is now an integral part of PHP and cannot be disabled
|
||||
as per RFC: https://wiki.php.net/rfc/always_enable_json (tandre)
|
||||
|
||||
- LDAP:
|
||||
. Fixed memory leaks. (ptomulik)
|
||||
. Removed deprecated ldap_sort. (mcmic)
|
||||
|
||||
- MBString:
|
||||
. Fixed bug #76999 (mb_regex_set_options() return current options). (cmb)
|
||||
. Removed the unused $is_hex parameter from mb_decode_numericentity(). (cmb)
|
||||
|
||||
- MySQLi:
|
||||
. Fixed bug #76809 (SSL settings aren't respected when persistent connections
|
||||
are used). (fabiomsouto)
|
||||
|
||||
- Mysqlnd:
|
||||
. Fixed #60594 (mysqlnd exposes 160 lines of stats in phpinfo). (PeeHaa)
|
||||
|
||||
- OCI8:
|
||||
. Deprecated old OCI8 function aliases. (Jens de Nies)
|
||||
. Modernized oci_register_taf_callback() callable argument parsing
|
||||
implementation. (girgias)
|
||||
. Removed obsolete no-op function oci_internal_debug(). (Jens de Nies)
|
||||
|
||||
- ODBC:
|
||||
. Fixed bug #22986 (odbc_connect() may reuse persistent connection). (cmb)
|
||||
. Fixed bug #44618 (Fetching may rely on uninitialized data). (cmb)
|
||||
|
||||
- Opcache:
|
||||
. Fixed bug #76535 (Opcache does not replay compile-time warnings). (Nikita)
|
||||
. Fixed bug #78654 (Incorrectly computed opcache checksum on files with
|
||||
non-ascii characters). (mhagstrand)
|
||||
. Fixed bug #79665 (ini_get() and opcache_get_configuration() inconsistency).
|
||||
(cmb)
|
||||
. Fixed bug #80030 (Optimizer segfault with isset on static property with
|
||||
undef dynamic class name). (Nikita)
|
||||
. Fixed bug #80175 (PHP8 RC1 - JIT Buffer not working). (cmb)
|
||||
. Fixed bug #80184 (Complex expression in while / if statements resolves to
|
||||
false incorrectly). (Nikita)
|
||||
. Fixed bug #80255 (Opcache bug (bad condition result) in 8.0.0rc1). (Nikita)
|
||||
. Fixed run-time binding of preloaded dynamically declared function. (Dmitry)
|
||||
|
||||
- OpenSSL:
|
||||
. Added Cryptographic Message Syntax (CMS) support. (Eliot Lear)
|
||||
|
||||
- PCRE:
|
||||
. Don't ignore invalid escape sequences. (sjon)
|
||||
. Updated to PCRE2 10.35. (cmb)
|
||||
|
||||
- PDO:
|
||||
. Fixed bug #40913 (PDO_MYSQL: PDO::PARAM_LOB does not bind to a stream for
|
||||
fetching a BLOB). (Nikita)
|
||||
. Changed default PDO error mode to exceptions. (AllenJB)
|
||||
. Fixed bug #77849 (Disable cloning of PDO handle/connection objects).
|
||||
(camporter)
|
||||
|
||||
. PDO SQLite:
|
||||
. Fixed bug #38334 (Proper data-type support for PDO_SQLITE). (Nikita)
|
||||
- PDO_Firebird:
|
||||
. Fixed bug #64937 (Firebird PDO preprocessing sql). (Simonov Denis)
|
||||
|
||||
- PSpell:
|
||||
. Convert resource<pspell> to object \PSpell. (Sara)
|
||||
. Convert resource<pspell config> to object \PSpellConfig. (Sara)
|
||||
- PDO_OCI:
|
||||
. Added support for setting and getting the oracle OCI 18c call timeout.
|
||||
(camporter)
|
||||
|
||||
<<< NOTE: Insert NEWS from last stable release here prior to actual release! >>>
|
||||
- PDO_PGSQL:
|
||||
. Bumped required libpq version to 9.1. (cmb)
|
||||
|
||||
- PGSQL:
|
||||
. Bumped required libpq version to 9.1. (cmb)
|
||||
|
||||
- Phpdbg:
|
||||
. Fixed bug #76596 (phpdbg support for display_errors=stderr). (kabel)
|
||||
. Fixed bug #76801 (too many open files). (alekitto)
|
||||
. Fixed bug #77800 (phpdbg segfaults on listing some conditional breakpoints).
|
||||
(krakjoe)
|
||||
. Fixed bug #77805 (phpdbg build fails when readline is shared). (krakjoe)
|
||||
|
||||
- Reflection:
|
||||
. Fixed bug #64592 (ReflectionClass::getMethods() returns methods out of
|
||||
scope). (Nikita)
|
||||
. Fixed bug #69180 (Reflection does not honor trait conflict resolution /
|
||||
method aliasing). (Nikita)
|
||||
. Fixed bug #74939 (Nested traits' aliased methods are lowercased). (Nikita)
|
||||
. Fixed bug #77325 (ReflectionClassConstant::$class returns wrong class when
|
||||
extending). (Nikita)
|
||||
. Fixed bug #78697 (ReflectionClass::implementsInterface - inaccurate error
|
||||
message with traits). (villfa)
|
||||
. Fixed bug #80190 (ReflectionMethod::getReturnType() does not handle static
|
||||
as part of union type). (Nikita)
|
||||
. Fixed bug #80299 (ReflectionFunction->invokeArgs confused in arguments).
|
||||
(Nikita)
|
||||
. Fixed bug #80370 (getAttributes segfault on dynamic properties). (Benjamin
|
||||
Eberlei)
|
||||
. Implement #79628 (Add $filter parameter for ReflectionClass::getConstants
|
||||
and ReflectionClass::getReflectionConstants) (carusogabriel)
|
||||
. Implement ReflectionProperty::hasDefaultValue and
|
||||
Reflection::getDefaultValue (beberlei)
|
||||
|
||||
- SNMP:
|
||||
. Fixed bug #70461 (disable md5 code when it is not supported in net-snmp).
|
||||
(Alexander Bergmann, cmb)
|
||||
|
||||
- SPL:
|
||||
. Fixed bug #65006 (spl_autoload_register fails with multiple callables using
|
||||
self, same method). (Nikita)
|
||||
. Fixed bug #65387 (Circular references in SPL iterators are not garbage
|
||||
collected). (Nikita)
|
||||
. Fixed bug #71236 (Second call of spl_autoload_register() does nothing if it
|
||||
has no arguments). (Nikita)
|
||||
. Fixed bug #79987 (Memory leak in SplFileInfo because of missing
|
||||
zend_restore_error_handling()). (Dmitry)
|
||||
. SplFixedArray is now IteratorAggregate rather than Iterator. (alexdowad)
|
||||
|
||||
- SQLite3:
|
||||
. Added SQLite3::setAuthorizer() and respective class constants. (bohwaz)
|
||||
|
||||
- Session:
|
||||
. Fixed bug #73529 (session_decode() silently fails on wrong input). (cmb)
|
||||
. Fixed bug #78624 (session_gc return value for user defined session
|
||||
handlers). (bshaffer)
|
||||
|
||||
- Shmop:
|
||||
. Converted shmop resources to objects. (cmb)
|
||||
|
||||
- SimpleXML:
|
||||
. Fixed bug #63575 (Root elements are not properly cloned). (cmb)
|
||||
. Fixed bug #75245 (Don't set content of elements with only whitespaces).
|
||||
(eriklundin)
|
||||
|
||||
- Sodium:
|
||||
. Fixed bug #77646 (sign_detached() strings not terminated). (Frank)
|
||||
|
||||
- Standard:
|
||||
. Don't force rebuild of symbol table, when populating $http_response_header
|
||||
variable by the HTTP stream wrapper. (Dmitry)
|
||||
. Fixed bug #47983 (mixed LF and CRLF line endings in mail()). (cmb)
|
||||
. Fixed bug #64060 (lstat_stat_variation7.phpt fails on certain file systems).
|
||||
(M. Voelker, cmb)
|
||||
. Fixed bug #75902 (str_replace should warn when misused with nested arrays).
|
||||
(Nikita)
|
||||
. Fixed bug #76859 (stream_get_line skips data if used with data-generating
|
||||
filter). (kkopachev)
|
||||
. Fixed bug #77204 (getimagesize(): Read error! should mention file path).
|
||||
(peter279k)
|
||||
. Fixed bug #78385 (parse_url() does not include 'query' when question mark
|
||||
is the last char). (Islam Israfilov)
|
||||
. Fixed bug #79868 (Sorting with array_unique gives unwanted result). (Nikita)
|
||||
. Fixed bug #80256 (file_get_contents strip first line with chunked encoding
|
||||
redirect). (Nikita)
|
||||
. Fixed bug #80266 (parse_url silently drops port number 0). (cmb, Nikita)
|
||||
. Fixed bug #80290 (Double free when ASSERT_CALLBACK is used with a dynamic
|
||||
message). (Nikita)
|
||||
. Implemented FR #78638 (__PHP_Incomplete_Class should be final). (Laruence)
|
||||
. Made quoting of cmd execution functions consistent. (cmb)
|
||||
|
||||
- Tidy:
|
||||
. Removed the unused $use_include_path parameter from tidy_repair_string().
|
||||
(cmb)
|
||||
|
||||
- Tokenizer:
|
||||
. Fixed bug #80328 (PhpToken::getAll() confusing name). (Nikita)
|
||||
|
||||
- XML:
|
||||
. Fixed bug #76874 (xml_parser_free() should never leak memory). (Nikita)
|
||||
|
||||
- XMLWriter:
|
||||
. Changed functions to accept/return XMLWriter objects instead of resources.
|
||||
(cmb)
|
||||
. Implemented FR #79344 (xmlwriter_write_attribute_ns: $prefix should be
|
||||
nullable). (cmb)
|
||||
. Removed return types from XMLWriter stubs. (cmb)
|
||||
|
||||
- Zip:
|
||||
. Add "flags" options to ZipArchive::addGlob and addPattern methods
|
||||
keeping previous behavior having FL_OVERWRITE by default. (Remi)
|
||||
. Add ZipArchive::EM_UNKNOWN and ZipArchive::EM_TRAD_PKWARE constants. (Remi)
|
||||
. Add ZipArchive::isCompressionMethodSupported() and
|
||||
ZipArchive::isEncryptionMethodSupported() method (libzip 1.7.0). (Remi)
|
||||
. Add ZipArchive::replaceFile() method. (Remi)
|
||||
. Add ZipArchive::setCancelCallback method (since libzip 1.6.0). (Remi)
|
||||
. Add ZipArchive::setMtimeName and ZipArchive::setMtimeIndex methods. (Remi)
|
||||
. Add ZipArchive::setProgressCallback method (since libzip 1.3.0). (Remi)
|
||||
. Add lastId property to ZipArchive. (Remi)
|
||||
. Add optional "flags" parameter to ZipArchive::addEmptyDir, addFile and
|
||||
addFromString methods. (Remi)
|
||||
. Fixed bug #50678 (files extracted by ZipArchive class lost their
|
||||
original modified time). (Remi)
|
||||
. Fixed bug #72374 (remove_path strips first char of filename). (tyage, Remi)
|
||||
. Implemented FR #77960 (add compression / encryption options for
|
||||
ZipArchive::addGlob and ZipArchive::addPattern). (Remi)
|
||||
. ZipArchive::status and ZipArchive::statusSys properties and
|
||||
ZipArchive::getStatusString() method stay valid after the archive
|
||||
is closed. (Remi)
|
||||
|
||||
- Zlib:
|
||||
. Fixed bug #71417 (fread() does not report zlib.inflate errors). (cmb)
|
||||
. Fixed bug #78792 (zlib.output_compression disabled by Content-Type: image/).
|
||||
(cmb)
|
||||
@@ -40,17 +40,12 @@ For other systems, see the [installation chapter](https://php.net/install).
|
||||
*For Windows, see [Build your own PHP on Windows](https://wiki.php.net/internals/windows/stepbystepbuild_sdk_2).*
|
||||
|
||||
For a minimal PHP build from Git, you will need autoconf, bison, and re2c. For
|
||||
a default build, you will additionally need libxml2 and libsqlite3.
|
||||
|
||||
On Ubuntu, you can install these using:
|
||||
a default build, you will additionally need libxml2 and libsqlite3. On Ubuntu,
|
||||
you can install these using:
|
||||
|
||||
sudo apt install -y pkg-config build-essential autoconf bison re2c \
|
||||
libxml2-dev libsqlite3-dev
|
||||
|
||||
On Fedora, you can install these using:
|
||||
|
||||
sudo dnf install re2c bison autoconf make libtool ccache libxml2-devel sqlite-devel
|
||||
|
||||
Generate configure:
|
||||
|
||||
./buildconf
|
||||
|
||||
+2
-2
@@ -729,13 +729,13 @@ TSRM_API size_t tsrm_get_ls_cache_tcb_offset(void)
|
||||
#if defined(__APPLE__) && defined(__x86_64__)
|
||||
// TODO: Implement support for fast JIT ZTS code ???
|
||||
return 0;
|
||||
#elif defined(__x86_64__) && defined(__GNUC__)
|
||||
#elif defined(__x86_64__) && defined(__GNUC__) && !defined(__FreeBSD__)
|
||||
size_t ret;
|
||||
|
||||
asm ("movq _tsrm_ls_cache@gottpoff(%%rip),%0"
|
||||
: "=r" (ret));
|
||||
return ret;
|
||||
#elif defined(__i386__) && defined(__GNUC__)
|
||||
#elif defined(__i386__) && defined(__GNUC__) && !defined(__FreeBSD__)
|
||||
size_t ret;
|
||||
|
||||
asm ("leal _tsrm_ls_cache@ntpoff,%0"
|
||||
|
||||
+1
-1
@@ -147,7 +147,7 @@ TSRM_API const char *tsrm_api_name(void);
|
||||
# define __has_attribute(x) 0
|
||||
#endif
|
||||
|
||||
#if !__has_attribute(tls_model)
|
||||
#if !__has_attribute(tls_model) || defined(__FreeBSD__)
|
||||
# define TSRM_TLS_MODEL_ATTR
|
||||
#elif __PIC__
|
||||
# define TSRM_TLS_MODEL_ATTR __attribute__((tls_model("initial-exec")))
|
||||
|
||||
+442
-44
@@ -1,63 +1,461 @@
|
||||
PHP 8.1 INTERNALS UPGRADE NOTES
|
||||
PHP 8.0 INTERNALS UPGRADE NOTES
|
||||
|
||||
1. Internal API changes
|
||||
a. Object Handlers API
|
||||
b. ZEND_OVERLOADED_FUNCTION and corresponding call_method() object handler
|
||||
c. TSRM changes
|
||||
d. get() and set() object handlers
|
||||
e. zend_parse_parameters 'L' specifier
|
||||
f. Arginfo argument types
|
||||
g. zend_free_op type and should_free argument of zend_get_zval_ptr()
|
||||
h. zend_value_error()
|
||||
i. get_closure() object handler
|
||||
j. compare_objects() and compare() object handlers
|
||||
k. The 'I' length modifier
|
||||
l. Some VM instructions switched to IS_TMP_VAR result instead of IS_VAR
|
||||
m. All internal functions must have arginfo
|
||||
n. zend_hash_sort compare function and zend_hash_sort signature change
|
||||
o. cast_object() object handler is now required
|
||||
p. ARG_COUNT() macro removed
|
||||
q. GC_COLLECTABLE flag
|
||||
r. Cannot implement Traversable only
|
||||
s. zend_fcall_info no_separation flag removed
|
||||
t. Signature changes
|
||||
u. Error Notification callbacks to replace zend_error_cb overwrite use-cases
|
||||
v. Removed Zend APIs
|
||||
w. Renamed Zend APIs
|
||||
x. ZEND_EXT_NOP no longer emitted
|
||||
|
||||
2. Build system changes
|
||||
a. Abstract
|
||||
b. Unix build system changes
|
||||
c. Windows build system changes
|
||||
|
||||
3. Module changes
|
||||
a. ext/hash
|
||||
|
||||
========================
|
||||
1. Internal API changes
|
||||
========================
|
||||
|
||||
a. The Object Handlers API was changed to receive zend_object* instead of
|
||||
zval* and zend_string* instead of zval* for property names. See also
|
||||
section t for other similar changes.
|
||||
|
||||
b. ZEND_OVERLOADED_FUNCTION and corresponding call_method() object handler
|
||||
were removed. ZEND_INTERNAL_FUNCTION with ZEND_ACC_CALL_VIA_HANDLER and
|
||||
defined "handler" callback should be used instead. This "handler" callback
|
||||
should also take care about function cleanup. See ext/zend_test/test.c
|
||||
for example.
|
||||
|
||||
c. The following things have been removed from TSRM:
|
||||
- TSRMLS_DC
|
||||
- TSRMLS_D
|
||||
- TSRMLS_CC
|
||||
- TSRMLS_C
|
||||
- TSRMLS_FETCH
|
||||
- TSRMLS_FETCH_FROM_CTX
|
||||
- TSRMLS_SET_CTX
|
||||
- tsrm_new_interpreter_context
|
||||
- tsrm_set_interpreter_context
|
||||
- tsrm_free_interpreter_context
|
||||
- support for GNUPTH, SGI ST, and BETHREADS
|
||||
|
||||
d. The get() and set() object handlers have been removed. The get() handler
|
||||
can generally be replaced with cast_object(). Some uses of set() may be
|
||||
replaced by do_operation(). If set() was used to overload direct
|
||||
assignments using "=", then this is no longer supported and the
|
||||
functionality should be provided in some other way (for example, as
|
||||
modification of an object property).
|
||||
|
||||
e. The zend_parse_parameters 'L' specifier and the Z_PARAM_STRICT_LONG()
|
||||
family of macros have been removed. Use 'l' and Z_PARAM_LONG() instead,
|
||||
which, despite the confusing name, actually have stricter input validation.
|
||||
|
||||
f. Arginfo argument types for internal functions are no longer checked.
|
||||
Instead type checks should be performed using the zend_parse_parameters()
|
||||
or ZEND_PARSE_PARAMETERS_*() APIs.
|
||||
|
||||
g. The zend_free_op type and the "should_free" and "type" arguments of
|
||||
zend_get_zval_ptr() were removed. It's possible to get the old
|
||||
"should_free" value using the following code:
|
||||
|
||||
zval *ret = zend_get_zval_ptr(
|
||||
opline, opline->op1_type, &opline->op1, execute_data);
|
||||
zval *should_free = (op_type & (IS_TMP_VAR|IS_VAR)) ? ret : NULL;
|
||||
|
||||
h. Added the zend_value_error() function, which is intended to be used
|
||||
to raise ValueError when inappropriate argument values are passed
|
||||
to functions.
|
||||
|
||||
i. get_closure() object handlers now accept an additional zend_bool parameter
|
||||
`check_only`. If it is true, the handler is called to check whether the
|
||||
object is callable; in this case the handler should not throw an exception.
|
||||
|
||||
j. compare_objects() handler was removed. Extensions should use compare() object
|
||||
handler instead and check if both arguments are objects and have the same
|
||||
compare handler, using ZEND_COMPARE_OBJECTS_FALLBACK() macro.
|
||||
|
||||
k. The 'I' length modifier, used to denote 32 and 64bit integer from the custom
|
||||
snprintf and spprintf implementations has been removed.
|
||||
Use the ZEND_LONG_FMT, ZEND_ULONG_FMT and ZEND_XLONG_FMT macros defined in
|
||||
php-src/Zend/zend_long.h
|
||||
|
||||
The 'v' format from the custom snprintf and spprintf implementations has
|
||||
been removed. Use the standard 's' format instead.
|
||||
|
||||
l. Some VM instructions switched to IS_TMP_VAR result instead of IS_VAR.
|
||||
Actually, all assignments (ZEND_ASSIGN, ZEND_ASSIGN_DIM, ZEND_ASSIGN_OBJ,
|
||||
ZEND_ASSIGN_STATIC_PROP), all compound assignments (ZEND_ASSIGN_OP,
|
||||
ZEND_ASSIGN_DIM_OP, ZEND_ASSIGN_OBJ_OP, ZEND_ASSIGN_STATIC_PROP_OP) and all
|
||||
pre increments/decrements (ZEND_PRE_INC, ZEND_PRE_DEC, ZEND_PRE_INC_OBJ
|
||||
ZEND_PRE_DEC_OBJ, ZEND_PRE_INC_STATIC_PROP ZEND_PRE_DEC_STATIC_PROP).
|
||||
|
||||
m. All internal functions and methods are now required to specify arginfo
|
||||
information, otherwise warnings will be thrown on startup.
|
||||
|
||||
n. The zend_hash_sort and zend_hash_minmax APIs now accept a comparison
|
||||
function with the following signature:
|
||||
|
||||
typedef int (*bucket_compare_func_t)(Bucket *a, Bucket *b);
|
||||
|
||||
Previously compare_func_t was used, which accepted void pointers.
|
||||
Furthermore, the return type of zend_hash_sort and zend_ts_hash_sort has
|
||||
been changed from int to void; these functions always succeed.
|
||||
|
||||
o. The cast_object() handler is now required, i.e. must be non-null. You can
|
||||
indicate that casting is not supported by always returning FAILURE.
|
||||
|
||||
p. The ARG_COUNT() macro has been removed use ZEND_NUM_ARGS() instead.
|
||||
|
||||
q. GC_COLLECTABLE flag was inverted into GC_NOT_COLLECTABLE.
|
||||
Assignments to GC_TYPE_INFO() might need to be changed to properly
|
||||
set the value of the GC_NOT_COLLECTABLE flag.
|
||||
|
||||
r. Just for for userland classes, it is no longer allowed to implement only
|
||||
the Traversable interface. Instead, it is necessary to implement either
|
||||
Iterator or IteratorAggregate. You can do the latter by implementing
|
||||
zend_ce_aggregate and providing the following method implementation:
|
||||
|
||||
ZEND_METHOD(MyClass, getIterator) {
|
||||
ZEND_PARSE_PARAMETERS_NONE();
|
||||
zend_create_internal_iterator_zval(return_value, ZEND_THIS);
|
||||
}
|
||||
|
||||
s. The zend_fcall_info no_separation flag has been removed, and separation is
|
||||
never allowed. If you wish to pass (or allow passing) arguments by
|
||||
reference, explicitly create those arguments as references using
|
||||
ZEND_MAKE_REF. This removal also affects call_user_function_ex(), which
|
||||
should be replaced by call_user_function().
|
||||
|
||||
t. The following ZEND_API function have changed signature:
|
||||
1. Void in Zend Engine 4.0:
|
||||
- add_assoc_*()
|
||||
- add_index_*()
|
||||
- add_property_*()
|
||||
- object_init()
|
||||
- zend_declare_class_constant*()
|
||||
- zend_declare_property*()
|
||||
- zend_startup_modules()
|
||||
- zend_wrong_parameters_none_error()
|
||||
- zend_fcall_info_argp()
|
||||
- zend_fcall_info_argv()
|
||||
- zend_fcall_info_argn()
|
||||
- zend_startup()
|
||||
- zend_set_memory_limit()
|
||||
- pass_two()
|
||||
- zend_startup_constants()
|
||||
- zend_shutdown_constants()
|
||||
- zend_startup_extensions_mechanism()
|
||||
- zend_startup_extensions()
|
||||
- zend_register_extension()
|
||||
- highlight_string()
|
||||
- zend_ini_startup()
|
||||
- zend_ini_shutdown()
|
||||
- zend_ini_global_shutdown()
|
||||
- zend_ini_deactivate()
|
||||
- zend_copy_ini_directives()
|
||||
- zend_prepare_string_for_scanning()
|
||||
- zend_init_rsrc_list()
|
||||
- zend_list_close()
|
||||
- zend_signal()
|
||||
- zend_sigaction()
|
||||
- zend_stack_init()
|
||||
- zend_stack_del_top()
|
||||
- zend_stack_destroy()
|
||||
2. Argument int to uint32_t in Zend Engine 4.0:
|
||||
- _zend_get_parameters_array_ex()
|
||||
- zend_copy_parameters_array()
|
||||
- zend_fcall_info_args_save()
|
||||
- zend_fcall_info_args_restore()
|
||||
- zend_fcall_info_argp()
|
||||
- zend_fcall_info_argv()
|
||||
- zend_fcall_info_argn()
|
||||
- zend_wrong_parameter*()
|
||||
- zend_wrong_callback_error()
|
||||
- zend_parse_arg_class()
|
||||
3. Argument int to bool in Zend Engine 4.0:
|
||||
- add_next_index_bool()
|
||||
- zend_register_class_alias_ex()
|
||||
- add_assoc_bool_ex()
|
||||
- add_index_bool()
|
||||
- zend_fcall_info_args_clear()
|
||||
- zend_set_local_var()
|
||||
- zend_set_local_var_str()
|
||||
- zend_parse_arg_*()
|
||||
- shutdown_memory_manager()
|
||||
- zend_memory_usage()
|
||||
- zend_memory_peak_usage()
|
||||
- zend_mm_shutdown()
|
||||
- zend_eval_string*()
|
||||
- zend_set_timeout()
|
||||
- _zend_hash_append_ex()
|
||||
- _zend_hash_append_ptr_ex()
|
||||
- zend_alter_ini_entry_ex()
|
||||
- (*zend_encoding_list_parser) typedef
|
||||
- zend_multibyte_parse_encoding_list()
|
||||
- zend_safe_address()
|
||||
- zend_string_tolower_ex()
|
||||
- zend_string_alloc()
|
||||
- zend_string_safe_alloc()
|
||||
- zend_string_init()
|
||||
- zend_string_dup()
|
||||
- zend_string_realloc()
|
||||
- zend_string_extend()
|
||||
- zend_string_truncate()
|
||||
- zend_string_safe_realloc()
|
||||
- zend_string_release_ex()
|
||||
- zend_ts_hash_merge()
|
||||
- zend_ts_hash_sort()
|
||||
4. Argument int to size_t in Zend Engine 4.0:
|
||||
- zend_set_hash_symbol()
|
||||
5. Argument zval* to zend_object* in Zend Engine 4.0:
|
||||
- zend_read_property()
|
||||
- zend_update_property()
|
||||
- zend_unset_property()
|
||||
- zend_call_method()
|
||||
- zend_objects_clone_obj()
|
||||
- zend_get_closure_method_def()
|
||||
- zend_throw_exception_hook()
|
||||
- zend_throw_exception_internal()
|
||||
- zend_get_exception_base()
|
||||
6. Argument zval* to zend_long in Zend Engine 4.0:
|
||||
- _php_math_longtobase()
|
||||
7. Return type from int to zend_result in Zend Engine 4.0:
|
||||
- (*stream_open_function) in _zend_utility_functions
|
||||
- (*zend_post_startup_cb)
|
||||
- (*zend_preload_autoload)
|
||||
- zend_execute_scripts()
|
||||
- zend_post_startup()
|
||||
- _zend_get_parameters_array_ex()
|
||||
- zend_copy_parameters_array()
|
||||
- zend_parse_parameters()
|
||||
- zend_parse_parameters_ex()
|
||||
- zend_parse_method_parameters()
|
||||
- zend_parse_method_parameters_ex()
|
||||
- zend_parse_method_parameters()
|
||||
- zend_register_functions()
|
||||
- zend_startup_module()
|
||||
- zend_startup_module_ex()
|
||||
- zend_register_class_alias_ex()
|
||||
- zend_disable_function()
|
||||
- zend_disable_class()
|
||||
- zend_update_class_constants()
|
||||
- zend_update_static_property*()
|
||||
- object_init_ex()
|
||||
- object_and_properties_init()
|
||||
- add_index_zval()
|
||||
- add_next_index_long_*()
|
||||
- array_set_zval_key()
|
||||
- _call_user_function_impl()
|
||||
- zend_fcall_info_*()
|
||||
- zend_call_function()
|
||||
- zend_set_hash_symbol()
|
||||
- zend_delete_global_variable()
|
||||
- zend_set_local_var()
|
||||
- zend_set_local_var_str()
|
||||
- zend_forbid_dynamic_call()
|
||||
- zend_get_default_from_internal_arg_info()
|
||||
- zend_try_assign_typed_ref*()
|
||||
- zend_ast_evaluate()
|
||||
- zend_startup_builtin_functions()
|
||||
- do_bind_function()
|
||||
- do_bind_class()
|
||||
- zend_unmangle_property_name_ex()
|
||||
- zend_register_auto_global()
|
||||
- zend_register_constant()
|
||||
- zend_exception_error()
|
||||
- zend_eval_string*()
|
||||
- zend_undefined_offset_write()
|
||||
- zend_undefined_index_write()
|
||||
- zval_update_constant(_ex)()
|
||||
- zend_load_extension()
|
||||
- zend_load_extension_handle()
|
||||
- zend_hash_del(_ind)()
|
||||
- zend_hash_str_del(_ind)()
|
||||
- zend_hash_index_del()
|
||||
- zend_hash_move_forward_ex()
|
||||
- zend_hash_move_backward_ex()
|
||||
- zend_hash_get_current_key_ex()
|
||||
- zend_hash_get_current_key_type_ex()
|
||||
- zend_symtable_del(_ind)()
|
||||
- zend_symtable_str_del(_ind)()
|
||||
- highlight_file()
|
||||
- zend_do_link_class()
|
||||
- zend_alter_ini_entry*()
|
||||
- zend_restore_ini_entry()
|
||||
- zend_ini_register_displayer()
|
||||
- zend_ini_open_file_for_scanning()
|
||||
- zend_ini_prepare_string_for_scanning()
|
||||
- zend_user_it_valid()
|
||||
- zend_create_internal_iterator_zval()
|
||||
- zend_multibyte_set_filter()
|
||||
- zend_lex_tstring()
|
||||
- _zend_module_entry module_startup_func, module_shutdown_func,
|
||||
request_startup_func, request_shutdown_func, and post_deactivate_func function pointers
|
||||
- (*zend_encoding_list_parser) typedef
|
||||
- (*zend_encoding_internal_encoding_setter) typedef
|
||||
- zend_multibyte_set_functions()
|
||||
- zend_multibyte_set_script_encoding_by_string()
|
||||
- add_function()
|
||||
- sub_function()
|
||||
- mul_function()
|
||||
- pow_function()
|
||||
- div_function()
|
||||
- mod_function()
|
||||
- boolean_xor_function()
|
||||
- boolean_not_function()
|
||||
- bitwise_not_function()
|
||||
- bitwise_or_function()
|
||||
- bitwise_and_function()
|
||||
- bitwise_xor_function()
|
||||
- shift_left_function()
|
||||
- shift_right_function()
|
||||
- concat_function()
|
||||
- is_equal_function(
|
||||
- is_identical_function()
|
||||
- is_not_identical_function()
|
||||
- is_not_equal_function()
|
||||
- is_smaller_function()
|
||||
- is_smaller_or_equal_function(zv
|
||||
- increment_function()
|
||||
- decrement_function()
|
||||
- zend_stream_open()
|
||||
- zend_stream_fixup()
|
||||
- zend_ts_hash_del()
|
||||
- zend_ts_hash_index_del()
|
||||
8. Return type from int to bool in Zend Engine 4.0:
|
||||
- zend_make_printable_zval()
|
||||
- zend_parse_arg_*()
|
||||
- is_zend_mm()
|
||||
- is_zend_ptr()
|
||||
- zend_mm_is_custom_heap()
|
||||
- (*zend_mm_chunk_truncate_t)
|
||||
- (*zend_mm_chunk_extend_t)
|
||||
- zend_bitset_empty()
|
||||
- zend_is_smart_branch()
|
||||
- zend_check_arg_send_type()
|
||||
- zend_verify_const_access()
|
||||
- zend_gdb_register_code()
|
||||
- zend_gdb_present()
|
||||
- _zend_handle_numeric_str(_ex)()
|
||||
- zend_hash_exists_ind()
|
||||
- zend_hash_str_exists_ind()
|
||||
- zend_symtable_exists(_ind)()
|
||||
- zend_symtable_str_exists()
|
||||
- (*zend_encoding_lexer_compatibility_checker)
|
||||
- zend_object_is_true()
|
||||
- i_zend_is_true()
|
||||
- zendi_smart_streq()
|
||||
- zend_stack_is_empty()
|
||||
- zend_ts_hash_exists()
|
||||
- zend_ts_hash_index_exists()
|
||||
9. Argument void to const char* in Zend Engine 4.0:
|
||||
- zend_get_op_array_extension_handle()
|
||||
10. Argument zend_extension to const char* in Zend Engine 4.0:
|
||||
- zend_get_resource_handle()
|
||||
11. Argument const char * to HMODULE in Zend Engine 4.0:
|
||||
- php_win32_image_compatible()
|
||||
12. const char * argument dropped in Zend Engine 4.0:
|
||||
- php_win32_crt_compatible()
|
||||
|
||||
u. Instead of overwriting zend_error_cb extensions with debugging, monitoring
|
||||
use-cases catching Errors/Exceptions are strongly encouraged to use
|
||||
the new error observer API instead.
|
||||
|
||||
Error observering callbacks are guaranteed to be called regardless of
|
||||
the users error_reporting setting or userland error handler return values.
|
||||
|
||||
Register observer callbacks during MINIT of an extension:
|
||||
|
||||
void my_error_observer_cb(int type,
|
||||
const char *error_filename,
|
||||
uint32_t error_lineno,
|
||||
zend_string *message) {
|
||||
}
|
||||
zend_observer_error_register(my_error_observer_cb);
|
||||
|
||||
v. The following APIs have been removed from the Zend Engine:
|
||||
- zend_ts_hash_init_ex(), drop the last argument and use zend_ts_hash_init() instead
|
||||
- zend_hash_init_ex(), drop the last argument and use zend_hash_init() instead
|
||||
- zval_internal_dtor(), use zval_internal_ptr_dtor() instead
|
||||
- zval_dtor_func(), use rc_dtor_func() instead
|
||||
- zval_ptr_dtor_wrapper(), use zval_ptr_dtor() instead
|
||||
- zval_internal_ptr_dtor_wrapper(), use zval_internal_ptr_dtor() instead
|
||||
|
||||
w. The following APIs have been renamed:
|
||||
- _zend_ts_hash_init() to zend_ts_hash_init()
|
||||
|
||||
x. In COMPILE_EXTENDED_STMT mode, a ZEND_EXT_NOP opcode will no longer be
|
||||
generated at the start of a function. Use the new observer APIs or hook
|
||||
into zend_execute_ex instead.
|
||||
|
||||
========================
|
||||
2. Build system changes
|
||||
========================
|
||||
|
||||
a. Abstract
|
||||
1. Symbol HAVE_HASH_EXT is removed and is no longer defined. It should be
|
||||
considered to have hash extension always available since PHP 7.4.
|
||||
|
||||
2. Symbol HAVE_PCRE is removed and is no longer defined. It should be
|
||||
considered to have pcre extension always available since PHP 7.4.
|
||||
|
||||
3. Symbol HAVE_LOCALE_H has been removed and is no longer defined.
|
||||
|
||||
4. --disable-inline-optimization (which actually disabled all compiler
|
||||
optimizations) has been removed. If you wish to build PHP on a host
|
||||
with extremely constrained memory, and compilation fails with an "out
|
||||
of memory" message, add "-O0" to CFLAGS.
|
||||
|
||||
5. build system and provider are displayed in phpinfo from environment:
|
||||
- PHP_BUILD_SYSTEM (default is same as PHP_UNAME)
|
||||
- PHP_BUILD_PROVIDER (no default)
|
||||
|
||||
b. Unix build system changes
|
||||
|
||||
1. --enable-maintainer-zts is renamed --enable-zts for parity with Windows
|
||||
and as recognition that ZTS is not a "maintainer" or experimental
|
||||
feature.
|
||||
|
||||
2. The PHP_CHECK_GCC_ARG() m4 macro has been removed in favor of
|
||||
AX_CHECK_COMPILE_FLAG().
|
||||
|
||||
3. The 6th argument of PHP_ADD_SOURCES_X has been removed.
|
||||
|
||||
4. The 'special-flags' (3rd) argument of PHP_ADD_SOURCES_X are
|
||||
now appended instead of prepended to previous compiler flags.
|
||||
This means compiler flags passed to PHP_NEW_EXTENSION and PHP_ADD_SOURCES
|
||||
are now appended, this allows to disable compiler flags set by Zend/Zend.m4
|
||||
(e.g. disable certain compiler flags enabled by -Wextra)
|
||||
|
||||
c. Windows build system changes
|
||||
|
||||
- The configuration option --enable-crt-debug has been removed. The VC
|
||||
debug heap can now be enabled for debug builds by setting the environment
|
||||
variable PHP_WIN32_DEBUG_HEAP to a non-negative number before PHP process
|
||||
startup.
|
||||
|
||||
========================
|
||||
3. Module changes
|
||||
========================
|
||||
|
||||
a. ext/hash
|
||||
- The init signatures are extended with an additional `HashTable*`
|
||||
argument. The passed HT is to contain the algorithm specific
|
||||
configuration. If the an algorithm doesn't make use of any
|
||||
additional configuration, the argument is to be marked with
|
||||
ZEND_ATTRIBUTE_UNUSED.
|
||||
|
||||
b. ext/pdo
|
||||
- The "preparer" callback now accepts a zend_string* instead of
|
||||
char* + size_t pair the query string. Similarly, the query_string and
|
||||
active_query_string members of pdo_stmt_t are now zend_string*.
|
||||
- The way in which drivers provide results has changed: Previously,
|
||||
the "describer" callback populated the "pdo_type" member in the
|
||||
pdo_column_data structure, and the "get_col" callback then had to return
|
||||
pointers to data of appropriate type.
|
||||
|
||||
In PHP 8.1, the "describer" callback no longer determines the pdo_type
|
||||
(and this member has been removed from pdo_column_data). Instead, the
|
||||
"get_col" callback accepts a zval pointer that may be populated with a
|
||||
value of arbitrary type. This gives drivers more flexibility in
|
||||
determining result types (e.g. based on whether a specific integer fits
|
||||
the PHP integer type) and avoid awkward juggling of temporary buffers.
|
||||
|
||||
As the "describer" no longer determines pdo_type, the "get_column_meta"
|
||||
function is now responsible for providing this information for use by
|
||||
getColumnMeta(). The type provided here does not need to match the type
|
||||
returned by get_col (in fact no corresponding type might exist, e.g. for
|
||||
floats). It should be the closest logical equivalent for the column type.
|
||||
- The transaction, set_attribute, and preparer handler's return type
|
||||
has been formalized to bool instead of int.
|
||||
- The check_liveness handler's return type has been formalized to zend_return
|
||||
instead of int.
|
||||
- The closer, and fetch_error handlers have been voidified.
|
||||
- The quoter handler now returns the quoted string as zend_string* instead
|
||||
of returning a boolean, and the quoted string as a pair of out params.
|
||||
Similarly the unquoted string is now a zend_string* instead of a pair of
|
||||
char* and size_t length.
|
||||
- The doer handler now accepts a zend_string* instead of char* + size_t
|
||||
pair for the SQL statement.
|
||||
- The last_id handler now returns a zend_string* instead of returning a
|
||||
char* and the length as an out param, and accepts a zend_string* instead
|
||||
of char* for the optional sequence/table name.
|
||||
@@ -209,10 +209,6 @@ fi
|
||||
test -n "$GCC" && CFLAGS="-Wall -Wextra -Wno-strict-aliasing -Wno-implicit-fallthrough -Wno-unused-parameter -Wno-sign-compare $CFLAGS"
|
||||
dnl Check if compiler supports -Wno-clobbered (only GCC)
|
||||
AX_CHECK_COMPILE_FLAG([-Wno-clobbered], CFLAGS="-Wno-clobbered $CFLAGS", , [-Werror])
|
||||
AX_CHECK_COMPILE_FLAG([-Wduplicated-cond], CFLAGS="-Wduplicated-cond $CFLAGS", , [-Werror])
|
||||
AX_CHECK_COMPILE_FLAG([-Wlogical-op], CFLAGS="-Wlogical-op $CFLAGS", , [-Werror])
|
||||
AX_CHECK_COMPILE_FLAG([-Wformat-truncation], CFLAGS="-Wformat-truncation $CFLAGS", , [-Werror])
|
||||
AX_CHECK_COMPILE_FLAG([-fno-common], CFLAGS="-fno-common $CFLAGS", , [-Werror])
|
||||
|
||||
test -n "$DEBUG_CFLAGS" && CFLAGS="$CFLAGS $DEBUG_CFLAGS"
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
Add $GLOBALS to itself
|
||||
--FILE--
|
||||
<?php
|
||||
$GLOBALS += $GLOBALS;
|
||||
$x = $GLOBALS + $GLOBALS;
|
||||
?>
|
||||
===DONE===
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
--TEST--
|
||||
HT iterator should be destroyed if array becomes empty during array_splice
|
||||
--FILE--
|
||||
<?php
|
||||
$a=[4];
|
||||
$i = 0;
|
||||
foreach ($a as &$r) {
|
||||
var_dump($r);
|
||||
$a = array_splice($a, 0);
|
||||
if (++$i == 2) break;
|
||||
}
|
||||
?>
|
||||
--EXPECT--
|
||||
int(4)
|
||||
int(4)
|
||||
@@ -2,8 +2,8 @@
|
||||
Attribute validation callback of internal attributes.
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('zend_test')) {
|
||||
echo "skip requires zend_test extension\n";
|
||||
if (!extension_loaded('zend-test')) {
|
||||
echo "skip requires zend-test extension\n";
|
||||
}
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
@@ -8,4 +8,4 @@ class A1 { }
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Attribute::__construct(): Argument #1 ($flags) must must be of type int, string given in %s
|
||||
Fatal error: Attribute::__construct(): Argument #1 ($flags) must be of type int, string given in %s
|
||||
@@ -35,11 +35,12 @@ try {
|
||||
}
|
||||
echo $simpleString["0"] === "B"?"ok\n":"bug\n";
|
||||
try {
|
||||
/* This must not affect the string value */
|
||||
$simpleString["wrong"] = "f";
|
||||
} catch (\TypeError $e) {
|
||||
echo $e->getMessage() . \PHP_EOL;
|
||||
}
|
||||
echo $simpleString["0"] === "f"?"ok\n":"bug\n";
|
||||
echo $simpleString["0"] === "B"?"ok\n":"bug\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
bool(false)
|
||||
|
||||
@@ -58,7 +58,7 @@ Warning: Illegal string offset -1 in %s on line %d
|
||||
NULL
|
||||
string(0) ""
|
||||
Cannot access offset of type string on string
|
||||
string(1) "a"
|
||||
string(0) ""
|
||||
Error: [] operator not supported for strings
|
||||
string(0) ""
|
||||
Error: Cannot use assign-op operators with string offsets
|
||||
|
||||
@@ -39,7 +39,7 @@ string(36) "#0 [internal function]: ()
|
||||
|
||||
Array of array of NULL values:
|
||||
|
||||
Warning: Function name is not a string in %s on line %d
|
||||
Warning: File name is not a string in %s on line %d
|
||||
|
||||
Warning: Value for class is not a string in %s on line %d
|
||||
|
||||
@@ -48,5 +48,5 @@ Warning: Value for type is not a string in %s on line %d
|
||||
Warning: Value for function is not a string in %s on line %d
|
||||
|
||||
Warning: args element is not an array in %s on line %d
|
||||
string(60) "#0 [unknown function][unknown][unknown][unknown]()
|
||||
string(58) "#0 [unknown file]: [unknown][unknown][unknown]()
|
||||
#1 {main}"
|
||||
@@ -0,0 +1,15 @@
|
||||
--TEST--
|
||||
Bug #71539.5 (Memory error on $arr[$a] =& $arr[$b] if RHS rehashes)
|
||||
--FILE--
|
||||
<?php
|
||||
$name = 'a';
|
||||
for ($i = 0; $i < 100000; $i++) {
|
||||
if ($name != 'i') {
|
||||
$$name =& $GLOBALS;
|
||||
}
|
||||
$name++;
|
||||
}
|
||||
?>
|
||||
OK
|
||||
--EXPECT--
|
||||
OK
|
||||
@@ -0,0 +1,17 @@
|
||||
--TEST--
|
||||
Bug #71695 (Global variables are reserved before execution)
|
||||
--FILE--
|
||||
<?php
|
||||
function provideGlobals() {
|
||||
var_dump(array_key_exists("foo", $GLOBALS));
|
||||
var_dump(isset($GLOBALS["foo"]));
|
||||
$GLOBALS += array("foo" => "foo");
|
||||
}
|
||||
|
||||
provideGlobals();
|
||||
echo $foo;
|
||||
?>
|
||||
--EXPECT--
|
||||
bool(false)
|
||||
bool(false)
|
||||
foo
|
||||
@@ -1,7 +1,7 @@
|
||||
--TEST--
|
||||
Bug #78239: Deprecation notice during string conversion converted to exception hangs
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("zend_test")) die("skip requires zend_test extension"); ?>
|
||||
<?php if (!extension_loaded("zend-test")) die("skip requires zend-test extension"); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
function handleError($level, $message, $file = '', $line = 0, $context = [])
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
--TEST--
|
||||
Bug #78335: Static properties containing cycles report as leak (internal class variant)
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("zend_test")) die("skip requires zend_test"); ?>
|
||||
<?php if (!extension_loaded("zend-test")) die("skip requires zend-test"); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
--TEST--
|
||||
Bug #80781: Error handler that throws ErrorException infinite loop
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
function handle(int $severity, string $message, string $file, int $line): bool {
|
||||
if((error_reporting() & $severity) !== 0) {
|
||||
throw new \ErrorException($message, 0, $severity, $file, $line);
|
||||
}
|
||||
|
||||
return true; // stfu operator
|
||||
}
|
||||
|
||||
set_error_handler('handle');
|
||||
|
||||
function getPlugin(string $plugin) : bool{
|
||||
return false;
|
||||
}
|
||||
|
||||
$data = [];
|
||||
$array = [];
|
||||
if (isset($array[$data]) or getPlugin($data)) {
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Uncaught TypeError: Illegal offset type in isset or empty in %s:%d
|
||||
Stack trace:
|
||||
#0 {main}
|
||||
thrown in %s on line %d
|
||||
@@ -0,0 +1,19 @@
|
||||
--TEST--
|
||||
Bug #80811: Function exec without $output but with $restult_code parameter crashes
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
echo 'Executing with all params:' . PHP_EOL;
|
||||
exec('echo Something', output: $output, result_code: $resultCode);
|
||||
var_dump($resultCode);
|
||||
|
||||
echo 'Executing without output param:' . PHP_EOL;
|
||||
exec('echo Something', result_code: $resultCode);
|
||||
var_dump($resultCode);
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
Executing with all params:
|
||||
int(0)
|
||||
Executing without output param:
|
||||
int(0)
|
||||
@@ -0,0 +1,41 @@
|
||||
--TEST--
|
||||
Bug #80972: Memory exhaustion on invalid string offset
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
function exceptions_error_handler($severity, $message, $filename, $lineno) {
|
||||
if (error_reporting() & $severity) {
|
||||
throw new ErrorException($message, 0, $severity, $filename, $lineno);
|
||||
}
|
||||
}
|
||||
set_error_handler('exceptions_error_handler');
|
||||
|
||||
$float = 10e120;
|
||||
$string_float = (string) $float;
|
||||
|
||||
$string = 'Here is some text for good measure';
|
||||
|
||||
try {
|
||||
echo 'Float casted to string compile', \PHP_EOL;
|
||||
$string[(string) 10e120] = 'E';
|
||||
var_dump($string);
|
||||
} catch (\TypeError $e) {
|
||||
echo $e->getMessage(), \PHP_EOL;
|
||||
}
|
||||
|
||||
/* This same bug also permits to modify the first byte of a string even if
|
||||
* the offset is invalid */
|
||||
try {
|
||||
/* This must not affect the string value */
|
||||
$string["wrong"] = "f";
|
||||
} catch (\Throwable $e) {
|
||||
echo $e->getMessage() . \PHP_EOL;
|
||||
}
|
||||
var_dump($string);
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
Float casted to string compile
|
||||
Cannot access offset of type string on string
|
||||
Cannot access offset of type string on string
|
||||
string(34) "Here is some text for good measure"
|
||||
@@ -2,7 +2,7 @@
|
||||
Check that arguments are freed when calling a deprecated function
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('zend_test')) die('skip zend_test extension not loaded');
|
||||
if (!extension_loaded('zend-test')) die('skip zend-test extension not loaded');
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
--TEST--
|
||||
call_user_func_array() + array_slice() + named arguments
|
||||
--FILE--
|
||||
<?php
|
||||
call_user_func_array('func', array_slice(array: $a, 1, 2));
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Cannot use positional argument after named argument in %s on line %d
|
||||
@@ -0,0 +1,56 @@
|
||||
--TEST--
|
||||
Bug #80929: Method name corruption related to zend_closure_call_magic
|
||||
--FILE--
|
||||
<?php
|
||||
class DefaultListener
|
||||
{
|
||||
public function handleDefaultEvent($event) { }
|
||||
}
|
||||
|
||||
class SubscriberProxy
|
||||
{
|
||||
private array $subscribedEvents;
|
||||
private object $subscriber;
|
||||
private Closure $listener;
|
||||
|
||||
public function __construct(array $subscribedEvents, object $subscriber)
|
||||
{
|
||||
$this->subscribedEvents = $subscribedEvents;
|
||||
$this->subscriber = $subscriber;
|
||||
foreach ($this->subscribedEvents as $eventName => $params) {
|
||||
$this->listener = Closure::fromCallable([$this, $params]);
|
||||
}
|
||||
}
|
||||
|
||||
public function __call(string $name, array $arguments)
|
||||
{
|
||||
return $this->subscriber->$name(...$arguments);
|
||||
}
|
||||
|
||||
public function dispatch($event, string $eventName)
|
||||
{
|
||||
($this->listener)($event, $eventName, null);
|
||||
}
|
||||
}
|
||||
|
||||
$proxy = new SubscriberProxy(
|
||||
['defaultEvent' => 'handleDefaultEvent'],
|
||||
new DefaultListener()
|
||||
);
|
||||
|
||||
for ($i = 0; $i < 10; $i++) {
|
||||
echo $i . PHP_EOL;
|
||||
$proxy->dispatch(null, 'defaultEvent');
|
||||
}
|
||||
?>
|
||||
--EXPECT--
|
||||
0
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
@@ -2,7 +2,7 @@
|
||||
Internal constant deprecation
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('zend_test')) die('skip requires zend_test');
|
||||
if (!extension_loaded('zend-test')) die('skip requires zend-test');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
--TEST--
|
||||
Dynamic static call of non-static method
|
||||
--FILE--
|
||||
<?php
|
||||
class Foo {
|
||||
function test1() {
|
||||
$method = ['Foo', 'bar'];
|
||||
$method();
|
||||
}
|
||||
function test2() {
|
||||
$method = 'Foo::bar';
|
||||
$method();
|
||||
}
|
||||
function __call($name, $args) {}
|
||||
}
|
||||
$x = new Foo;
|
||||
try {
|
||||
$x->test1();
|
||||
} catch (Error $e) {
|
||||
echo $e->getMessage(), "\n";
|
||||
}
|
||||
try {
|
||||
$x->test2();
|
||||
} catch (Error $e) {
|
||||
echo $e->getMessage(), "\n";
|
||||
}
|
||||
?>
|
||||
--EXPECT--
|
||||
Non-static method Foo::bar() cannot be called statically
|
||||
Non-static method Foo::bar() cannot be called statically
|
||||
@@ -0,0 +1,21 @@
|
||||
--TEST--
|
||||
GC 010: Cycle with reference to $GLOBALS
|
||||
--INI--
|
||||
zend.enable_gc=1
|
||||
--FILE--
|
||||
<?php
|
||||
$a = array();
|
||||
$a[] =& $a;
|
||||
var_dump($a);
|
||||
$a[] =& $GLOBALS;
|
||||
unset($a);
|
||||
var_dump(gc_collect_cycles());
|
||||
echo "ok\n"
|
||||
?>
|
||||
--EXPECT--
|
||||
array(1) {
|
||||
[0]=>
|
||||
*RECURSION*
|
||||
}
|
||||
int(1)
|
||||
ok
|
||||
@@ -29,6 +29,6 @@ string(%d) "%s"
|
||||
Warning: Undefined array key "PHP_SELF" in %s on line %d
|
||||
NULL
|
||||
|
||||
Warning: Undefined global variable $_SERVER in %s on line %d
|
||||
Warning: Undefined variable $_SERVER in %s on line %d
|
||||
NULL
|
||||
Done
|
||||
@@ -32,6 +32,6 @@ string(%d) "%s"
|
||||
Warning: Undefined array key "PHP_SELF" in %s on line %d
|
||||
NULL
|
||||
|
||||
Warning: Undefined global variable $_SERVER in %s on line %d
|
||||
Warning: Undefined variable $_SERVER in %s on line %d
|
||||
NULL
|
||||
Done
|
||||
@@ -38,6 +38,6 @@ string(%d) "%s"
|
||||
Warning: Undefined array key "PHP_SELF" in %s on line %d
|
||||
NULL
|
||||
|
||||
Warning: Undefined global variable $_SERVER in %s on line %d
|
||||
Warning: Undefined variable $_SERVER in %s on line %d
|
||||
NULL
|
||||
Done
|
||||
@@ -23,6 +23,6 @@ string(%d) "%s"
|
||||
Warning: Undefined array key "PHP_SELF" in %s on line %d
|
||||
NULL
|
||||
|
||||
Warning: Undefined global variable $_SERVER in %s on line %d
|
||||
Warning: Undefined variable $_SERVER in %s on line %d
|
||||
NULL
|
||||
Done
|
||||
@@ -52,7 +52,7 @@ foreach ($testvalues as $testvalue) {
|
||||
}
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECT--
|
||||
*** Indexing - Testing value assignment with key ***
|
||||
array(1) {
|
||||
["foo"]=>
|
||||
@@ -74,12 +74,8 @@ array(1) {
|
||||
int(1)
|
||||
}
|
||||
}
|
||||
|
||||
Warning: Array to string conversion in %s on line %d
|
||||
Cannot access offset of type string on string
|
||||
string(0) ""
|
||||
|
||||
Warning: Array to string conversion in %s on line %d
|
||||
Cannot access offset of type string on string
|
||||
string(1) " "
|
||||
Cannot use a scalar value as an array
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
--TEST--
|
||||
Inherit internal static property into userland class
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded('zend_test')) die('skip requires zend_test'); ?>
|
||||
<?php if (!extension_loaded('zend-test')) die('skip requires zend-test'); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
Test Z_PARAM_ITERABLE() and Z_PARAM_ITERABLE_OR_NULL
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('zend_test')) die('skip zend_test extension not loaded');
|
||||
if (!extension_loaded('zend-test')) die('skip zend-test extension not loaded');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
--TEST--
|
||||
Iterator::key() with by-ref return
|
||||
--FILE--
|
||||
<?php
|
||||
class Test extends ArrayIterator {
|
||||
function &key() {
|
||||
return $foo;
|
||||
}
|
||||
}
|
||||
foreach (new Test([0]) as $k => $v) {
|
||||
var_dump($k);
|
||||
}
|
||||
?>
|
||||
--EXPECT--
|
||||
NULL
|
||||
@@ -1,10 +0,0 @@
|
||||
--TEST--
|
||||
Leading comma in keyed list assignment
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
[, "a" => $b] = [1, "a" => 2];
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Cannot use empty array entries in keyed array assignment in %s on line %d
|
||||
@@ -1,26 +0,0 @@
|
||||
--TEST--
|
||||
Late Static Binding static:: calls protected / public method of child class even then
|
||||
the method is private in parent class
|
||||
--FILE--
|
||||
<?php
|
||||
class A {
|
||||
public static function out() {
|
||||
echo static::value(), PHP_EOL;
|
||||
}
|
||||
|
||||
private static function value() { return 'A'; }
|
||||
}
|
||||
class B extends A {
|
||||
protected static function value() { return 'B'; }
|
||||
}
|
||||
class C extends A {
|
||||
public static function value() { return 'C'; }
|
||||
}
|
||||
A::out();
|
||||
B::out();
|
||||
C::out();
|
||||
echo PHP_EOL;
|
||||
--EXPECT--
|
||||
A
|
||||
B
|
||||
C
|
||||
@@ -1,25 +0,0 @@
|
||||
--TEST--
|
||||
Late Static Binding static:: accesses protected / public static variables of child
|
||||
class when the variable is private in parent class
|
||||
--FILE--
|
||||
<?php
|
||||
class A {
|
||||
private static $value = 'A';
|
||||
|
||||
public static function out() {
|
||||
echo static::$value, PHP_EOL;
|
||||
}
|
||||
}
|
||||
class B extends A {
|
||||
protected static $value = 'B';
|
||||
}
|
||||
class C extends A {
|
||||
public static $value = 'C';
|
||||
}
|
||||
A::out();
|
||||
B::out();
|
||||
C::out();
|
||||
--EXPECT--
|
||||
A
|
||||
B
|
||||
C
|
||||
@@ -13,7 +13,7 @@ internal_encoding=SJIS
|
||||
<?php
|
||||
declare(encoding='Shift_JIS');
|
||||
$s = "•\"; // 0x95+0x5c in script, not somewhere else "
|
||||
printf("%x:%x", ord($s[0]), ord($s[1]));
|
||||
printf("%x:%x\n", ord($s[0]), ord($s[1]));
|
||||
?>
|
||||
--EXPECT--
|
||||
95:5c
|
||||
Binary file not shown.
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
Passing undefined variable to named arg
|
||||
Passing undefined variabled to named arg
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
--TEST--
|
||||
Octal literal followed by whitespace and another number
|
||||
--FILE--
|
||||
<?php
|
||||
var_dump(0o0 2);
|
||||
?>
|
||||
--EXPECTF--
|
||||
Parse error: syntax error, unexpected integer "2", expecting ")" in %s on line %d
|
||||
@@ -2,7 +2,7 @@
|
||||
Overloaded function 001
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('zend_test')) die('skip zend_test extension not loaded');
|
||||
if (!extension_loaded('zend-test')) die('skip zend-test extension not loaded');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
Overloaded function 002
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('zend_test')) die('skip zend_test extension not loaded');
|
||||
if (!extension_loaded('zend-test')) die('skip zend-test extension not loaded');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
--TEST--
|
||||
Promoting require_once warning to exception
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
function exception_error_handler($errno, $errstr, $errfile, $errline ) {
|
||||
throw new Exception($errstr);
|
||||
}
|
||||
set_error_handler("exception_error_handler");
|
||||
|
||||
try {
|
||||
$results = require_once 'does-not-exist.php';
|
||||
} catch (Exception $e) {
|
||||
echo $e->getMessage(), "\n";
|
||||
};
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
require_once(does-not-exist.php): Failed to open stream: No such file or directory
|
||||
@@ -1,36 +0,0 @@
|
||||
--TEST--
|
||||
Behavior of resources as array keys
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$r = fopen(__FILE__, 'r');
|
||||
$a = [];
|
||||
echo "Assign:";
|
||||
$a[$r] = 1;
|
||||
echo "Add assign:";
|
||||
$a[$r] += 1;
|
||||
echo "Inc:";
|
||||
$a[$r]++;
|
||||
echo "Get:";
|
||||
var_dump($a[$r]);
|
||||
echo "Isset:";
|
||||
var_dump(isset($a[$r]));
|
||||
echo "Unset:";
|
||||
unset($a[$r]);
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Assign:
|
||||
Warning: Resource ID#%d used as offset, casting to integer (%d) in %s on line %d
|
||||
Add assign:
|
||||
Warning: Resource ID#%d used as offset, casting to integer (%d) in %s on line %d
|
||||
Inc:
|
||||
Warning: Resource ID#%d used as offset, casting to integer (%d) in %s on line %d
|
||||
Get:
|
||||
Warning: Resource ID#%d used as offset, casting to integer (%d) in %s on line %d
|
||||
int(3)
|
||||
Isset:
|
||||
Warning: Resource ID#%d used as offset, casting to integer (%d) in %s on line %d
|
||||
bool(true)
|
||||
Unset:
|
||||
Warning: Resource ID#%d used as offset, casting to integer (%d) in %s on line %d
|
||||
@@ -1,11 +0,0 @@
|
||||
--TEST--
|
||||
$GLOBALS no longer contains 'GLOBALS'
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$g = $GLOBALS;
|
||||
var_dump(isset($g['GLOBALS']));
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
bool(false)
|
||||
@@ -1,10 +0,0 @@
|
||||
--TEST--
|
||||
Cannot append to $GLOBALS
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$GLOBALS[] = 1;
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Cannot append to $GLOBALS in %s on line %d
|
||||
@@ -1,8 +0,0 @@
|
||||
--TEST--
|
||||
Cannot append to $GLOBALS in isset()
|
||||
--FILE--
|
||||
<?php
|
||||
isset($GLOBALS[]);
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Cannot use [] for reading in %s on line %d
|
||||
@@ -1,8 +0,0 @@
|
||||
--TEST--
|
||||
Cannot append to $GLOBALS in unset()
|
||||
--FILE--
|
||||
<?php
|
||||
unset($GLOBALS[]);
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Cannot use [] for unsetting in %s on line %d
|
||||
@@ -1,10 +0,0 @@
|
||||
--TEST--
|
||||
Cannot assign to $GLOBALS
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$GLOBALS = [];
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: $GLOBALS can only be modified using the $GLOBALS[$name] = $value syntax in %s on line %d
|
||||
@@ -1,10 +0,0 @@
|
||||
--TEST--
|
||||
Cannot list-assign to $GLOBALS
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
list($GLOBALS) = [1];
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: $GLOBALS can only be modified using the $GLOBALS[$name] = $value syntax in %s on line %d
|
||||
@@ -1,10 +0,0 @@
|
||||
--TEST--
|
||||
Cannot list-assign to $GLOBALS (by-ref)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
list(&$GLOBALS) = [1];
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Cannot assign reference to non referencable value in %s on line %d
|
||||
@@ -1,10 +0,0 @@
|
||||
--TEST--
|
||||
Cannot compound assign to $GLOBALS
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$GLOBALS += [];
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: $GLOBALS can only be modified using the $GLOBALS[$name] = $value syntax in %s on line %d
|
||||
@@ -1,11 +0,0 @@
|
||||
--TEST--
|
||||
Cannot by-ref assign to $GLOBALS (LHS)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$var = [];
|
||||
$GLOBALS =& $var;
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: $GLOBALS can only be modified using the $GLOBALS[$name] = $value syntax in %s on line %d
|
||||
@@ -1,11 +0,0 @@
|
||||
--TEST--
|
||||
Cannot by-ref assign to $GLOBALS (RHS)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$var = [];
|
||||
$var =& $GLOBALS;
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Cannot acquire reference to $GLOBALS in %s on line %d
|
||||
@@ -1,10 +0,0 @@
|
||||
--TEST--
|
||||
Cannot use $GLOBALS as foreach result variable
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
foreach ([1] as $GLOBALS) {}
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: $GLOBALS can only be modified using the $GLOBALS[$name] = $value syntax in %s on line %d
|
||||
@@ -1,10 +0,0 @@
|
||||
--TEST--
|
||||
Cannot use $GLOBALS as foreach result variable (by-ref)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
foreach ([1] as &$GLOBALS) {}
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: $GLOBALS can only be modified using the $GLOBALS[$name] = $value syntax in %s on line %d
|
||||
@@ -1,23 +0,0 @@
|
||||
--TEST--
|
||||
$GLOBALS cannot be passed by reference (runtime error)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
function by_ref(&$ref) {}
|
||||
try {
|
||||
by_ref($GLOBALS);
|
||||
} catch (Error $e) {
|
||||
echo $e->getMessage(), "\n";
|
||||
}
|
||||
|
||||
try {
|
||||
by_ref2($GLOBALS);
|
||||
} catch (Error $e) {
|
||||
echo $e->getMessage(), "\n";
|
||||
}
|
||||
function by_ref2(&$ref) {}
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
by_ref(): Argument #1 ($ref) cannot be passed by reference
|
||||
by_ref2(): Argument #1 ($ref) cannot be passed by reference
|
||||
@@ -1,10 +0,0 @@
|
||||
--TEST--
|
||||
Cannot unset $GLOBALS
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
unset($GLOBALS);
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: $GLOBALS can only be modified using the $GLOBALS[$name] = $value syntax in %s on line %d
|
||||
@@ -1,11 +0,0 @@
|
||||
--TEST--
|
||||
$GLOBALS should have canonicalized keys
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
${1} = 42;
|
||||
var_dump($GLOBALS[1]);
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
int(42)
|
||||
@@ -1,52 +0,0 @@
|
||||
--TEST--
|
||||
Supported operations on $GLOBALS
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
function test() {
|
||||
var_dump($GLOBALS['x']);
|
||||
$GLOBALS['x'] = 1;
|
||||
var_dump($GLOBALS['x']);
|
||||
$GLOBALS['x']++;
|
||||
var_dump($GLOBALS['x']);
|
||||
$GLOBALS['x'] += 2;
|
||||
var_dump($GLOBALS['x']);
|
||||
unset($GLOBALS['y']);
|
||||
var_dump(isset($GLOBALS['x']));
|
||||
var_dump(isset($GLOBALS['y']));
|
||||
$GLOBALS['z'][] = 1;
|
||||
}
|
||||
|
||||
$y = 1;
|
||||
test();
|
||||
var_dump($x, $y, $z);
|
||||
|
||||
$ref = 1;
|
||||
$GLOBALS['z'] =& $ref;
|
||||
$ref++;
|
||||
var_dump($z);
|
||||
|
||||
$x = 1;
|
||||
$ref2 =& $GLOBALS['x'];
|
||||
$ref2++;
|
||||
var_dump($x);
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: Undefined global variable $x in %s on line %d
|
||||
NULL
|
||||
int(1)
|
||||
int(2)
|
||||
int(4)
|
||||
bool(true)
|
||||
bool(false)
|
||||
|
||||
Warning: Undefined variable $y in %s on line %d
|
||||
int(4)
|
||||
NULL
|
||||
array(1) {
|
||||
[0]=>
|
||||
int(1)
|
||||
}
|
||||
int(2)
|
||||
int(2)
|
||||
@@ -2,7 +2,7 @@
|
||||
Return type for internal functions
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('zend_test')) die('skip zend_test extension not loaded');
|
||||
if (!extension_loaded('zend-test')) die('skip zend-test extension not loaded');
|
||||
// Internal function return types are only checked in debug builds
|
||||
if (!PHP_DEBUG) die('skip requires debug build');
|
||||
?>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
Return type for internal functions 2
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('zend_test')) die('skip zend_test extension not loaded');
|
||||
if (!extension_loaded('zend-test')) die('skip zend-test extension not loaded');
|
||||
--FILE--
|
||||
<?php
|
||||
zend_test_nullable_array_return();
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
Return type for internal functions 3: Void return type
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('zend_test')) die('skip zend_test extension not loaded');
|
||||
if (!extension_loaded('zend-test')) die('skip zend-test extension not loaded');
|
||||
--FILE--
|
||||
<?php
|
||||
var_dump(zend_test_void_return());
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
Test Z_PARAM_OBJ_OF_CLASS_OR_STR() and Z_PARAM_OBJ_OF_CLASS_OR_STR_OR_NULL
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('zend_test')) die('skip zend_test extension not loaded');
|
||||
if (!extension_loaded('zend-test')) die('skip zend-test extension not loaded');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
Test Z_PARAM_OBJ_OR_STR() and Z_PARAM_OBJ_OR_STR_OR_NULL
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('zend_test')) die('skip zend_test extension not loaded');
|
||||
if (!extension_loaded('zend-test')) die('skip zend-test extension not loaded');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
--TEST--
|
||||
Symtable cache slots may be acquired while cleaning symtable
|
||||
--FILE--
|
||||
<?php
|
||||
class A {
|
||||
// Must be larger than the symtable cache.
|
||||
static $max = 40;
|
||||
function __destruct() {
|
||||
if (self::$max-- < 0) return;
|
||||
$x = 'y';
|
||||
$$x = new a;
|
||||
}
|
||||
}
|
||||
new A;
|
||||
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECT--
|
||||
===DONE===
|
||||
@@ -2,7 +2,7 @@
|
||||
Bug #69579 (Internal trait double-free)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('zend_test')) die('skip zend_test extension not loaded');
|
||||
if (!extension_loaded('zend-test')) die('skip zend-test extension not loaded');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
--TEST--
|
||||
Typed properties in internal classes
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded('zend_test')) die('skip requires zend_test'); ?>
|
||||
<?php if (!extension_loaded('zend-test')) die('skip requires zend-test'); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
--TEST--
|
||||
A failed assignment should not be considered an initialization
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class Test {
|
||||
public int $prop;
|
||||
|
||||
public function __get($name) {
|
||||
echo "__get() called\n";
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
$test = new Test;
|
||||
try {
|
||||
$test->prop;
|
||||
} catch (Error $e) {
|
||||
echo $e->getMessage(), "\n";
|
||||
}
|
||||
try {
|
||||
$test->prop = "foo";
|
||||
} catch (Error $e) {
|
||||
echo $e->getMessage(), "\n";
|
||||
}
|
||||
try {
|
||||
$test->prop;
|
||||
} catch (Error $e) {
|
||||
echo $e->getMessage(), "\n";
|
||||
}
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
Typed property Test::$prop must not be accessed before initialization
|
||||
Cannot assign string to property Test::$prop of type int
|
||||
Typed property Test::$prop must not be accessed before initialization
|
||||
@@ -2,7 +2,7 @@
|
||||
Inheritance of union type from internal class
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('zend_test')) die('skip requires zend_test extension');
|
||||
if (!extension_loaded('zend-test')) die('skip requires zend-test extension');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
--TEST--
|
||||
Everything is trivially a subtype of mixed
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
spl_autoload_register(function($class) {
|
||||
echo "Loading $class\n";
|
||||
});
|
||||
|
||||
class A {
|
||||
public function test(): mixed {}
|
||||
}
|
||||
class B extends A {
|
||||
public function test(): X {}
|
||||
}
|
||||
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECT--
|
||||
===DONE===
|
||||
@@ -42,5 +42,5 @@ array(0) {
|
||||
Undefined array key "key"
|
||||
array(0) {
|
||||
}
|
||||
Undefined global variable $test
|
||||
Undefined array key "test"
|
||||
Undefined variable $test
|
||||
@@ -0,0 +1,14 @@
|
||||
--TEST--
|
||||
unset() CV 9 (unset() of global variable in array_pop($GLOBALS))
|
||||
--FILE--
|
||||
<?php
|
||||
$x = "ok\n";
|
||||
echo array_pop($GLOBALS);
|
||||
echo $x;
|
||||
echo "ok\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
ok
|
||||
|
||||
Warning: Undefined variable $x in %s on line %d
|
||||
ok
|
||||
@@ -2,7 +2,6 @@
|
||||
unset() CV 10 (unset() of global variable in ArrayObject::offsetUnset($GLOBALS))
|
||||
--FILE--
|
||||
<?php
|
||||
/* This is working on a copy of $GLOBALS, so nothing interesting happens here. */
|
||||
$a = new ArrayObject($GLOBALS);
|
||||
$x = "ok\n";
|
||||
echo $x;
|
||||
@@ -13,6 +12,5 @@ echo "ok\n";
|
||||
--EXPECTF--
|
||||
ok
|
||||
|
||||
Warning: Undefined array key "x" in %s on line %d
|
||||
ok
|
||||
Warning: Undefined variable $x in %s on line %d
|
||||
ok
|
||||
+15
-15
@@ -34,7 +34,6 @@
|
||||
#include "zend_cpuinfo.h"
|
||||
#include "zend_attributes.h"
|
||||
#include "zend_observer.h"
|
||||
#include "Optimizer/zend_optimizer.h"
|
||||
|
||||
static size_t global_map_ptr_last = 0;
|
||||
|
||||
@@ -61,7 +60,7 @@ ZEND_TSRMLS_CACHE_DEFINE()
|
||||
#endif
|
||||
|
||||
ZEND_API zend_utility_values zend_uv;
|
||||
ZEND_API bool zend_dtrace_enabled;
|
||||
ZEND_API zend_bool zend_dtrace_enabled;
|
||||
|
||||
/* version information */
|
||||
static char *zend_version_info;
|
||||
@@ -93,7 +92,7 @@ static void (*zend_message_dispatcher_p)(zend_long message, const void *data);
|
||||
static zval *(*zend_get_configuration_directive_p)(zend_string *name);
|
||||
|
||||
#if ZEND_RC_DEBUG
|
||||
ZEND_API bool zend_rc_debug = 0;
|
||||
ZEND_API zend_bool zend_rc_debug = 0;
|
||||
#endif
|
||||
|
||||
static ZEND_INI_MH(OnUpdateErrorReporting) /* {{{ */
|
||||
@@ -109,7 +108,7 @@ static ZEND_INI_MH(OnUpdateErrorReporting) /* {{{ */
|
||||
|
||||
static ZEND_INI_MH(OnUpdateGCEnabled) /* {{{ */
|
||||
{
|
||||
bool val;
|
||||
zend_bool val;
|
||||
|
||||
val = zend_ini_parse_bool(new_value);
|
||||
gc_enable(val);
|
||||
@@ -291,7 +290,7 @@ ZEND_API zend_string *zend_strpprintf_unchecked(size_t max_len, const char *form
|
||||
|
||||
static void zend_print_zval_r_to_buf(smart_str *buf, zval *expr, int indent);
|
||||
|
||||
static void print_hash(smart_str *buf, HashTable *ht, int indent, bool is_object) /* {{{ */
|
||||
static void print_hash(smart_str *buf, HashTable *ht, int indent, zend_bool is_object) /* {{{ */
|
||||
{
|
||||
zval *tmp;
|
||||
zend_string *string_key;
|
||||
@@ -525,7 +524,7 @@ static FILE *zend_fopen_wrapper(const char *filename, zend_string **opened_path)
|
||||
/* }}} */
|
||||
|
||||
#ifdef ZTS
|
||||
static bool short_tags_default = 1;
|
||||
static zend_bool short_tags_default = 1;
|
||||
static uint32_t compiler_options_default = ZEND_COMPILE_DEFAULT;
|
||||
#else
|
||||
# define short_tags_default 1
|
||||
@@ -785,10 +784,15 @@ static void module_destructor_zval(zval *zv) /* {{{ */
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
static bool php_auto_globals_create_globals(zend_string *name) /* {{{ */
|
||||
static zend_bool php_auto_globals_create_globals(zend_string *name) /* {{{ */
|
||||
{
|
||||
/* While we keep registering $GLOBALS as an auto-global, we do not create an
|
||||
* actual variable for it. Access to it handled specially by the compiler. */
|
||||
zval globals;
|
||||
|
||||
/* IS_ARRAY, but with ref-counter 1 and not IS_TYPE_REFCOUNTED */
|
||||
ZVAL_ARR(&globals, &EG(symbol_table));
|
||||
Z_TYPE_FLAGS_P(&globals) = 0;
|
||||
ZVAL_NEW_REF(&globals, &globals);
|
||||
zend_hash_update(&EG(symbol_table), name, &globals);
|
||||
return 0;
|
||||
}
|
||||
/* }}} */
|
||||
@@ -954,8 +958,6 @@ void zend_startup(zend_utility_functions *utility_functions) /* {{{ */
|
||||
php_win32_cp_setup();
|
||||
#endif
|
||||
|
||||
zend_optimizer_startup();
|
||||
|
||||
#ifdef ZTS
|
||||
tsrm_set_new_thread_end_handler(zend_new_thread_end_handler);
|
||||
tsrm_set_shutdown_handler(zend_interned_strings_dtor);
|
||||
@@ -1115,8 +1117,6 @@ void zend_shutdown(void) /* {{{ */
|
||||
}
|
||||
#endif
|
||||
zend_destroy_rsrc_list_dtors();
|
||||
|
||||
zend_optimizer_shutdown();
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
@@ -1292,7 +1292,7 @@ static ZEND_COLD void zend_error_impl(
|
||||
zval params[4];
|
||||
zval retval;
|
||||
zval orig_user_error_handler;
|
||||
bool in_compilation;
|
||||
zend_bool in_compilation;
|
||||
zend_class_entry *saved_class_entry;
|
||||
zend_stack loop_var_stack;
|
||||
zend_stack delayed_oplines_stack;
|
||||
@@ -1596,7 +1596,7 @@ ZEND_API ZEND_COLD void zend_value_error(const char *format, ...) /* {{{ */
|
||||
va_end(va);
|
||||
} /* }}} */
|
||||
|
||||
ZEND_API ZEND_COLD void zend_output_debug_string(bool trigger_break, const char *format, ...) /* {{{ */
|
||||
ZEND_API ZEND_COLD void zend_output_debug_string(zend_bool trigger_break, const char *format, ...) /* {{{ */
|
||||
{
|
||||
#if ZEND_DEBUG
|
||||
va_list args;
|
||||
|
||||
+4
-4
@@ -20,7 +20,7 @@
|
||||
#ifndef ZEND_H
|
||||
#define ZEND_H
|
||||
|
||||
#define ZEND_VERSION "4.1.0-dev"
|
||||
#define ZEND_VERSION "4.0.7"
|
||||
|
||||
#define ZEND_ENGINE_3
|
||||
|
||||
@@ -203,7 +203,7 @@ typedef struct _zend_utility_functions {
|
||||
} zend_utility_functions;
|
||||
|
||||
typedef struct _zend_utility_values {
|
||||
bool html_errors;
|
||||
zend_bool html_errors;
|
||||
} zend_utility_values;
|
||||
|
||||
typedef size_t (*zend_write_func_t)(const char *str, size_t str_length);
|
||||
@@ -255,7 +255,7 @@ ZEND_API void zend_print_flat_zval_r(zval *expr);
|
||||
#define zend_print_variable(var) \
|
||||
zend_print_zval((var), 0)
|
||||
|
||||
ZEND_API ZEND_COLD void zend_output_debug_string(bool trigger_break, const char *format, ...) ZEND_ATTRIBUTE_FORMAT(printf, 2, 3);
|
||||
ZEND_API ZEND_COLD void zend_output_debug_string(zend_bool trigger_break, const char *format, ...) ZEND_ATTRIBUTE_FORMAT(printf, 2, 3);
|
||||
|
||||
ZEND_API void zend_activate(void);
|
||||
ZEND_API void zend_deactivate(void);
|
||||
@@ -316,7 +316,7 @@ extern ZEND_API zend_class_entry *zend_standard_class_def;
|
||||
extern ZEND_API zend_utility_values zend_uv;
|
||||
|
||||
/* If DTrace is available and enabled */
|
||||
extern ZEND_API bool zend_dtrace_enabled;
|
||||
extern ZEND_API zend_bool zend_dtrace_enabled;
|
||||
END_EXTERN_C()
|
||||
|
||||
#define ZEND_UV(name) (zend_uv.name)
|
||||
|
||||
+32
-143
@@ -426,7 +426,7 @@ ZEND_API bool ZEND_FASTCALL zend_parse_arg_class(zval *arg, zend_class_entry **p
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
ZEND_API bool ZEND_FASTCALL zend_parse_arg_bool_weak(zval *arg, bool *dest) /* {{{ */
|
||||
ZEND_API bool ZEND_FASTCALL zend_parse_arg_bool_weak(zval *arg, zend_bool *dest) /* {{{ */
|
||||
{
|
||||
if (EXPECTED(Z_TYPE_P(arg) <= IS_STRING)) {
|
||||
*dest = zend_is_true(arg);
|
||||
@@ -437,7 +437,7 @@ ZEND_API bool ZEND_FASTCALL zend_parse_arg_bool_weak(zval *arg, bool *dest) /* {
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
ZEND_API bool ZEND_FASTCALL zend_parse_arg_bool_slow(zval *arg, bool *dest) /* {{{ */
|
||||
ZEND_API bool ZEND_FASTCALL zend_parse_arg_bool_slow(zval *arg, zend_bool *dest) /* {{{ */
|
||||
{
|
||||
if (UNEXPECTED(ZEND_ARG_USES_STRICT_TYPES())) {
|
||||
return 0;
|
||||
@@ -644,10 +644,10 @@ static const char *zend_parse_arg_impl(zval *arg, va_list *va, const char **spec
|
||||
case 'l':
|
||||
{
|
||||
zend_long *p = va_arg(*va, zend_long *);
|
||||
bool *is_null = NULL;
|
||||
zend_bool *is_null = NULL;
|
||||
|
||||
if (check_null) {
|
||||
is_null = va_arg(*va, bool *);
|
||||
is_null = va_arg(*va, zend_bool *);
|
||||
}
|
||||
|
||||
if (!zend_parse_arg_long(arg, p, is_null, check_null)) {
|
||||
@@ -659,10 +659,10 @@ static const char *zend_parse_arg_impl(zval *arg, va_list *va, const char **spec
|
||||
case 'd':
|
||||
{
|
||||
double *p = va_arg(*va, double *);
|
||||
bool *is_null = NULL;
|
||||
zend_bool *is_null = NULL;
|
||||
|
||||
if (check_null) {
|
||||
is_null = va_arg(*va, bool *);
|
||||
is_null = va_arg(*va, zend_bool *);
|
||||
}
|
||||
|
||||
if (!zend_parse_arg_double(arg, p, is_null, check_null)) {
|
||||
@@ -731,11 +731,11 @@ static const char *zend_parse_arg_impl(zval *arg, va_list *va, const char **spec
|
||||
|
||||
case 'b':
|
||||
{
|
||||
bool *p = va_arg(*va, bool *);
|
||||
bool *is_null = NULL;
|
||||
zend_bool *p = va_arg(*va, zend_bool *);
|
||||
zend_bool *is_null = NULL;
|
||||
|
||||
if (check_null) {
|
||||
is_null = va_arg(*va, bool *);
|
||||
is_null = va_arg(*va, zend_bool *);
|
||||
}
|
||||
|
||||
if (!zend_parse_arg_bool(arg, p, is_null, check_null)) {
|
||||
@@ -956,8 +956,8 @@ static zend_result zend_parse_va_args(uint32_t num_args, const char *type_spec,
|
||||
uint32_t max_num_args = 0;
|
||||
uint32_t post_varargs = 0;
|
||||
zval *arg;
|
||||
bool have_varargs = 0;
|
||||
bool have_optional_args = 0;
|
||||
zend_bool have_varargs = 0;
|
||||
zend_bool have_optional_args = 0;
|
||||
zval **varargs = NULL;
|
||||
int *n_varargs = NULL;
|
||||
|
||||
@@ -1130,7 +1130,7 @@ ZEND_API zend_result zend_parse_method_parameters(uint32_t num_args, zval *this_
|
||||
* Z_OBJ(EG(This)) to NULL when calling an internal function with common.scope == NULL.
|
||||
* In that case EG(This) would still be the $this from the calling code and we'd take the
|
||||
* wrong branch here. */
|
||||
bool is_method = EG(current_execute_data)->func->common.scope != NULL;
|
||||
zend_bool is_method = EG(current_execute_data)->func->common.scope != NULL;
|
||||
|
||||
if (!is_method || !this_ptr || Z_TYPE_P(this_ptr) != IS_OBJECT) {
|
||||
va_start(va, type_spec);
|
||||
@@ -1531,33 +1531,6 @@ ZEND_API void add_assoc_stringl_ex(zval *arg, const char *key, size_t key_len, c
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
ZEND_API void add_assoc_array_ex(zval *arg, const char *key, size_t key_len, zend_array *arr) /* {{{ */
|
||||
{
|
||||
zval tmp;
|
||||
|
||||
ZVAL_ARR(&tmp, arr);
|
||||
zend_symtable_str_update(Z_ARRVAL_P(arg), key, key_len, &tmp);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
ZEND_API void add_assoc_object_ex(zval *arg, const char *key, size_t key_len, zend_object *obj) /* {{{ */
|
||||
{
|
||||
zval tmp;
|
||||
|
||||
ZVAL_OBJ(&tmp, obj);
|
||||
zend_symtable_str_update(Z_ARRVAL_P(arg), key, key_len, &tmp);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
ZEND_API void add_assoc_reference_ex(zval *arg, const char *key, size_t key_len, zend_reference *ref) /* {{{ */
|
||||
{
|
||||
zval tmp;
|
||||
|
||||
ZVAL_REF(&tmp, ref);
|
||||
zend_symtable_str_update(Z_ARRVAL_P(arg), key, key_len, &tmp);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
ZEND_API void add_assoc_zval_ex(zval *arg, const char *key, size_t key_len, zval *value) /* {{{ */
|
||||
{
|
||||
zend_symtable_str_update(Z_ARRVAL_P(arg), key, key_len, value);
|
||||
@@ -1636,33 +1609,6 @@ ZEND_API void add_index_stringl(zval *arg, zend_ulong index, const char *str, si
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
ZEND_API void add_index_array(zval *arg, zend_ulong index, zend_array *arr) /* {{{ */
|
||||
{
|
||||
zval tmp;
|
||||
|
||||
ZVAL_ARR(&tmp, arr);
|
||||
zend_hash_index_update(Z_ARRVAL_P(arg), index, &tmp);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
ZEND_API void add_index_object(zval *arg, zend_ulong index, zend_object *obj) /* {{{ */
|
||||
{
|
||||
zval tmp;
|
||||
|
||||
ZVAL_OBJ(&tmp, obj);
|
||||
zend_hash_index_update(Z_ARRVAL_P(arg), index, &tmp);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
ZEND_API void add_index_reference(zval *arg, zend_ulong index, zend_reference *ref) /* {{{ */
|
||||
{
|
||||
zval tmp;
|
||||
|
||||
ZVAL_REF(&tmp, ref);
|
||||
zend_hash_index_update(Z_ARRVAL_P(arg), index, &tmp);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
ZEND_API zend_result add_next_index_long(zval *arg, zend_long n) /* {{{ */
|
||||
{
|
||||
zval tmp;
|
||||
@@ -1681,7 +1627,7 @@ ZEND_API zend_result add_next_index_null(zval *arg) /* {{{ */
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
ZEND_API zend_result add_next_index_bool(zval *arg, bool b) /* {{{ */
|
||||
ZEND_API zend_result add_next_index_bool(zval *arg, zend_bool b) /* {{{ */
|
||||
{
|
||||
zval tmp;
|
||||
|
||||
@@ -1735,33 +1681,6 @@ ZEND_API zend_result add_next_index_stringl(zval *arg, const char *str, size_t l
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
ZEND_API zend_result add_next_index_array(zval *arg, zend_array *arr) /* {{{ */
|
||||
{
|
||||
zval tmp;
|
||||
|
||||
ZVAL_ARR(&tmp, arr);
|
||||
return zend_hash_next_index_insert(Z_ARRVAL_P(arg), &tmp) ? SUCCESS : FAILURE;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
ZEND_API zend_result add_next_index_object(zval *arg, zend_object *obj) /* {{{ */
|
||||
{
|
||||
zval tmp;
|
||||
|
||||
ZVAL_OBJ(&tmp, obj);
|
||||
return zend_hash_next_index_insert(Z_ARRVAL_P(arg), &tmp) ? SUCCESS : FAILURE;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
ZEND_API zend_result add_next_index_reference(zval *arg, zend_reference *ref) /* {{{ */
|
||||
{
|
||||
zval tmp;
|
||||
|
||||
ZVAL_REF(&tmp, ref);
|
||||
return zend_hash_next_index_insert(Z_ARRVAL_P(arg), &tmp) ? SUCCESS : FAILURE;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
ZEND_API zend_result array_set_zval_key(HashTable *ht, zval *key, zval *value) /* {{{ */
|
||||
{
|
||||
zval *result;
|
||||
@@ -1879,36 +1798,6 @@ ZEND_API void add_property_stringl_ex(zval *arg, const char *key, size_t key_len
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
ZEND_API void add_property_array_ex(zval *arg, const char *key, size_t key_len, zend_array *arr) /* {{{ */
|
||||
{
|
||||
zval tmp;
|
||||
|
||||
ZVAL_ARR(&tmp, arr);
|
||||
add_property_zval_ex(arg, key, key_len, &tmp);
|
||||
zval_ptr_dtor(&tmp); /* write_property will add 1 to refcount */
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
ZEND_API void add_property_object_ex(zval *arg, const char *key, size_t key_len, zend_object *obj) /* {{{ */
|
||||
{
|
||||
zval tmp;
|
||||
|
||||
ZVAL_OBJ(&tmp, obj);
|
||||
add_property_zval_ex(arg, key, key_len, &tmp);
|
||||
zval_ptr_dtor(&tmp); /* write_property will add 1 to refcount */
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
ZEND_API void add_property_reference_ex(zval *arg, const char *key, size_t key_len, zend_reference *ref) /* {{{ */
|
||||
{
|
||||
zval tmp;
|
||||
|
||||
ZVAL_REF(&tmp, ref);
|
||||
add_property_zval_ex(arg, key, key_len, &tmp);
|
||||
zval_ptr_dtor(&tmp); /* write_property will add 1 to refcount */
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
ZEND_API void add_property_zval_ex(zval *arg, const char *key, size_t key_len, zval *value) /* {{{ */
|
||||
{
|
||||
zend_string *str;
|
||||
@@ -2949,7 +2838,7 @@ ZEND_API zend_result zend_register_class_alias_ex(const char *name, size_t name_
|
||||
/* }}} */
|
||||
|
||||
// TODO num_symbol_tables as unsigned int?
|
||||
ZEND_API zend_result zend_set_hash_symbol(zval *symbol, const char *name, size_t name_length, bool is_ref, int num_symbol_tables, ...) /* {{{ */
|
||||
ZEND_API zend_result zend_set_hash_symbol(zval *symbol, const char *name, size_t name_length, zend_bool is_ref, int num_symbol_tables, ...) /* {{{ */
|
||||
{
|
||||
HashTable *symbol_table;
|
||||
va_list symbol_table_list;
|
||||
@@ -3448,11 +3337,11 @@ ZEND_API zend_string *zend_get_callable_name(zval *callable) /* {{{ */
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
ZEND_API bool zend_is_callable_at_frame(
|
||||
ZEND_API zend_bool zend_is_callable_at_frame(
|
||||
zval *callable, zend_object *object, zend_execute_data *frame,
|
||||
uint32_t check_flags, zend_fcall_info_cache *fcc, char **error) /* {{{ */
|
||||
{
|
||||
bool ret;
|
||||
zend_bool ret;
|
||||
zend_fcall_info_cache fcc_local;
|
||||
bool strict_class = 0;
|
||||
|
||||
@@ -3569,7 +3458,7 @@ check_func:
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
ZEND_API bool zend_is_callable_ex(zval *callable, zend_object *object, uint32_t check_flags, zend_string **callable_name, zend_fcall_info_cache *fcc, char **error) /* {{{ */
|
||||
ZEND_API zend_bool zend_is_callable_ex(zval *callable, zend_object *object, uint32_t check_flags, zend_string **callable_name, zend_fcall_info_cache *fcc, char **error) /* {{{ */
|
||||
{
|
||||
/* Determine callability at the first parent user frame. */
|
||||
zend_execute_data *frame = EG(current_execute_data);
|
||||
@@ -3577,20 +3466,20 @@ ZEND_API bool zend_is_callable_ex(zval *callable, zend_object *object, uint32_t
|
||||
frame = frame->prev_execute_data;
|
||||
}
|
||||
|
||||
bool ret = zend_is_callable_at_frame(callable, object, frame, check_flags, fcc, error);
|
||||
zend_bool ret = zend_is_callable_at_frame(callable, object, frame, check_flags, fcc, error);
|
||||
if (callable_name) {
|
||||
*callable_name = zend_get_callable_name_ex(callable, object);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
ZEND_API bool zend_is_callable(zval *callable, uint32_t check_flags, zend_string **callable_name) /* {{{ */
|
||||
ZEND_API zend_bool zend_is_callable(zval *callable, uint32_t check_flags, zend_string **callable_name) /* {{{ */
|
||||
{
|
||||
return zend_is_callable_ex(callable, NULL, check_flags, callable_name, NULL, NULL);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
ZEND_API bool zend_make_callable(zval *callable, zend_string **callable_name) /* {{{ */
|
||||
ZEND_API zend_bool zend_make_callable(zval *callable, zend_string **callable_name) /* {{{ */
|
||||
{
|
||||
zend_fcall_info_cache fcc;
|
||||
|
||||
@@ -3790,7 +3679,7 @@ static inline zend_string *zval_make_interned_string(zval *zv) /* {{{ */
|
||||
return Z_STR_P(zv);
|
||||
}
|
||||
|
||||
static zend_always_inline bool is_persistent_class(zend_class_entry *ce) {
|
||||
static zend_always_inline zend_bool is_persistent_class(zend_class_entry *ce) {
|
||||
return (ce->type & ZEND_INTERNAL_CLASS)
|
||||
&& ce->info.internal.module->type == MODULE_PERSISTENT;
|
||||
}
|
||||
@@ -3898,7 +3787,7 @@ ZEND_API zend_property_info *zend_declare_typed_property(zend_class_entry *ce, z
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
ZEND_API zend_result zend_try_assign_typed_ref_ex(zend_reference *ref, zval *val, bool strict) /* {{{ */
|
||||
ZEND_API zend_result zend_try_assign_typed_ref_ex(zend_reference *ref, zval *val, zend_bool strict) /* {{{ */
|
||||
{
|
||||
if (UNEXPECTED(!zend_verify_ref_assignable_zval(ref, val, strict))) {
|
||||
zval_ptr_dtor(val);
|
||||
@@ -3926,7 +3815,7 @@ ZEND_API zend_result zend_try_assign_typed_ref_null(zend_reference *ref) /* {{{
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
ZEND_API zend_result zend_try_assign_typed_ref_bool(zend_reference *ref, bool val) /* {{{ */
|
||||
ZEND_API zend_result zend_try_assign_typed_ref_bool(zend_reference *ref, zend_bool val) /* {{{ */
|
||||
{
|
||||
zval tmp;
|
||||
|
||||
@@ -4016,7 +3905,7 @@ ZEND_API zend_result zend_try_assign_typed_ref_zval(zend_reference *ref, zval *z
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
ZEND_API zend_result zend_try_assign_typed_ref_zval_ex(zend_reference *ref, zval *zv, bool strict) /* {{{ */
|
||||
ZEND_API zend_result zend_try_assign_typed_ref_zval_ex(zend_reference *ref, zval *zv, zend_bool strict) /* {{{ */
|
||||
{
|
||||
zval tmp;
|
||||
|
||||
@@ -4167,7 +4056,7 @@ ZEND_API void zend_declare_class_constant_long(zend_class_entry *ce, const char
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
ZEND_API void zend_declare_class_constant_bool(zend_class_entry *ce, const char *name, size_t name_length, bool value) /* {{{ */
|
||||
ZEND_API void zend_declare_class_constant_bool(zend_class_entry *ce, const char *name, size_t name_length, zend_bool value) /* {{{ */
|
||||
{
|
||||
zval constant;
|
||||
|
||||
@@ -4408,7 +4297,7 @@ ZEND_API zend_result zend_update_static_property_stringl(zend_class_entry *scope
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
ZEND_API zval *zend_read_property_ex(zend_class_entry *scope, zend_object *object, zend_string *name, bool silent, zval *rv) /* {{{ */
|
||||
ZEND_API zval *zend_read_property_ex(zend_class_entry *scope, zend_object *object, zend_string *name, zend_bool silent, zval *rv) /* {{{ */
|
||||
{
|
||||
zval *value;
|
||||
zend_class_entry *old_scope = EG(fake_scope);
|
||||
@@ -4422,7 +4311,7 @@ ZEND_API zval *zend_read_property_ex(zend_class_entry *scope, zend_object *objec
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
ZEND_API zval *zend_read_property(zend_class_entry *scope, zend_object *object, const char *name, size_t name_length, bool silent, zval *rv) /* {{{ */
|
||||
ZEND_API zval *zend_read_property(zend_class_entry *scope, zend_object *object, const char *name, size_t name_length, zend_bool silent, zval *rv) /* {{{ */
|
||||
{
|
||||
zval *value;
|
||||
zend_string *str;
|
||||
@@ -4434,7 +4323,7 @@ ZEND_API zval *zend_read_property(zend_class_entry *scope, zend_object *object,
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
ZEND_API zval *zend_read_static_property_ex(zend_class_entry *scope, zend_string *name, bool silent) /* {{{ */
|
||||
ZEND_API zval *zend_read_static_property_ex(zend_class_entry *scope, zend_string *name, zend_bool silent) /* {{{ */
|
||||
{
|
||||
zval *property;
|
||||
zend_class_entry *old_scope = EG(fake_scope);
|
||||
@@ -4447,7 +4336,7 @@ ZEND_API zval *zend_read_static_property_ex(zend_class_entry *scope, zend_string
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
ZEND_API zval *zend_read_static_property(zend_class_entry *scope, const char *name, size_t name_length, bool silent) /* {{{ */
|
||||
ZEND_API zval *zend_read_static_property(zend_class_entry *scope, const char *name, size_t name_length, zend_bool silent) /* {{{ */
|
||||
{
|
||||
zend_string *key = zend_string_init(name, name_length, 0);
|
||||
zval *property = zend_read_static_property_ex(scope, key, silent);
|
||||
@@ -4493,7 +4382,7 @@ ZEND_API ZEND_COLD const char *zend_get_object_type(const zend_class_entry *ce)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
ZEND_API bool zend_is_iterable(zval *iterable) /* {{{ */
|
||||
ZEND_API zend_bool zend_is_iterable(zval *iterable) /* {{{ */
|
||||
{
|
||||
switch (Z_TYPE_P(iterable)) {
|
||||
case IS_ARRAY:
|
||||
@@ -4506,7 +4395,7 @@ ZEND_API bool zend_is_iterable(zval *iterable) /* {{{ */
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
ZEND_API bool zend_is_countable(zval *countable) /* {{{ */
|
||||
ZEND_API zend_bool zend_is_countable(zval *countable) /* {{{ */
|
||||
{
|
||||
switch (Z_TYPE_P(countable)) {
|
||||
case IS_ARRAY:
|
||||
@@ -4530,7 +4419,7 @@ static zend_result get_default_via_ast(zval *default_value_zval, const char *def
|
||||
zend_string *code = zend_string_concat3(
|
||||
"<?php ", sizeof("<?php ") - 1, default_value, strlen(default_value), ";", 1);
|
||||
|
||||
ast = zend_compile_string_to_ast(code, &ast_arena, ZSTR_EMPTY_ALLOC());
|
||||
ast = zend_compile_string_to_ast(code, &ast_arena, "");
|
||||
zend_string_release(code);
|
||||
|
||||
if (!ast) {
|
||||
|
||||
+98
-75
@@ -352,12 +352,12 @@ ZEND_API ZEND_COLD void zend_wrong_param_count(void);
|
||||
ZEND_API void zend_release_fcall_info_cache(zend_fcall_info_cache *fcc);
|
||||
ZEND_API zend_string *zend_get_callable_name_ex(zval *callable, zend_object *object);
|
||||
ZEND_API zend_string *zend_get_callable_name(zval *callable);
|
||||
ZEND_API bool zend_is_callable_at_frame(
|
||||
ZEND_API zend_bool zend_is_callable_at_frame(
|
||||
zval *callable, zend_object *object, zend_execute_data *frame,
|
||||
uint32_t check_flags, zend_fcall_info_cache *fcc, char **error);
|
||||
ZEND_API bool zend_is_callable_ex(zval *callable, zend_object *object, uint32_t check_flags, zend_string **callable_name, zend_fcall_info_cache *fcc, char **error);
|
||||
ZEND_API bool zend_is_callable(zval *callable, uint32_t check_flags, zend_string **callable_name);
|
||||
ZEND_API bool zend_make_callable(zval *callable, zend_string **callable_name);
|
||||
ZEND_API zend_bool zend_is_callable_ex(zval *callable, zend_object *object, uint32_t check_flags, zend_string **callable_name, zend_fcall_info_cache *fcc, char **error);
|
||||
ZEND_API zend_bool zend_is_callable(zval *callable, uint32_t check_flags, zend_string **callable_name);
|
||||
ZEND_API zend_bool zend_make_callable(zval *callable, zend_string **callable_name);
|
||||
ZEND_API const char *zend_get_module_version(const char *module_name);
|
||||
ZEND_API int zend_get_module_started(const char *module_name);
|
||||
|
||||
@@ -376,7 +376,7 @@ ZEND_API zend_class_constant *zend_declare_class_constant_ex(zend_class_entry *c
|
||||
ZEND_API void zend_declare_class_constant(zend_class_entry *ce, const char *name, size_t name_length, zval *value);
|
||||
ZEND_API void zend_declare_class_constant_null(zend_class_entry *ce, const char *name, size_t name_length);
|
||||
ZEND_API void zend_declare_class_constant_long(zend_class_entry *ce, const char *name, size_t name_length, zend_long value);
|
||||
ZEND_API void zend_declare_class_constant_bool(zend_class_entry *ce, const char *name, size_t name_length, bool value);
|
||||
ZEND_API void zend_declare_class_constant_bool(zend_class_entry *ce, const char *name, size_t name_length, zend_bool value);
|
||||
ZEND_API void zend_declare_class_constant_double(zend_class_entry *ce, const char *name, size_t name_length, double value);
|
||||
ZEND_API void zend_declare_class_constant_stringl(zend_class_entry *ce, const char *name, size_t name_length, const char *value, size_t value_length);
|
||||
ZEND_API void zend_declare_class_constant_string(zend_class_entry *ce, const char *name, size_t name_length, const char *value);
|
||||
@@ -403,11 +403,11 @@ ZEND_API zend_result zend_update_static_property_double(zend_class_entry *scope,
|
||||
ZEND_API zend_result zend_update_static_property_string(zend_class_entry *scope, const char *name, size_t name_length, const char *value);
|
||||
ZEND_API zend_result zend_update_static_property_stringl(zend_class_entry *scope, const char *name, size_t name_length, const char *value, size_t value_length);
|
||||
|
||||
ZEND_API zval *zend_read_property_ex(zend_class_entry *scope, zend_object *object, zend_string *name, bool silent, zval *rv);
|
||||
ZEND_API zval *zend_read_property(zend_class_entry *scope, zend_object *object, const char *name, size_t name_length, bool silent, zval *rv);
|
||||
ZEND_API zval *zend_read_property_ex(zend_class_entry *scope, zend_object *object, zend_string *name, zend_bool silent, zval *rv);
|
||||
ZEND_API zval *zend_read_property(zend_class_entry *scope, zend_object *object, const char *name, size_t name_length, zend_bool silent, zval *rv);
|
||||
|
||||
ZEND_API zval *zend_read_static_property_ex(zend_class_entry *scope, zend_string *name, bool silent);
|
||||
ZEND_API zval *zend_read_static_property(zend_class_entry *scope, const char *name, size_t name_length, bool silent);
|
||||
ZEND_API zval *zend_read_static_property_ex(zend_class_entry *scope, zend_string *name, zend_bool silent);
|
||||
ZEND_API zval *zend_read_static_property(zend_class_entry *scope, const char *name, size_t name_length, zend_bool silent);
|
||||
|
||||
ZEND_API const char *zend_get_type_by_const(int type);
|
||||
|
||||
@@ -445,9 +445,6 @@ ZEND_API void add_assoc_double_ex(zval *arg, const char *key, size_t key_len, do
|
||||
ZEND_API void add_assoc_str_ex(zval *arg, const char *key, size_t key_len, zend_string *str);
|
||||
ZEND_API void add_assoc_string_ex(zval *arg, const char *key, size_t key_len, const char *str);
|
||||
ZEND_API void add_assoc_stringl_ex(zval *arg, const char *key, size_t key_len, const char *str, size_t length);
|
||||
ZEND_API void add_assoc_array_ex(zval *arg, const char *key, size_t key_len, zend_array *arr);
|
||||
ZEND_API void add_assoc_object_ex(zval *arg, const char *key, size_t key_len, zend_object *obj);
|
||||
ZEND_API void add_assoc_reference_ex(zval *arg, const char *key, size_t key_len, zend_reference *ref);
|
||||
ZEND_API void add_assoc_zval_ex(zval *arg, const char *key, size_t key_len, zval *value);
|
||||
|
||||
#define add_assoc_long(__arg, __key, __n) add_assoc_long_ex(__arg, __key, strlen(__key), __n)
|
||||
@@ -458,9 +455,6 @@ ZEND_API void add_assoc_zval_ex(zval *arg, const char *key, size_t key_len, zval
|
||||
#define add_assoc_str(__arg, __key, __str) add_assoc_str_ex(__arg, __key, strlen(__key), __str)
|
||||
#define add_assoc_string(__arg, __key, __str) add_assoc_string_ex(__arg, __key, strlen(__key), __str)
|
||||
#define add_assoc_stringl(__arg, __key, __str, __length) add_assoc_stringl_ex(__arg, __key, strlen(__key), __str, __length)
|
||||
#define add_assoc_array(__arg, __key, __arr) add_assoc_array_ex(__arg, __key, strlen(__key), __arr)
|
||||
#define add_assoc_object(__arg, __key, __obj) add_assoc_object_ex(__arg, __key, strlen(__key), __obj)
|
||||
#define add_assoc_reference(__arg, __key, __ref) add_assoc_object_ex(__arg, __key, strlen(__key), __ref)
|
||||
#define add_assoc_zval(__arg, __key, __value) add_assoc_zval_ex(__arg, __key, strlen(__key), __value)
|
||||
|
||||
ZEND_API void add_index_long(zval *arg, zend_ulong index, zend_long n);
|
||||
@@ -471,9 +465,6 @@ ZEND_API void add_index_double(zval *arg, zend_ulong index, double d);
|
||||
ZEND_API void add_index_str(zval *arg, zend_ulong index, zend_string *str);
|
||||
ZEND_API void add_index_string(zval *arg, zend_ulong index, const char *str);
|
||||
ZEND_API void add_index_stringl(zval *arg, zend_ulong index, const char *str, size_t length);
|
||||
ZEND_API void add_index_array(zval *arg, zend_ulong index, zend_array *arr);
|
||||
ZEND_API void add_index_object(zval *arg, zend_ulong index, zend_object *obj);
|
||||
ZEND_API void add_index_reference(zval *arg, zend_ulong index, zend_reference *ref);
|
||||
|
||||
static zend_always_inline zend_result add_index_zval(zval *arg, zend_ulong index, zval *value)
|
||||
{
|
||||
@@ -482,15 +473,12 @@ static zend_always_inline zend_result add_index_zval(zval *arg, zend_ulong index
|
||||
|
||||
ZEND_API zend_result add_next_index_long(zval *arg, zend_long n);
|
||||
ZEND_API zend_result add_next_index_null(zval *arg);
|
||||
ZEND_API zend_result add_next_index_bool(zval *arg, bool b);
|
||||
ZEND_API zend_result add_next_index_bool(zval *arg, zend_bool b);
|
||||
ZEND_API zend_result add_next_index_resource(zval *arg, zend_resource *r);
|
||||
ZEND_API zend_result add_next_index_double(zval *arg, double d);
|
||||
ZEND_API zend_result add_next_index_str(zval *arg, zend_string *str);
|
||||
ZEND_API zend_result add_next_index_string(zval *arg, const char *str);
|
||||
ZEND_API zend_result add_next_index_stringl(zval *arg, const char *str, size_t length);
|
||||
ZEND_API zend_result add_next_index_array(zval *arg, zend_array *arr);
|
||||
ZEND_API zend_result add_next_index_object(zval *arg, zend_object *obj);
|
||||
ZEND_API zend_result add_next_index_reference(zval *arg, zend_reference *ref);
|
||||
|
||||
static zend_always_inline zend_result add_next_index_zval(zval *arg, zval *value)
|
||||
{
|
||||
@@ -507,9 +495,6 @@ ZEND_API void add_property_double_ex(zval *arg, const char *key, size_t key_len,
|
||||
ZEND_API void add_property_str_ex(zval *arg, const char *key, size_t key_len, zend_string *str);
|
||||
ZEND_API void add_property_string_ex(zval *arg, const char *key, size_t key_len, const char *str);
|
||||
ZEND_API void add_property_stringl_ex(zval *arg, const char *key, size_t key_len, const char *str, size_t length);
|
||||
ZEND_API void add_property_array_ex(zval *arg, const char *key, size_t key_len, zend_array *arr);
|
||||
ZEND_API void add_property_object_ex(zval *arg, const char *key, size_t key_len, zend_object *obj);
|
||||
ZEND_API void add_property_reference_ex(zval *arg, const char *key, size_t key_len, zend_reference *ref);
|
||||
ZEND_API void add_property_zval_ex(zval *arg, const char *key, size_t key_len, zval *value);
|
||||
|
||||
#define add_property_long(__arg, __key, __n) add_property_long_ex(__arg, __key, strlen(__key), __n)
|
||||
@@ -520,9 +505,6 @@ ZEND_API void add_property_zval_ex(zval *arg, const char *key, size_t key_len, z
|
||||
#define add_property_str(__arg, __key, __str) add_property_str_ex(__arg, __key, strlen(__key), __str)
|
||||
#define add_property_string(__arg, __key, __str) add_property_string_ex(__arg, __key, strlen(__key), __str)
|
||||
#define add_property_stringl(__arg, __key, __str, __length) add_property_stringl_ex(__arg, __key, strlen(__key), __str, __length)
|
||||
#define add_property_array(__arg, __key, __arr) add_property_array_ex(__arg, __key, strlen(__key), __arr)
|
||||
#define add_property_object(__arg, __key, __obj) add_property_object_ex(__arg, __key, strlen(__key), __obj)
|
||||
#define add_property_reference(__arg, __key, __ref) add_property_reference_ex(__arg, __key, strlen(__key), __ref)
|
||||
#define add_property_zval(__arg, __key, __value) add_property_zval_ex(__arg, __key, strlen(__key), __value)
|
||||
|
||||
|
||||
@@ -623,7 +605,7 @@ static zend_always_inline void zend_call_known_instance_method_with_1_params(
|
||||
ZEND_API void zend_call_known_instance_method_with_2_params(
|
||||
zend_function *fn, zend_object *object, zval *retval_ptr, zval *param1, zval *param2);
|
||||
|
||||
ZEND_API zend_result zend_set_hash_symbol(zval *symbol, const char *name, size_t name_length, bool is_ref, int num_symbol_tables, ...);
|
||||
ZEND_API zend_result zend_set_hash_symbol(zval *symbol, const char *name, size_t name_length, zend_bool is_ref, int num_symbol_tables, ...);
|
||||
|
||||
ZEND_API zend_result zend_delete_global_variable(zend_string *name);
|
||||
|
||||
@@ -648,9 +630,9 @@ static zend_always_inline zend_result zend_forbid_dynamic_call(const char *func_
|
||||
|
||||
ZEND_API ZEND_COLD const char *zend_get_object_type(const zend_class_entry *ce);
|
||||
|
||||
ZEND_API bool zend_is_iterable(zval *iterable);
|
||||
ZEND_API zend_bool zend_is_iterable(zval *iterable);
|
||||
|
||||
ZEND_API bool zend_is_countable(zval *countable);
|
||||
ZEND_API zend_bool zend_is_countable(zval *countable);
|
||||
|
||||
ZEND_API zend_result zend_get_default_from_internal_arg_info(
|
||||
zval *default_value_zval, zend_internal_arg_info *arg_info);
|
||||
@@ -797,11 +779,11 @@ END_EXTERN_C()
|
||||
|
||||
/* May modify arg in-place. Will free arg in failure case (and take ownership in success case).
|
||||
* Prefer using the ZEND_TRY_ASSIGN_* macros over these APIs. */
|
||||
ZEND_API zend_result zend_try_assign_typed_ref_ex(zend_reference *ref, zval *zv, bool strict);
|
||||
ZEND_API zend_result zend_try_assign_typed_ref_ex(zend_reference *ref, zval *zv, zend_bool strict);
|
||||
ZEND_API zend_result zend_try_assign_typed_ref(zend_reference *ref, zval *zv);
|
||||
|
||||
ZEND_API zend_result zend_try_assign_typed_ref_null(zend_reference *ref);
|
||||
ZEND_API zend_result zend_try_assign_typed_ref_bool(zend_reference *ref, bool val);
|
||||
ZEND_API zend_result zend_try_assign_typed_ref_bool(zend_reference *ref, zend_bool val);
|
||||
ZEND_API zend_result zend_try_assign_typed_ref_long(zend_reference *ref, zend_long lval);
|
||||
ZEND_API zend_result zend_try_assign_typed_ref_double(zend_reference *ref, double dval);
|
||||
ZEND_API zend_result zend_try_assign_typed_ref_empty_string(zend_reference *ref);
|
||||
@@ -811,7 +793,7 @@ ZEND_API zend_result zend_try_assign_typed_ref_stringl(zend_reference *ref, cons
|
||||
ZEND_API zend_result zend_try_assign_typed_ref_arr(zend_reference *ref, zend_array *arr);
|
||||
ZEND_API zend_result zend_try_assign_typed_ref_res(zend_reference *ref, zend_resource *res);
|
||||
ZEND_API zend_result zend_try_assign_typed_ref_zval(zend_reference *ref, zval *zv);
|
||||
ZEND_API zend_result zend_try_assign_typed_ref_zval_ex(zend_reference *ref, zval *zv, bool strict);
|
||||
ZEND_API zend_result zend_try_assign_typed_ref_zval_ex(zend_reference *ref, zval *zv, zend_bool strict);
|
||||
|
||||
#define _ZEND_TRY_ASSIGN_NULL(zv, is_ref) do { \
|
||||
zval *_zv = zv; \
|
||||
@@ -1300,8 +1282,8 @@ ZEND_API ZEND_COLD void zend_argument_value_error(uint32_t arg_num, const char *
|
||||
zval *_real_arg, *_arg = NULL; \
|
||||
zend_expected_type _expected_type = Z_EXPECTED_LONG; \
|
||||
char *_error = NULL; \
|
||||
ZEND_ATTRIBUTE_UNUSED bool _dummy; \
|
||||
bool _optional = 0; \
|
||||
ZEND_ATTRIBUTE_UNUSED zend_bool _dummy; \
|
||||
zend_bool _optional = 0; \
|
||||
int _error_code = ZPP_ERROR_OK; \
|
||||
((void)_i); \
|
||||
((void)_real_arg); \
|
||||
@@ -1332,7 +1314,6 @@ ZEND_API ZEND_COLD void zend_argument_value_error(uint32_t arg_num, const char *
|
||||
} while (0)
|
||||
|
||||
#define ZEND_PARSE_PARAMETERS_END_EX(failure) \
|
||||
ZEND_ASSERT(_i == _max_num_args || _max_num_args == (uint32_t) -1); \
|
||||
} while (0); \
|
||||
if (UNEXPECTED(_error_code != ZPP_ERROR_OK)) { \
|
||||
if (!(_flags & ZEND_PARSE_PARAMS_QUIET)) { \
|
||||
@@ -1415,14 +1396,17 @@ ZEND_API ZEND_COLD void zend_argument_value_error(uint32_t arg_num, const char *
|
||||
Z_PARAM_ITERABLE_EX(dest, 1)
|
||||
|
||||
/* old "b" */
|
||||
#define Z_PARAM_BOOL_EX(dest, is_null, check_null, deref) \
|
||||
Z_PARAM_PROLOGUE(deref, 0); \
|
||||
#define Z_PARAM_BOOL_EX2(dest, is_null, check_null, deref, separate) \
|
||||
Z_PARAM_PROLOGUE(deref, separate); \
|
||||
if (UNEXPECTED(!zend_parse_arg_bool(_arg, &dest, &is_null, check_null))) { \
|
||||
_expected_type = check_null ? Z_EXPECTED_BOOL_OR_NULL : Z_EXPECTED_BOOL; \
|
||||
_error_code = ZPP_ERROR_WRONG_ARG; \
|
||||
break; \
|
||||
}
|
||||
|
||||
#define Z_PARAM_BOOL_EX(dest, is_null, check_null, separate) \
|
||||
Z_PARAM_BOOL_EX2(dest, is_null, check_null, separate, separate)
|
||||
|
||||
#define Z_PARAM_BOOL(dest) \
|
||||
Z_PARAM_BOOL_EX(dest, _dummy, 0, 0)
|
||||
|
||||
@@ -1430,13 +1414,16 @@ ZEND_API ZEND_COLD void zend_argument_value_error(uint32_t arg_num, const char *
|
||||
Z_PARAM_BOOL_EX(dest, is_null, 1, 0)
|
||||
|
||||
/* old "C" */
|
||||
#define Z_PARAM_CLASS_EX(dest, check_null, deref) \
|
||||
Z_PARAM_PROLOGUE(deref, 0); \
|
||||
#define Z_PARAM_CLASS_EX2(dest, check_null, deref, separate) \
|
||||
Z_PARAM_PROLOGUE(deref, separate); \
|
||||
if (UNEXPECTED(!zend_parse_arg_class(_arg, &dest, _i, check_null))) { \
|
||||
_error_code = ZPP_ERROR_FAILURE; \
|
||||
break; \
|
||||
}
|
||||
|
||||
#define Z_PARAM_CLASS_EX(dest, check_null, separate) \
|
||||
Z_PARAM_CLASS_EX2(dest, check_null, separate, separate)
|
||||
|
||||
#define Z_PARAM_CLASS(dest) \
|
||||
Z_PARAM_CLASS_EX(dest, 0, 0)
|
||||
|
||||
@@ -1492,14 +1479,17 @@ ZEND_API ZEND_COLD void zend_argument_value_error(uint32_t arg_num, const char *
|
||||
Z_PARAM_OBJ_OF_CLASS_OR_STR_EX(destination_object, base_ce, destination_string, 1);
|
||||
|
||||
/* old "d" */
|
||||
#define Z_PARAM_DOUBLE_EX(dest, is_null, check_null, deref) \
|
||||
Z_PARAM_PROLOGUE(deref, 0); \
|
||||
#define Z_PARAM_DOUBLE_EX2(dest, is_null, check_null, deref, separate) \
|
||||
Z_PARAM_PROLOGUE(deref, separate); \
|
||||
if (UNEXPECTED(!zend_parse_arg_double(_arg, &dest, &is_null, check_null))) { \
|
||||
_expected_type = check_null ? Z_EXPECTED_DOUBLE_OR_NULL : Z_EXPECTED_DOUBLE; \
|
||||
_error_code = ZPP_ERROR_WRONG_ARG; \
|
||||
break; \
|
||||
}
|
||||
|
||||
#define Z_PARAM_DOUBLE_EX(dest, is_null, check_null, separate) \
|
||||
Z_PARAM_DOUBLE_EX2(dest, is_null, check_null, separate, separate)
|
||||
|
||||
#define Z_PARAM_DOUBLE(dest) \
|
||||
Z_PARAM_DOUBLE_EX(dest, _dummy, 0, 0)
|
||||
|
||||
@@ -1507,8 +1497,8 @@ ZEND_API ZEND_COLD void zend_argument_value_error(uint32_t arg_num, const char *
|
||||
Z_PARAM_DOUBLE_EX(dest, is_null, 1, 0)
|
||||
|
||||
/* old "f" */
|
||||
#define Z_PARAM_FUNC_EX(dest_fci, dest_fcc, check_null, deref) \
|
||||
Z_PARAM_PROLOGUE(deref, 0); \
|
||||
#define Z_PARAM_FUNC_EX2(dest_fci, dest_fcc, check_null, deref, separate) \
|
||||
Z_PARAM_PROLOGUE(deref, separate); \
|
||||
if (UNEXPECTED(!zend_parse_arg_func(_arg, &dest_fci, &dest_fcc, check_null, &_error))) { \
|
||||
if (!_error) { \
|
||||
_expected_type = check_null ? Z_EXPECTED_FUNC_OR_NULL : Z_EXPECTED_FUNC; \
|
||||
@@ -1519,6 +1509,9 @@ ZEND_API ZEND_COLD void zend_argument_value_error(uint32_t arg_num, const char *
|
||||
break; \
|
||||
} \
|
||||
|
||||
#define Z_PARAM_FUNC_EX(dest_fci, dest_fcc, check_null, separate) \
|
||||
Z_PARAM_FUNC_EX2(dest_fci, dest_fcc, check_null, separate, separate)
|
||||
|
||||
#define Z_PARAM_FUNC(dest_fci, dest_fcc) \
|
||||
Z_PARAM_FUNC_EX(dest_fci, dest_fcc, 0, 0)
|
||||
|
||||
@@ -1573,14 +1566,17 @@ ZEND_API ZEND_COLD void zend_argument_value_error(uint32_t arg_num, const char *
|
||||
Z_PARAM_ARRAY_OR_OBJECT_HT_EX(dest, 0, 0)
|
||||
|
||||
/* old "l" */
|
||||
#define Z_PARAM_LONG_EX(dest, is_null, check_null, deref) \
|
||||
Z_PARAM_PROLOGUE(deref, 0); \
|
||||
#define Z_PARAM_LONG_EX2(dest, is_null, check_null, deref, separate) \
|
||||
Z_PARAM_PROLOGUE(deref, separate); \
|
||||
if (UNEXPECTED(!zend_parse_arg_long(_arg, &dest, &is_null, check_null))) { \
|
||||
_expected_type = check_null ? Z_EXPECTED_LONG_OR_NULL : Z_EXPECTED_LONG; \
|
||||
_error_code = ZPP_ERROR_WRONG_ARG; \
|
||||
break; \
|
||||
}
|
||||
|
||||
#define Z_PARAM_LONG_EX(dest, is_null, check_null, separate) \
|
||||
Z_PARAM_LONG_EX2(dest, is_null, check_null, separate, separate)
|
||||
|
||||
#define Z_PARAM_LONG(dest) \
|
||||
Z_PARAM_LONG_EX(dest, _dummy, 0, 0)
|
||||
|
||||
@@ -1603,29 +1599,35 @@ ZEND_API ZEND_COLD void zend_argument_value_error(uint32_t arg_num, const char *
|
||||
Z_PARAM_NUMBER_EX(dest, 0)
|
||||
|
||||
/* old "o" */
|
||||
#define Z_PARAM_OBJECT_EX(dest, check_null, deref) \
|
||||
Z_PARAM_PROLOGUE(deref, 0); \
|
||||
#define Z_PARAM_OBJECT_EX2(dest, check_null, deref, separate) \
|
||||
Z_PARAM_PROLOGUE(deref, separate); \
|
||||
if (UNEXPECTED(!zend_parse_arg_object(_arg, &dest, NULL, check_null))) { \
|
||||
_expected_type = check_null ? Z_EXPECTED_OBJECT_OR_NULL : Z_EXPECTED_OBJECT; \
|
||||
_error_code = ZPP_ERROR_WRONG_ARG; \
|
||||
break; \
|
||||
}
|
||||
|
||||
#define Z_PARAM_OBJECT_EX(dest, check_null, separate) \
|
||||
Z_PARAM_OBJECT_EX2(dest, check_null, separate, separate)
|
||||
|
||||
#define Z_PARAM_OBJECT(dest) \
|
||||
Z_PARAM_OBJECT_EX(dest, 0, 0)
|
||||
|
||||
#define Z_PARAM_OBJECT_OR_NULL(dest) \
|
||||
Z_PARAM_OBJECT_EX(dest, 1, 0)
|
||||
|
||||
/* The same as Z_PARAM_OBJECT_EX except that dest is a zend_object rather than a zval */
|
||||
#define Z_PARAM_OBJ_EX(dest, check_null, deref) \
|
||||
Z_PARAM_PROLOGUE(deref, 0); \
|
||||
/* The same as Z_PARAM_OBJECT_EX2 except that dest is a zend_object rather than a zval */
|
||||
#define Z_PARAM_OBJ_EX2(dest, check_null, deref, separate) \
|
||||
Z_PARAM_PROLOGUE(deref, separate); \
|
||||
if (UNEXPECTED(!zend_parse_arg_obj(_arg, &dest, NULL, check_null))) { \
|
||||
_expected_type = check_null ? Z_EXPECTED_OBJECT_OR_NULL : Z_EXPECTED_OBJECT; \
|
||||
_error_code = ZPP_ERROR_WRONG_ARG; \
|
||||
break; \
|
||||
}
|
||||
|
||||
#define Z_PARAM_OBJ_EX(dest, check_null, separate) \
|
||||
Z_PARAM_OBJ_EX2(dest, check_null, separate, separate)
|
||||
|
||||
#define Z_PARAM_OBJ(dest) \
|
||||
Z_PARAM_OBJ_EX(dest, 0, 0)
|
||||
|
||||
@@ -1633,8 +1635,8 @@ ZEND_API ZEND_COLD void zend_argument_value_error(uint32_t arg_num, const char *
|
||||
Z_PARAM_OBJ_EX(dest, 1, 0)
|
||||
|
||||
/* old "O" */
|
||||
#define Z_PARAM_OBJECT_OF_CLASS_EX(dest, _ce, check_null, deref) \
|
||||
Z_PARAM_PROLOGUE(deref, 0); \
|
||||
#define Z_PARAM_OBJECT_OF_CLASS_EX2(dest, _ce, check_null, deref, separate) \
|
||||
Z_PARAM_PROLOGUE(deref, separate); \
|
||||
if (UNEXPECTED(!zend_parse_arg_object(_arg, &dest, _ce, check_null))) { \
|
||||
if (_ce) { \
|
||||
_error = ZSTR_VAL((_ce)->name); \
|
||||
@@ -1647,15 +1649,18 @@ ZEND_API ZEND_COLD void zend_argument_value_error(uint32_t arg_num, const char *
|
||||
} \
|
||||
}
|
||||
|
||||
#define Z_PARAM_OBJECT_OF_CLASS_EX(dest, _ce, check_null, separate) \
|
||||
Z_PARAM_OBJECT_OF_CLASS_EX2(dest, _ce, check_null, separate, separate)
|
||||
|
||||
#define Z_PARAM_OBJECT_OF_CLASS(dest, _ce) \
|
||||
Z_PARAM_OBJECT_OF_CLASS_EX(dest, _ce, 0, 0)
|
||||
|
||||
#define Z_PARAM_OBJECT_OF_CLASS_OR_NULL(dest, _ce) \
|
||||
Z_PARAM_OBJECT_OF_CLASS_EX(dest, _ce, 1, 0)
|
||||
|
||||
/* The same as Z_PARAM_OBJECT_OF_CLASS_EX except that dest is a zend_object rather than a zval */
|
||||
#define Z_PARAM_OBJ_OF_CLASS_EX(dest, _ce, check_null, deref) \
|
||||
Z_PARAM_PROLOGUE(deref, 0); \
|
||||
/* The same as Z_PARAM_OBJECT_OF_CLASS_EX2 except that dest is a zend_object rather than a zval */
|
||||
#define Z_PARAM_OBJ_OF_CLASS_EX2(dest, _ce, check_null, deref, separate) \
|
||||
Z_PARAM_PROLOGUE(deref, separate); \
|
||||
if (UNEXPECTED(!zend_parse_arg_obj(_arg, &dest, _ce, check_null))) { \
|
||||
if (_ce) { \
|
||||
_error = ZSTR_VAL((_ce)->name); \
|
||||
@@ -1668,6 +1673,9 @@ ZEND_API ZEND_COLD void zend_argument_value_error(uint32_t arg_num, const char *
|
||||
} \
|
||||
}
|
||||
|
||||
#define Z_PARAM_OBJ_OF_CLASS_EX(dest, _ce, check_null, separate) \
|
||||
Z_PARAM_OBJ_OF_CLASS_EX2(dest, _ce, check_null, separate, separate)
|
||||
|
||||
#define Z_PARAM_OBJ_OF_CLASS(dest, _ce) \
|
||||
Z_PARAM_OBJ_OF_CLASS_EX(dest, _ce, 0, 0)
|
||||
|
||||
@@ -1689,14 +1697,17 @@ ZEND_API ZEND_COLD void zend_argument_value_error(uint32_t arg_num, const char *
|
||||
Z_PARAM_OBJ_OF_CLASS_OR_LONG_EX(dest_obj, _ce, dest_long, is_null, 1)
|
||||
|
||||
/* old "p" */
|
||||
#define Z_PARAM_PATH_EX(dest, dest_len, check_null, deref) \
|
||||
Z_PARAM_PROLOGUE(deref, 0); \
|
||||
#define Z_PARAM_PATH_EX2(dest, dest_len, check_null, deref, separate) \
|
||||
Z_PARAM_PROLOGUE(deref, separate); \
|
||||
if (UNEXPECTED(!zend_parse_arg_path(_arg, &dest, &dest_len, check_null))) { \
|
||||
_expected_type = check_null ? Z_EXPECTED_PATH_OR_NULL : Z_EXPECTED_PATH; \
|
||||
_error_code = ZPP_ERROR_WRONG_ARG; \
|
||||
break; \
|
||||
}
|
||||
|
||||
#define Z_PARAM_PATH_EX(dest, dest_len, check_null, separate) \
|
||||
Z_PARAM_PATH_EX2(dest, dest_len, check_null, separate, separate)
|
||||
|
||||
#define Z_PARAM_PATH(dest, dest_len) \
|
||||
Z_PARAM_PATH_EX(dest, dest_len, 0, 0)
|
||||
|
||||
@@ -1704,14 +1715,17 @@ ZEND_API ZEND_COLD void zend_argument_value_error(uint32_t arg_num, const char *
|
||||
Z_PARAM_PATH_EX(dest, dest_len, 1, 0)
|
||||
|
||||
/* old "P" */
|
||||
#define Z_PARAM_PATH_STR_EX(dest, check_null, deref) \
|
||||
Z_PARAM_PROLOGUE(deref, 0); \
|
||||
#define Z_PARAM_PATH_STR_EX2(dest, check_null, deref, separate) \
|
||||
Z_PARAM_PROLOGUE(deref, separate); \
|
||||
if (UNEXPECTED(!zend_parse_arg_path_str(_arg, &dest, check_null))) { \
|
||||
_expected_type = check_null ? Z_EXPECTED_PATH_OR_NULL : Z_EXPECTED_PATH; \
|
||||
_error_code = ZPP_ERROR_WRONG_ARG; \
|
||||
break; \
|
||||
}
|
||||
|
||||
#define Z_PARAM_PATH_STR_EX(dest, check_null, separate) \
|
||||
Z_PARAM_PATH_STR_EX2(dest, check_null, separate, separate)
|
||||
|
||||
#define Z_PARAM_PATH_STR(dest) \
|
||||
Z_PARAM_PATH_STR_EX(dest, 0, 0)
|
||||
|
||||
@@ -1719,14 +1733,17 @@ ZEND_API ZEND_COLD void zend_argument_value_error(uint32_t arg_num, const char *
|
||||
Z_PARAM_PATH_STR_EX(dest, 1, 0)
|
||||
|
||||
/* old "r" */
|
||||
#define Z_PARAM_RESOURCE_EX(dest, check_null, deref) \
|
||||
Z_PARAM_PROLOGUE(deref, 0); \
|
||||
#define Z_PARAM_RESOURCE_EX2(dest, check_null, deref, separate) \
|
||||
Z_PARAM_PROLOGUE(deref, separate); \
|
||||
if (UNEXPECTED(!zend_parse_arg_resource(_arg, &dest, check_null))) { \
|
||||
_expected_type = check_null ? Z_EXPECTED_RESOURCE_OR_NULL : Z_EXPECTED_RESOURCE; \
|
||||
_error_code = ZPP_ERROR_WRONG_ARG; \
|
||||
break; \
|
||||
}
|
||||
|
||||
#define Z_PARAM_RESOURCE_EX(dest, check_null, separate) \
|
||||
Z_PARAM_RESOURCE_EX2(dest, check_null, separate, separate)
|
||||
|
||||
#define Z_PARAM_RESOURCE(dest) \
|
||||
Z_PARAM_RESOURCE_EX(dest, 0, 0)
|
||||
|
||||
@@ -1734,14 +1751,17 @@ ZEND_API ZEND_COLD void zend_argument_value_error(uint32_t arg_num, const char *
|
||||
Z_PARAM_RESOURCE_EX(dest, 1, 0)
|
||||
|
||||
/* old "s" */
|
||||
#define Z_PARAM_STRING_EX(dest, dest_len, check_null, deref) \
|
||||
Z_PARAM_PROLOGUE(deref, 0); \
|
||||
#define Z_PARAM_STRING_EX2(dest, dest_len, check_null, deref, separate) \
|
||||
Z_PARAM_PROLOGUE(deref, separate); \
|
||||
if (UNEXPECTED(!zend_parse_arg_string(_arg, &dest, &dest_len, check_null))) { \
|
||||
_expected_type = check_null ? Z_EXPECTED_STRING_OR_NULL : Z_EXPECTED_STRING; \
|
||||
_error_code = ZPP_ERROR_WRONG_ARG; \
|
||||
break; \
|
||||
}
|
||||
|
||||
#define Z_PARAM_STRING_EX(dest, dest_len, check_null, separate) \
|
||||
Z_PARAM_STRING_EX2(dest, dest_len, check_null, separate, separate)
|
||||
|
||||
#define Z_PARAM_STRING(dest, dest_len) \
|
||||
Z_PARAM_STRING_EX(dest, dest_len, 0, 0)
|
||||
|
||||
@@ -1749,14 +1769,17 @@ ZEND_API ZEND_COLD void zend_argument_value_error(uint32_t arg_num, const char *
|
||||
Z_PARAM_STRING_EX(dest, dest_len, 1, 0)
|
||||
|
||||
/* old "S" */
|
||||
#define Z_PARAM_STR_EX(dest, check_null, deref) \
|
||||
Z_PARAM_PROLOGUE(deref, 0); \
|
||||
#define Z_PARAM_STR_EX2(dest, check_null, deref, separate) \
|
||||
Z_PARAM_PROLOGUE(deref, separate); \
|
||||
if (UNEXPECTED(!zend_parse_arg_str(_arg, &dest, check_null))) { \
|
||||
_expected_type = check_null ? Z_EXPECTED_STRING_OR_NULL : Z_EXPECTED_STRING; \
|
||||
_error_code = ZPP_ERROR_WRONG_ARG; \
|
||||
break; \
|
||||
}
|
||||
|
||||
#define Z_PARAM_STR_EX(dest, check_null, separate) \
|
||||
Z_PARAM_STR_EX2(dest, check_null, separate, separate)
|
||||
|
||||
#define Z_PARAM_STR(dest) \
|
||||
Z_PARAM_STR_EX(dest, 0, 0)
|
||||
|
||||
@@ -1847,8 +1870,8 @@ ZEND_API ZEND_COLD void zend_argument_value_error(uint32_t arg_num, const char *
|
||||
/* Inlined implementations shared by new and old parameter parsing APIs */
|
||||
|
||||
ZEND_API bool ZEND_FASTCALL zend_parse_arg_class(zval *arg, zend_class_entry **pce, uint32_t num, bool check_null);
|
||||
ZEND_API bool ZEND_FASTCALL zend_parse_arg_bool_slow(zval *arg, bool *dest);
|
||||
ZEND_API bool ZEND_FASTCALL zend_parse_arg_bool_weak(zval *arg, bool *dest);
|
||||
ZEND_API bool ZEND_FASTCALL zend_parse_arg_bool_slow(zval *arg, zend_bool *dest);
|
||||
ZEND_API bool ZEND_FASTCALL zend_parse_arg_bool_weak(zval *arg, zend_bool *dest);
|
||||
ZEND_API bool ZEND_FASTCALL zend_parse_arg_long_slow(zval *arg, zend_long *dest);
|
||||
ZEND_API bool ZEND_FASTCALL zend_parse_arg_long_weak(zval *arg, zend_long *dest);
|
||||
ZEND_API bool ZEND_FASTCALL zend_parse_arg_double_slow(zval *arg, double *dest);
|
||||
@@ -1858,7 +1881,7 @@ ZEND_API bool ZEND_FASTCALL zend_parse_arg_str_weak(zval *arg, zend_string **des
|
||||
ZEND_API bool ZEND_FASTCALL zend_parse_arg_number_slow(zval *arg, zval **dest);
|
||||
ZEND_API bool ZEND_FASTCALL zend_parse_arg_str_or_long_slow(zval *arg, zend_string **dest_str, zend_long *dest_long);
|
||||
|
||||
static zend_always_inline bool zend_parse_arg_bool(zval *arg, bool *dest, bool *is_null, bool check_null)
|
||||
static zend_always_inline bool zend_parse_arg_bool(zval *arg, zend_bool *dest, zend_bool *is_null, bool check_null)
|
||||
{
|
||||
if (check_null) {
|
||||
*is_null = 0;
|
||||
@@ -1876,7 +1899,7 @@ static zend_always_inline bool zend_parse_arg_bool(zval *arg, bool *dest, bool *
|
||||
return 1;
|
||||
}
|
||||
|
||||
static zend_always_inline bool zend_parse_arg_long(zval *arg, zend_long *dest, bool *is_null, bool check_null)
|
||||
static zend_always_inline bool zend_parse_arg_long(zval *arg, zend_long *dest, zend_bool *is_null, bool check_null)
|
||||
{
|
||||
if (check_null) {
|
||||
*is_null = 0;
|
||||
@@ -1892,7 +1915,7 @@ static zend_always_inline bool zend_parse_arg_long(zval *arg, zend_long *dest, b
|
||||
return 1;
|
||||
}
|
||||
|
||||
static zend_always_inline bool zend_parse_arg_double(zval *arg, double *dest, bool *is_null, bool check_null)
|
||||
static zend_always_inline bool zend_parse_arg_double(zval *arg, double *dest, zend_bool *is_null, bool check_null)
|
||||
{
|
||||
if (check_null) {
|
||||
*is_null = 0;
|
||||
@@ -2027,7 +2050,7 @@ static zend_always_inline bool zend_parse_arg_array_ht(zval *arg, HashTable **de
|
||||
}
|
||||
|
||||
static zend_always_inline bool zend_parse_arg_array_ht_or_long(
|
||||
zval *arg, HashTable **dest_ht, zend_long *dest_long, bool *is_null, bool allow_null
|
||||
zval *arg, HashTable **dest_ht, zend_long *dest_long, zend_bool *is_null, bool allow_null
|
||||
) {
|
||||
if (allow_null) {
|
||||
*is_null = 0;
|
||||
@@ -2076,7 +2099,7 @@ static zend_always_inline bool zend_parse_arg_obj(zval *arg, zend_object **dest,
|
||||
}
|
||||
|
||||
static zend_always_inline bool zend_parse_arg_obj_or_long(
|
||||
zval *arg, zend_object **dest_obj, zend_class_entry *ce, zend_long *dest_long, bool *is_null, bool allow_null
|
||||
zval *arg, zend_object **dest_obj, zend_class_entry *ce, zend_long *dest_long, zend_bool *is_null, bool allow_null
|
||||
) {
|
||||
if (allow_null) {
|
||||
*is_null = 0;
|
||||
@@ -2159,7 +2182,7 @@ static zend_always_inline bool zend_parse_arg_array_ht_or_str(
|
||||
}
|
||||
|
||||
static zend_always_inline bool zend_parse_arg_str_or_long(zval *arg, zend_string **dest_str, zend_long *dest_long,
|
||||
bool *is_null, bool allow_null)
|
||||
zend_bool *is_null, bool allow_null)
|
||||
{
|
||||
if (allow_null) {
|
||||
*is_null = 0;
|
||||
|
||||
+4
-4
@@ -117,7 +117,7 @@ static size_t _real_page_size = ZEND_MM_PAGE_SIZE;
|
||||
/* Mac allows to track anonymous page via vmmap per TAG id.
|
||||
* user land applications are allowed to take from 240 to 255.
|
||||
*/
|
||||
# define ZEND_MM_FD (250u << 24u)
|
||||
# define ZEND_MM_FD (250<<24)
|
||||
#endif
|
||||
|
||||
#ifndef ZEND_MM_STAT
|
||||
@@ -1099,7 +1099,7 @@ static zend_always_inline void zend_mm_free_pages_ex(zend_mm_heap *heap, zend_mm
|
||||
/* this setting may be not accurate */
|
||||
chunk->free_tail = page_num;
|
||||
}
|
||||
if (free_chunk && chunk->free_pages == ZEND_MM_PAGES - ZEND_MM_FIRST_PAGE) {
|
||||
if (free_chunk && chunk != heap->main_chunk && chunk->free_pages == ZEND_MM_PAGES - ZEND_MM_FIRST_PAGE) {
|
||||
zend_mm_delete_chunk(heap, chunk);
|
||||
}
|
||||
}
|
||||
@@ -1510,7 +1510,7 @@ static zend_never_inline void *zend_mm_realloc_huge(zend_mm_heap *heap, void *pt
|
||||
return zend_mm_realloc_slow(heap, ptr, size, MIN(old_size, copy_size) ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
|
||||
}
|
||||
|
||||
static zend_always_inline void *zend_mm_realloc_heap(zend_mm_heap *heap, void *ptr, size_t size, bool use_copy_size, size_t copy_size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
|
||||
static zend_always_inline void *zend_mm_realloc_heap(zend_mm_heap *heap, void *ptr, size_t size, zend_bool use_copy_size, size_t copy_size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
|
||||
{
|
||||
size_t page_offset;
|
||||
size_t old_size;
|
||||
@@ -2789,7 +2789,7 @@ static void alloc_globals_ctor(zend_alloc_globals *alloc_globals)
|
||||
#if ZEND_MM_CUSTOM
|
||||
tmp = getenv("USE_ZEND_ALLOC");
|
||||
if (tmp && !zend_atoi(tmp, 0)) {
|
||||
bool tracked = (tmp = getenv("USE_TRACKED_ALLOC")) && zend_atoi(tmp, 0);
|
||||
zend_bool tracked = (tmp = getenv("USE_TRACKED_ALLOC")) && zend_atoi(tmp, 0);
|
||||
zend_mm_heap *mm_heap = alloc_globals->mm_heap = malloc(sizeof(zend_mm_heap));
|
||||
memset(mm_heap, 0, sizeof(zend_mm_heap));
|
||||
mm_heap->use_custom_heap = ZEND_MM_CUSTOM_HEAP_STD;
|
||||
|
||||
+2
-2
@@ -110,7 +110,7 @@ static zend_always_inline void zend_arena_release(zend_arena **arena_ptr, void *
|
||||
arena->ptr = (char*)checkpoint;
|
||||
}
|
||||
|
||||
static zend_always_inline bool zend_arena_contains(zend_arena *arena, void *ptr)
|
||||
static zend_always_inline zend_bool zend_arena_contains(zend_arena *arena, void *ptr)
|
||||
{
|
||||
while (arena) {
|
||||
if ((char*)ptr > (char*)arena && (char*)ptr <= arena->ptr) {
|
||||
@@ -213,7 +213,7 @@ static zend_always_inline void zend_arena_release(zend_arena **arena_ptr, void *
|
||||
}
|
||||
}
|
||||
|
||||
static zend_always_inline bool zend_arena_contains(zend_arena *arena, void *ptr)
|
||||
static zend_always_inline zend_bool zend_arena_contains(zend_arena *arena, void *ptr)
|
||||
{
|
||||
/* TODO: Dummy */
|
||||
return 1;
|
||||
|
||||
+3
-3
@@ -423,7 +423,7 @@ ZEND_API zend_ast *zend_ast_create_list(uint32_t init_children, zend_ast_kind ki
|
||||
}
|
||||
#endif
|
||||
|
||||
static inline bool is_power_of_two(uint32_t n) {
|
||||
static inline zend_bool is_power_of_two(uint32_t n) {
|
||||
return ((n != 0) && (n == (n & (~n + 1))));
|
||||
}
|
||||
|
||||
@@ -1375,7 +1375,7 @@ static ZEND_COLD void zend_ast_export_attribute_group(smart_str *str, zend_ast *
|
||||
}
|
||||
}
|
||||
|
||||
static ZEND_COLD void zend_ast_export_attributes(smart_str *str, zend_ast *ast, int indent, bool newlines) {
|
||||
static ZEND_COLD void zend_ast_export_attributes(smart_str *str, zend_ast *ast, int indent, zend_bool newlines) {
|
||||
zend_ast_list *list = zend_ast_get_list(ast);
|
||||
uint32_t i;
|
||||
|
||||
@@ -1497,7 +1497,7 @@ tail_call:
|
||||
case ZEND_AST_METHOD:
|
||||
decl = (zend_ast_decl *) ast;
|
||||
if (decl->child[4]) {
|
||||
bool newlines = !(ast->kind == ZEND_AST_CLOSURE || ast->kind == ZEND_AST_ARROW_FUNC);
|
||||
zend_bool newlines = !(ast->kind == ZEND_AST_CLOSURE || ast->kind == ZEND_AST_ARROW_FUNC);
|
||||
zend_ast_export_attributes(str, decl->child[4], indent, newlines);
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -301,11 +301,11 @@ ZEND_API void ZEND_FASTCALL zend_ast_ref_destroy(zend_ast_ref *ast);
|
||||
typedef void (*zend_ast_apply_func)(zend_ast **ast_ptr);
|
||||
ZEND_API void zend_ast_apply(zend_ast *ast, zend_ast_apply_func fn);
|
||||
|
||||
static zend_always_inline bool zend_ast_is_special(zend_ast *ast) {
|
||||
static zend_always_inline zend_bool zend_ast_is_special(zend_ast *ast) {
|
||||
return (ast->kind >> ZEND_AST_SPECIAL_SHIFT) & 1;
|
||||
}
|
||||
|
||||
static zend_always_inline bool zend_ast_is_list(zend_ast *ast) {
|
||||
static zend_always_inline zend_bool zend_ast_is_list(zend_ast *ast) {
|
||||
return (ast->kind >> ZEND_AST_IS_LIST_SHIFT) & 1;
|
||||
}
|
||||
static zend_always_inline zend_ast_list *zend_ast_get_list(zend_ast *ast) {
|
||||
|
||||
@@ -42,7 +42,7 @@ void validate_attribute(zend_attribute *attr, uint32_t target, zend_class_entry
|
||||
|
||||
if (Z_TYPE(flags) != IS_LONG) {
|
||||
zend_error_noreturn(E_ERROR,
|
||||
"Attribute::__construct(): Argument #1 ($flags) must must be of type int, %s given",
|
||||
"Attribute::__construct(): Argument #1 ($flags) must be of type int, %s given",
|
||||
zend_zval_type_name(&flags)
|
||||
);
|
||||
}
|
||||
@@ -163,7 +163,7 @@ ZEND_API zend_string *zend_get_attribute_target_names(uint32_t flags)
|
||||
return smart_str_extract(&str);
|
||||
}
|
||||
|
||||
ZEND_API bool zend_is_attribute_repeated(HashTable *attributes, zend_attribute *attr)
|
||||
ZEND_API zend_bool zend_is_attribute_repeated(HashTable *attributes, zend_attribute *attr)
|
||||
{
|
||||
zend_attribute *other;
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@ ZEND_API zend_attribute *zend_get_parameter_attribute_str(HashTable *attributes,
|
||||
ZEND_API zend_result zend_get_attribute_value(zval *ret, zend_attribute *attr, uint32_t i, zend_class_entry *scope);
|
||||
|
||||
ZEND_API zend_string *zend_get_attribute_target_names(uint32_t targets);
|
||||
ZEND_API bool zend_is_attribute_repeated(HashTable *attributes, zend_attribute *attr);
|
||||
ZEND_API zend_bool zend_is_attribute_repeated(HashTable *attributes, zend_attribute *attr);
|
||||
|
||||
ZEND_API zend_internal_attribute *zend_internal_attribute_register(zend_class_entry *ce, uint32_t flags);
|
||||
ZEND_API zend_internal_attribute *zend_internal_attribute_get(zend_string *lcname);
|
||||
|
||||
+3
-3
@@ -122,7 +122,7 @@ static inline uint32_t zend_bitset_len(uint32_t n)
|
||||
return (n + ((sizeof(zend_long) * 8) - 1)) / (sizeof(zend_long) * 8);
|
||||
}
|
||||
|
||||
static inline bool zend_bitset_in(zend_bitset set, uint32_t n)
|
||||
static inline zend_bool zend_bitset_in(zend_bitset set, uint32_t n)
|
||||
{
|
||||
return ZEND_BIT_TEST(set, n);
|
||||
}
|
||||
@@ -158,7 +158,7 @@ static inline void zend_bitset_fill(zend_bitset set, uint32_t len)
|
||||
memset(set, 0xff, len * ZEND_BITSET_ELM_SIZE);
|
||||
}
|
||||
|
||||
static inline bool zend_bitset_equal(zend_bitset set1, zend_bitset set2, uint32_t len)
|
||||
static inline zend_bool zend_bitset_equal(zend_bitset set1, zend_bitset set2, uint32_t len)
|
||||
{
|
||||
return memcmp(set1, set2, len * ZEND_BITSET_ELM_SIZE) == 0;
|
||||
}
|
||||
@@ -213,7 +213,7 @@ static inline void zend_bitset_union_with_difference(zend_bitset set1, zend_bits
|
||||
}
|
||||
}
|
||||
|
||||
static inline bool zend_bitset_subset(zend_bitset set1, zend_bitset set2, uint32_t len)
|
||||
static inline zend_bool zend_bitset_subset(zend_bitset set1, zend_bitset set2, uint32_t len)
|
||||
{
|
||||
uint32_t i;
|
||||
|
||||
|
||||
@@ -370,7 +370,7 @@ ZEND_FUNCTION(strncasecmp)
|
||||
ZEND_FUNCTION(error_reporting)
|
||||
{
|
||||
zend_long err;
|
||||
bool err_is_null = 1;
|
||||
zend_bool err_is_null = 1;
|
||||
int old_error_reporting;
|
||||
|
||||
ZEND_PARSE_PARAMETERS_START(0, 1)
|
||||
@@ -426,7 +426,7 @@ static bool validate_constant_array_argument(HashTable *ht, int argument_number)
|
||||
zval *val;
|
||||
|
||||
GC_PROTECT_RECURSION(ht);
|
||||
ZEND_HASH_FOREACH_VAL(ht, val) {
|
||||
ZEND_HASH_FOREACH_VAL_IND(ht, val) {
|
||||
ZVAL_DEREF(val);
|
||||
if (Z_REFCOUNTED_P(val)) {
|
||||
if (Z_TYPE_P(val) == IS_ARRAY) {
|
||||
@@ -459,7 +459,7 @@ static void copy_constant_array(zval *dst, zval *src) /* {{{ */
|
||||
zval *new_val, *val;
|
||||
|
||||
array_init_size(dst, zend_hash_num_elements(Z_ARRVAL_P(src)));
|
||||
ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(src), idx, key, val) {
|
||||
ZEND_HASH_FOREACH_KEY_VAL_IND(Z_ARRVAL_P(src), idx, key, val) {
|
||||
/* constant arrays can't contain references */
|
||||
ZVAL_DEREF(val);
|
||||
if (key) {
|
||||
@@ -483,7 +483,7 @@ ZEND_FUNCTION(define)
|
||||
{
|
||||
zend_string *name;
|
||||
zval *val, val_free;
|
||||
bool non_cs = 0;
|
||||
zend_bool non_cs = 0;
|
||||
zend_constant c;
|
||||
|
||||
ZEND_PARSE_PARAMETERS_START(2, 3)
|
||||
@@ -631,14 +631,14 @@ ZEND_FUNCTION(get_parent_class)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
static void is_a_impl(INTERNAL_FUNCTION_PARAMETERS, bool only_subclass) /* {{{ */
|
||||
static void is_a_impl(INTERNAL_FUNCTION_PARAMETERS, zend_bool only_subclass) /* {{{ */
|
||||
{
|
||||
zval *obj;
|
||||
zend_string *class_name;
|
||||
zend_class_entry *instance_ce;
|
||||
zend_class_entry *ce;
|
||||
bool allow_string = only_subclass;
|
||||
bool retval;
|
||||
zend_bool allow_string = only_subclass;
|
||||
zend_bool retval;
|
||||
|
||||
ZEND_PARSE_PARAMETERS_START(2, 3)
|
||||
Z_PARAM_ZVAL(obj)
|
||||
@@ -769,6 +769,7 @@ ZEND_FUNCTION(get_class_vars)
|
||||
/* {{{ Returns an array of object properties */
|
||||
ZEND_FUNCTION(get_object_vars)
|
||||
{
|
||||
zval *obj;
|
||||
zval *value;
|
||||
HashTable *properties;
|
||||
zend_string *key;
|
||||
@@ -776,9 +777,10 @@ ZEND_FUNCTION(get_object_vars)
|
||||
zend_ulong num_key;
|
||||
|
||||
ZEND_PARSE_PARAMETERS_START(1, 1)
|
||||
Z_PARAM_OBJ(zobj)
|
||||
Z_PARAM_OBJECT(obj)
|
||||
ZEND_PARSE_PARAMETERS_END();
|
||||
|
||||
zobj = Z_OBJ_P(obj);
|
||||
properties = zobj->handlers->get_properties(zobj);
|
||||
if (properties == NULL) {
|
||||
RETURN_EMPTY_ARRAY();
|
||||
@@ -794,7 +796,7 @@ ZEND_FUNCTION(get_object_vars)
|
||||
array_init_size(return_value, zend_hash_num_elements(properties));
|
||||
|
||||
ZEND_HASH_FOREACH_KEY_VAL(properties, num_key, key, value) {
|
||||
bool is_dynamic = 1;
|
||||
zend_bool is_dynamic = 1;
|
||||
if (Z_TYPE_P(value) == IS_INDIRECT) {
|
||||
value = Z_INDIRECT_P(value);
|
||||
if (UNEXPECTED(Z_ISUNDEF_P(value))) {
|
||||
@@ -837,22 +839,22 @@ ZEND_FUNCTION(get_object_vars)
|
||||
/* {{{ Returns an array of mangled object properties. Does not respect property visibility. */
|
||||
ZEND_FUNCTION(get_mangled_object_vars)
|
||||
{
|
||||
zend_object *obj;
|
||||
zval *obj;
|
||||
HashTable *properties;
|
||||
|
||||
ZEND_PARSE_PARAMETERS_START(1, 1)
|
||||
Z_PARAM_OBJ(obj)
|
||||
Z_PARAM_OBJECT(obj)
|
||||
ZEND_PARSE_PARAMETERS_END();
|
||||
|
||||
properties = obj->handlers->get_properties(obj);
|
||||
properties = Z_OBJ_HT_P(obj)->get_properties(Z_OBJ_P(obj));
|
||||
if (!properties) {
|
||||
ZVAL_EMPTY_ARRAY(return_value);
|
||||
return;
|
||||
}
|
||||
|
||||
properties = zend_proptable_to_symtable(properties,
|
||||
(obj->ce->default_properties_count ||
|
||||
obj->handlers != &std_object_handlers ||
|
||||
(Z_OBJCE_P(obj)->default_properties_count ||
|
||||
Z_OBJ_P(obj)->handlers != &std_object_handlers ||
|
||||
GC_IS_RECURSIVE(properties)));
|
||||
RETURN_ARR(properties);
|
||||
}
|
||||
@@ -1007,7 +1009,7 @@ static inline void class_exists_impl(INTERNAL_FUNCTION_PARAMETERS, int flags, in
|
||||
zend_string *name;
|
||||
zend_string *lcname;
|
||||
zend_class_entry *ce;
|
||||
bool autoload = 1;
|
||||
zend_bool autoload = 1;
|
||||
|
||||
ZEND_PARSE_PARAMETERS_START(1, 2)
|
||||
Z_PARAM_STR(name)
|
||||
@@ -1063,7 +1065,7 @@ ZEND_FUNCTION(trait_exists)
|
||||
ZEND_FUNCTION(function_exists)
|
||||
{
|
||||
zend_string *name;
|
||||
bool exists;
|
||||
zend_bool exists;
|
||||
zend_string *lcname;
|
||||
|
||||
ZEND_PARSE_PARAMETERS_START(1, 1)
|
||||
@@ -1092,7 +1094,7 @@ ZEND_FUNCTION(class_alias)
|
||||
char *alias_name;
|
||||
zend_class_entry *ce;
|
||||
size_t alias_name_len;
|
||||
bool autoload = 1;
|
||||
zend_bool autoload = 1;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "Ss|b", &class_name, &alias_name, &alias_name_len, &autoload) == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
@@ -1326,7 +1328,7 @@ ZEND_FUNCTION(get_defined_functions)
|
||||
zval internal, user;
|
||||
zend_string *key;
|
||||
zend_function *func;
|
||||
bool exclude_disabled = 1;
|
||||
zend_bool exclude_disabled = 1;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|b", &exclude_disabled) == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
@@ -1474,7 +1476,7 @@ static void add_zendext_info(zend_extension *ext, void *arg) /* {{{ */
|
||||
/* {{{ Return an array containing names of loaded extensions */
|
||||
ZEND_FUNCTION(get_loaded_extensions)
|
||||
{
|
||||
bool zendext = 0;
|
||||
zend_bool zendext = 0;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|b", &zendext) == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
@@ -1497,7 +1499,7 @@ ZEND_FUNCTION(get_loaded_extensions)
|
||||
/* {{{ Return an array containing the names and values of all defined constants */
|
||||
ZEND_FUNCTION(get_defined_constants)
|
||||
{
|
||||
bool categorize = 0;
|
||||
zend_bool categorize = 0;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|b", &categorize) == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
@@ -1666,7 +1668,7 @@ void debug_print_backtrace_args(zval *arg_array) /* {{{ */
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
static inline bool skip_internal_handler(zend_execute_data *skip) /* {{{ */
|
||||
static inline zend_bool skip_internal_handler(zend_execute_data *skip) /* {{{ */
|
||||
{
|
||||
return !(skip->func && ZEND_USER_CODE(skip->func->common.type))
|
||||
&& skip->prev_execute_data
|
||||
@@ -1778,7 +1780,7 @@ ZEND_FUNCTION(debug_print_backtrace)
|
||||
}
|
||||
} else {
|
||||
/* i know this is kinda ugly, but i'm trying to avoid extra cycles in the main execution loop */
|
||||
bool build_filename_arg = 1;
|
||||
zend_bool build_filename_arg = 1;
|
||||
uint32_t include_kind = 0;
|
||||
if (ptr->func && ZEND_USER_CODE(ptr->func->common.type) && ptr->opline->opcode == ZEND_INCLUDE_OR_EVAL) {
|
||||
include_kind = ptr->opline->extended_value;
|
||||
@@ -2009,7 +2011,7 @@ ZEND_API void zend_fetch_debug_backtrace(zval *return_value, int skip_last, int
|
||||
}
|
||||
} else {
|
||||
/* i know this is kinda ugly, but i'm trying to avoid extra cycles in the main execution loop */
|
||||
bool build_filename_arg = 1;
|
||||
zend_bool build_filename_arg = 1;
|
||||
zend_string *pseudo_function_name;
|
||||
uint32_t include_kind = 0;
|
||||
if (ptr->func && ZEND_USER_CODE(ptr->func->common.type) && ptr->opline->opcode == ZEND_INCLUDE_OR_EVAL) {
|
||||
|
||||
+11
-12
@@ -69,11 +69,11 @@ ZEND_METHOD(Closure, __invoke) /* {{{ */
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
static bool zend_valid_closure_binding(
|
||||
static zend_bool zend_valid_closure_binding(
|
||||
zend_closure *closure, zval *newthis, zend_class_entry *scope) /* {{{ */
|
||||
{
|
||||
zend_function *func = &closure->func;
|
||||
bool is_fake_closure = (func->common.fn_flags & ZEND_ACC_FAKE_CLOSURE) != 0;
|
||||
zend_bool is_fake_closure = (func->common.fn_flags & ZEND_ACC_FAKE_CLOSURE) != 0;
|
||||
if (newthis) {
|
||||
if (func->common.fn_flags & ZEND_ACC_STATIC) {
|
||||
zend_error(E_WARNING, "Cannot bind an instance to a static closure");
|
||||
@@ -128,7 +128,6 @@ ZEND_METHOD(Closure, call)
|
||||
zend_fcall_info_cache fci_cache;
|
||||
zend_function my_function;
|
||||
zend_object *newobj;
|
||||
zend_class_entry *newclass;
|
||||
|
||||
fci.param_count = 0;
|
||||
fci.params = NULL;
|
||||
@@ -141,27 +140,26 @@ ZEND_METHOD(Closure, call)
|
||||
closure = (zend_closure *) Z_OBJ_P(ZEND_THIS);
|
||||
|
||||
newobj = Z_OBJ_P(newthis);
|
||||
newclass = newobj->ce;
|
||||
|
||||
if (!zend_valid_closure_binding(closure, newthis, newclass)) {
|
||||
if (!zend_valid_closure_binding(closure, newthis, Z_OBJCE_P(newthis))) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (closure->func.common.fn_flags & ZEND_ACC_GENERATOR) {
|
||||
zval new_closure;
|
||||
zend_create_closure(&new_closure, &closure->func, newclass, closure->called_scope, newthis);
|
||||
zend_create_closure(&new_closure, &closure->func, Z_OBJCE_P(newthis), closure->called_scope, newthis);
|
||||
closure = (zend_closure *) Z_OBJ(new_closure);
|
||||
fci_cache.function_handler = &closure->func;
|
||||
} else {
|
||||
memcpy(&my_function, &closure->func, closure->func.type == ZEND_USER_FUNCTION ? sizeof(zend_op_array) : sizeof(zend_internal_function));
|
||||
my_function.common.fn_flags &= ~ZEND_ACC_CLOSURE;
|
||||
/* use scope of passed object */
|
||||
my_function.common.scope = newclass;
|
||||
my_function.common.scope = Z_OBJCE_P(newthis);
|
||||
fci_cache.function_handler = &my_function;
|
||||
|
||||
/* Runtime cache relies on bound scope to be immutable, hence we need a separate rt cache in case scope changed */
|
||||
if (ZEND_USER_CODE(my_function.type)
|
||||
&& (closure->func.common.scope != newclass
|
||||
&& (closure->func.common.scope != Z_OBJCE_P(newthis)
|
||||
|| (closure->func.common.fn_flags & ZEND_ACC_HEAP_RT_CACHE))) {
|
||||
void *ptr;
|
||||
|
||||
@@ -174,7 +172,7 @@ ZEND_METHOD(Closure, call)
|
||||
}
|
||||
}
|
||||
|
||||
fci_cache.called_scope = newclass;
|
||||
fci_cache.called_scope = newobj->ce;
|
||||
fci_cache.object = fci.object = newobj;
|
||||
|
||||
fci.size = sizeof(fci);
|
||||
@@ -290,7 +288,6 @@ static ZEND_NAMED_FUNCTION(zend_closure_call_magic) /* {{{ */ {
|
||||
|
||||
zend_call_function(&fci, &fcc);
|
||||
|
||||
zval_ptr_dtor(&fci.params[0]);
|
||||
zval_ptr_dtor(&fci.params[1]);
|
||||
}
|
||||
/* }}} */
|
||||
@@ -487,6 +484,8 @@ static void zend_closure_free_storage(zend_object *object) /* {{{ */
|
||||
|
||||
if (closure->func.type == ZEND_USER_FUNCTION) {
|
||||
destroy_op_array(&closure->func.op_array);
|
||||
} else if (closure->orig_internal_handler == zend_closure_call_magic) {
|
||||
zend_string_release(closure->func.common.function_name);
|
||||
}
|
||||
|
||||
if (Z_TYPE(closure->this_ptr) != IS_UNDEF) {
|
||||
@@ -520,7 +519,7 @@ static zend_object *zend_closure_clone(zend_object *zobject) /* {{{ */
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
int zend_closure_get_closure(zend_object *obj, zend_class_entry **ce_ptr, zend_function **fptr_ptr, zend_object **obj_ptr, bool check_only) /* {{{ */
|
||||
int zend_closure_get_closure(zend_object *obj, zend_class_entry **ce_ptr, zend_function **fptr_ptr, zend_object **obj_ptr, zend_bool check_only) /* {{{ */
|
||||
{
|
||||
zend_closure *closure = (zend_closure *)obj;
|
||||
*fptr_ptr = &closure->func;
|
||||
@@ -543,7 +542,7 @@ static HashTable *zend_closure_get_debug_info(zend_object *object, int *is_temp)
|
||||
zval val;
|
||||
struct _zend_arg_info *arg_info = closure->func.common.arg_info;
|
||||
HashTable *debug_info;
|
||||
bool zstr_args = (closure->func.type == ZEND_USER_FUNCTION) || (closure->func.common.fn_flags & ZEND_ACC_USER_ARG_INFO);
|
||||
zend_bool zstr_args = (closure->func.type == ZEND_USER_FUNCTION) || (closure->func.common.fn_flags & ZEND_ACC_USER_ARG_INFO);
|
||||
|
||||
*is_temp = 1;
|
||||
|
||||
|
||||
+160
-256
File diff suppressed because it is too large.
Load diff
+23
-21
@@ -107,8 +107,8 @@ typedef struct _zend_file_context {
|
||||
zend_declarables declarables;
|
||||
|
||||
zend_string *current_namespace;
|
||||
bool in_namespace;
|
||||
bool has_bracketed_namespaces;
|
||||
zend_bool in_namespace;
|
||||
zend_bool has_bracketed_namespaces;
|
||||
|
||||
HashTable *imports;
|
||||
HashTable *imports_function;
|
||||
@@ -117,12 +117,17 @@ typedef struct _zend_file_context {
|
||||
HashTable seen_symbols;
|
||||
} zend_file_context;
|
||||
|
||||
typedef struct {
|
||||
uint32_t offset;
|
||||
uint32_t len;
|
||||
} zend_lexer_ident_ref;
|
||||
|
||||
typedef union _zend_parser_stack_elem {
|
||||
zend_ast *ast;
|
||||
zend_string *str;
|
||||
zend_ulong num;
|
||||
unsigned char *ptr;
|
||||
unsigned char *ident;
|
||||
zend_lexer_ident_ref ident;
|
||||
} zend_parser_stack_elem;
|
||||
|
||||
void zend_compile_top_stmt(zend_ast *ast);
|
||||
@@ -153,7 +158,7 @@ typedef struct _zend_brk_cont_element {
|
||||
int cont;
|
||||
int brk;
|
||||
int parent;
|
||||
bool is_switch;
|
||||
zend_bool is_switch;
|
||||
} zend_brk_cont_element;
|
||||
|
||||
typedef struct _zend_label {
|
||||
@@ -233,7 +238,7 @@ typedef struct _zend_oparray_context {
|
||||
/* op_array or class is preloaded | | | */
|
||||
#define ZEND_ACC_PRELOADED (1 << 10) /* X | X | | */
|
||||
/* | | | */
|
||||
/* Class Flags (unused: 23...) | | | */
|
||||
/* Class Flags (unused: 22...) | | | */
|
||||
/* =========== | | | */
|
||||
/* | | | */
|
||||
/* Special class types | | | */
|
||||
@@ -282,9 +287,6 @@ typedef struct _zend_oparray_context {
|
||||
/* Whether this class was used in its unlinked state. | | | */
|
||||
#define ZEND_ACC_HAS_UNLINKED_USES (1 << 21) /* X | | | */
|
||||
/* | | | */
|
||||
/* stored in opcache (may be partially) | | | */
|
||||
#define ZEND_ACC_CACHED (1 << 22) /* X | | | */
|
||||
/* | | | */
|
||||
/* Function Flags (unused: 27-30) | | | */
|
||||
/* ============== | | | */
|
||||
/* | | | */
|
||||
@@ -766,7 +768,7 @@ zend_ast *zend_ast_append_str(zend_ast *left, zend_ast *right);
|
||||
zend_ast *zend_negate_num_string(zend_ast *ast);
|
||||
uint32_t zend_add_class_modifier(uint32_t flags, uint32_t new_flag);
|
||||
uint32_t zend_add_member_modifier(uint32_t flags, uint32_t new_flag);
|
||||
bool zend_handle_encoding_declaration(zend_ast *ast);
|
||||
zend_bool zend_handle_encoding_declaration(zend_ast *ast);
|
||||
|
||||
/* parser-driven code generators */
|
||||
void zend_do_free(znode *op1);
|
||||
@@ -796,7 +798,7 @@ ZEND_API zend_op_array *compile_file(zend_file_handle *file_handle, int type);
|
||||
ZEND_API zend_op_array *compile_string(zend_string *source_string, const char *filename);
|
||||
ZEND_API zend_op_array *compile_filename(int type, zval *filename);
|
||||
ZEND_API zend_ast *zend_compile_string_to_ast(
|
||||
zend_string *code, struct _zend_arena **ast_arena, zend_string *filename);
|
||||
zend_string *code, struct _zend_arena **ast_arena, const char *filename);
|
||||
ZEND_API int zend_execute_scripts(int type, zval *retval, int file_count, ...);
|
||||
ZEND_API int open_file_for_scanning(zend_file_handle *file_handle);
|
||||
ZEND_API void init_op_array(zend_op_array *op_array, zend_uchar type, int initial_ops_size);
|
||||
@@ -804,7 +806,7 @@ ZEND_API void destroy_op_array(zend_op_array *op_array);
|
||||
ZEND_API void zend_destroy_file_handle(zend_file_handle *file_handle);
|
||||
ZEND_API void zend_cleanup_internal_class_data(zend_class_entry *ce);
|
||||
ZEND_API void zend_cleanup_internal_classes(void);
|
||||
ZEND_API void zend_type_release(zend_type type, bool persistent);
|
||||
ZEND_API void zend_type_release(zend_type type, zend_bool persistent);
|
||||
ZEND_API zend_string *zend_create_member_string(zend_string *class_name, zend_string *member_name);
|
||||
|
||||
|
||||
@@ -838,30 +840,30 @@ static zend_always_inline const char *zend_get_unmangled_property_name(const zen
|
||||
#define ZEND_FUNCTION_DTOR zend_function_dtor
|
||||
#define ZEND_CLASS_DTOR destroy_zend_class
|
||||
|
||||
typedef bool (*zend_needs_live_range_cb)(zend_op_array *op_array, zend_op *opline);
|
||||
typedef zend_bool (*zend_needs_live_range_cb)(zend_op_array *op_array, zend_op *opline);
|
||||
ZEND_API void zend_recalc_live_ranges(
|
||||
zend_op_array *op_array, zend_needs_live_range_cb needs_live_range);
|
||||
|
||||
ZEND_API void pass_two(zend_op_array *op_array);
|
||||
ZEND_API bool zend_is_compiling(void);
|
||||
ZEND_API zend_bool zend_is_compiling(void);
|
||||
ZEND_API char *zend_make_compiled_string_description(const char *name);
|
||||
ZEND_API void zend_initialize_class_data(zend_class_entry *ce, bool nullify_handlers);
|
||||
ZEND_API void zend_initialize_class_data(zend_class_entry *ce, zend_bool nullify_handlers);
|
||||
uint32_t zend_get_class_fetch_type(zend_string *name);
|
||||
ZEND_API zend_uchar zend_get_call_op(const zend_op *init_op, zend_function *fbc);
|
||||
ZEND_API bool zend_is_smart_branch(const zend_op *opline);
|
||||
|
||||
typedef bool (*zend_auto_global_callback)(zend_string *name);
|
||||
typedef zend_bool (*zend_auto_global_callback)(zend_string *name);
|
||||
typedef struct _zend_auto_global {
|
||||
zend_string *name;
|
||||
zend_auto_global_callback auto_global_callback;
|
||||
bool jit;
|
||||
bool armed;
|
||||
zend_bool jit;
|
||||
zend_bool armed;
|
||||
} zend_auto_global;
|
||||
|
||||
ZEND_API zend_result zend_register_auto_global(zend_string *name, bool jit, zend_auto_global_callback auto_global_callback);
|
||||
ZEND_API zend_result zend_register_auto_global(zend_string *name, zend_bool jit, zend_auto_global_callback auto_global_callback);
|
||||
ZEND_API void zend_activate_auto_globals(void);
|
||||
ZEND_API bool zend_is_auto_global(zend_string *name);
|
||||
ZEND_API bool zend_is_auto_global_str(const char *name, size_t len);
|
||||
ZEND_API zend_bool zend_is_auto_global(zend_string *name);
|
||||
ZEND_API zend_bool zend_is_auto_global_str(const char *name, size_t len);
|
||||
ZEND_API size_t zend_dirname(char *path, size_t len);
|
||||
ZEND_API void zend_set_function_arg_flags(zend_function *func);
|
||||
|
||||
@@ -1132,6 +1134,6 @@ END_EXTERN_C()
|
||||
/* The default value for CG(compiler_options) during eval() */
|
||||
#define ZEND_COMPILE_DEFAULT_FOR_EVAL 0
|
||||
|
||||
ZEND_API bool zend_binary_op_produces_error(uint32_t opcode, zval *op1, zval *op2);
|
||||
ZEND_API zend_bool zend_binary_op_produces_error(uint32_t opcode, zval *op1, zval *op2);
|
||||
|
||||
#endif /* ZEND_COMPILE_H */
|
||||
@@ -158,7 +158,7 @@ ZEND_API void zend_register_null_constant(const char *name, size_t name_len, int
|
||||
zend_register_constant(&c);
|
||||
}
|
||||
|
||||
ZEND_API void zend_register_bool_constant(const char *name, size_t name_len, bool bval, int flags, int module_number)
|
||||
ZEND_API void zend_register_bool_constant(const char *name, size_t name_len, zend_bool bval, int flags, int module_number)
|
||||
{
|
||||
zend_constant c;
|
||||
|
||||
@@ -482,7 +482,7 @@ ZEND_API zend_result zend_register_constant(zend_constant *c)
|
||||
zend_string *lowercase_name = NULL;
|
||||
zend_string *name;
|
||||
zend_result ret = SUCCESS;
|
||||
bool persistent = (ZEND_CONSTANT_FLAGS(c) & CONST_PERSISTENT) != 0;
|
||||
zend_bool persistent = (ZEND_CONSTANT_FLAGS(c) & CONST_PERSISTENT) != 0;
|
||||
|
||||
#if 0
|
||||
printf("Registering constant for module %d\n", c->module_number);
|
||||
|
||||
@@ -76,7 +76,7 @@ ZEND_API bool zend_verify_const_access(zend_class_constant *c, zend_class_entry
|
||||
ZEND_API zval *zend_get_constant(zend_string *name);
|
||||
ZEND_API zval *zend_get_constant_str(const char *name, size_t name_len);
|
||||
ZEND_API zval *zend_get_constant_ex(zend_string *name, zend_class_entry *scope, uint32_t flags);
|
||||
ZEND_API void zend_register_bool_constant(const char *name, size_t name_len, bool bval, int flags, int module_number);
|
||||
ZEND_API void zend_register_bool_constant(const char *name, size_t name_len, zend_bool bval, int flags, int module_number);
|
||||
ZEND_API void zend_register_null_constant(const char *name, size_t name_len, int flags, int module_number);
|
||||
ZEND_API void zend_register_long_constant(const char *name, size_t name_len, zend_long lval, int flags, int module_number);
|
||||
ZEND_API void zend_register_double_constant(const char *name, size_t name_len, double dval, int flags, int module_number);
|
||||
|
||||
+2
-2
@@ -90,7 +90,7 @@ static unsigned get_xcr0_eax() {
|
||||
# endif
|
||||
}
|
||||
|
||||
static bool is_avx_supported() {
|
||||
static zend_bool is_avx_supported() {
|
||||
if (!(cpuinfo.ecx & ZEND_CPU_FEATURE_AVX)) {
|
||||
/* No support for AVX */
|
||||
return 0;
|
||||
@@ -106,7 +106,7 @@ static bool is_avx_supported() {
|
||||
return 1;
|
||||
}
|
||||
#else
|
||||
static bool is_avx_supported() {
|
||||
static zend_bool is_avx_supported() {
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
+65
-38
@@ -53,21 +53,14 @@ static zend_object_handlers default_exception_handlers;
|
||||
/* {{{ zend_implement_throwable */
|
||||
static int zend_implement_throwable(zend_class_entry *interface, zend_class_entry *class_type)
|
||||
{
|
||||
/* zend_ce_exception and zend_ce_error may not be initialized yet when this is caleld (e.g when
|
||||
* implementing Throwable for Exception itself). Perform a manual inheritance check. */
|
||||
zend_class_entry *root = class_type;
|
||||
while (root->parent) {
|
||||
root = root->parent;
|
||||
}
|
||||
if (zend_string_equals_literal(root->name, "Exception")
|
||||
|| zend_string_equals_literal(root->name, "Error")) {
|
||||
if (instanceof_function(class_type, zend_ce_exception) || instanceof_function(class_type, zend_ce_error)) {
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
zend_error_noreturn(E_ERROR,
|
||||
"Class %s cannot implement interface %s, extend Exception or Error instead",
|
||||
zend_error_noreturn(E_ERROR, "Class %s cannot implement interface %s, extend %s or %s instead",
|
||||
ZSTR_VAL(class_type->name),
|
||||
ZSTR_VAL(interface->name));
|
||||
ZSTR_VAL(interface->name),
|
||||
ZSTR_VAL(zend_ce_exception->name),
|
||||
ZSTR_VAL(zend_ce_error->name));
|
||||
return FAILURE;
|
||||
}
|
||||
/* }}} */
|
||||
@@ -151,7 +144,7 @@ void zend_exception_restore(void) /* {{{ */
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
static zend_always_inline bool is_handle_exception_set() {
|
||||
static zend_always_inline zend_bool is_handle_exception_set() {
|
||||
zend_execute_data *execute_data = EG(current_execute_data);
|
||||
return !execute_data->func
|
||||
|| !ZEND_USER_CODE(execute_data->func->common.type)
|
||||
@@ -346,7 +339,7 @@ ZEND_METHOD(ErrorException, __construct)
|
||||
{
|
||||
zend_string *message = NULL, *filename = NULL;
|
||||
zend_long code = 0, severity = E_ERROR, lineno;
|
||||
bool lineno_is_null = 1;
|
||||
zend_bool lineno_is_null = 1;
|
||||
zval tmp, *object, *previous = NULL;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|SllS!l!O!", &message, &code, &severity, &filename, &lineno, &lineno_is_null, &previous, zend_ce_throwable) == FAILURE) {
|
||||
@@ -485,7 +478,7 @@ ZEND_METHOD(ErrorException, getSeverity)
|
||||
static void _build_trace_args(zval *arg, smart_str *str) /* {{{ */
|
||||
{
|
||||
/* the trivial way would be to do
|
||||
* convert_to_string(arg);
|
||||
* convert_to_string_ex(arg);
|
||||
* append it and kill the now tmp arg.
|
||||
* but that could cause some E_NOTICE and also damn long lines.
|
||||
*/
|
||||
@@ -550,20 +543,17 @@ static void _build_trace_string(smart_str *str, HashTable *ht, uint32_t num) /*
|
||||
file = zend_hash_find_ex(ht, ZSTR_KNOWN(ZEND_STR_FILE), 1);
|
||||
if (file) {
|
||||
if (Z_TYPE_P(file) != IS_STRING) {
|
||||
zend_error(E_WARNING, "Function name is not a string");
|
||||
smart_str_appends(str, "[unknown function]");
|
||||
zend_error(E_WARNING, "File name is not a string");
|
||||
smart_str_appends(str, "[unknown file]: ");
|
||||
} else{
|
||||
zend_long line;
|
||||
zend_long line = 0;
|
||||
tmp = zend_hash_find_ex(ht, ZSTR_KNOWN(ZEND_STR_LINE), 1);
|
||||
if (tmp) {
|
||||
if (Z_TYPE_P(tmp) == IS_LONG) {
|
||||
line = Z_LVAL_P(tmp);
|
||||
} else {
|
||||
zend_error(E_WARNING, "Line is not an int");
|
||||
line = 0;
|
||||
}
|
||||
} else {
|
||||
line = 0;
|
||||
}
|
||||
smart_str_append(str, Z_STR_P(file));
|
||||
smart_str_appendc(str, '(');
|
||||
@@ -747,50 +737,87 @@ ZEND_METHOD(Exception, __toString)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
static void declare_exception_properties(zend_class_entry *ce)
|
||||
{
|
||||
zval val;
|
||||
|
||||
zend_declare_property_string(ce, "message", sizeof("message")-1, "", ZEND_ACC_PROTECTED);
|
||||
zend_declare_property_string(ce, "string", sizeof("string")-1, "", ZEND_ACC_PRIVATE);
|
||||
zend_declare_property_long(ce, "code", sizeof("code")-1, 0, ZEND_ACC_PROTECTED);
|
||||
zend_declare_property_null(ce, "file", sizeof("file")-1, ZEND_ACC_PROTECTED);
|
||||
zend_declare_property_null(ce, "line", sizeof("line")-1, ZEND_ACC_PROTECTED);
|
||||
|
||||
ZVAL_EMPTY_ARRAY(&val);
|
||||
zend_declare_typed_property(
|
||||
ce, ZSTR_KNOWN(ZEND_STR_TRACE), &val, ZEND_ACC_PRIVATE, NULL,
|
||||
(zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_ARRAY));
|
||||
|
||||
ZVAL_NULL(&val);
|
||||
zend_declare_typed_property(
|
||||
ce, ZSTR_KNOWN(ZEND_STR_PREVIOUS), &val, ZEND_ACC_PRIVATE, NULL,
|
||||
(zend_type) ZEND_TYPE_INIT_CE(zend_ce_throwable, /* allow_null */ 1, 0));
|
||||
}
|
||||
|
||||
void zend_register_default_exception(void) /* {{{ */
|
||||
{
|
||||
zend_ce_throwable = register_class_Throwable(zend_ce_stringable);
|
||||
zend_ce_throwable->interface_gets_implemented = zend_implement_throwable;
|
||||
zend_class_entry ce;
|
||||
|
||||
REGISTER_MAGIC_INTERFACE(throwable, Throwable);
|
||||
zend_class_implements(zend_ce_throwable, 1, zend_ce_stringable);
|
||||
|
||||
memcpy(&default_exception_handlers, &std_object_handlers, sizeof(zend_object_handlers));
|
||||
default_exception_handlers.clone_obj = NULL;
|
||||
|
||||
zend_ce_exception = register_class_Exception(zend_ce_throwable);
|
||||
INIT_CLASS_ENTRY(ce, "Exception", class_Exception_methods);
|
||||
zend_ce_exception = zend_register_internal_class_ex(&ce, NULL);
|
||||
zend_ce_exception->create_object = zend_default_exception_new;
|
||||
zend_class_implements(zend_ce_exception, 1, zend_ce_throwable);
|
||||
declare_exception_properties(zend_ce_exception);
|
||||
|
||||
zend_ce_error_exception = register_class_ErrorException(zend_ce_exception);
|
||||
INIT_CLASS_ENTRY(ce, "ErrorException", class_ErrorException_methods);
|
||||
zend_ce_error_exception = zend_register_internal_class_ex(&ce, zend_ce_exception);
|
||||
zend_ce_error_exception->create_object = zend_error_exception_new;
|
||||
/* Declared manually because it uses constant E_ERROR. */
|
||||
zend_declare_property_long(zend_ce_error_exception, "severity", sizeof("severity")-1, E_ERROR, ZEND_ACC_PROTECTED);
|
||||
|
||||
zend_ce_error = register_class_Error(zend_ce_throwable);
|
||||
INIT_CLASS_ENTRY(ce, "Error", class_Error_methods);
|
||||
zend_ce_error = zend_register_internal_class_ex(&ce, NULL);
|
||||
zend_ce_error->create_object = zend_default_exception_new;
|
||||
zend_class_implements(zend_ce_error, 1, zend_ce_throwable);
|
||||
declare_exception_properties(zend_ce_error);
|
||||
|
||||
zend_ce_compile_error = register_class_CompileError(zend_ce_error);
|
||||
INIT_CLASS_ENTRY(ce, "CompileError", class_CompileError_methods);
|
||||
zend_ce_compile_error = zend_register_internal_class_ex(&ce, zend_ce_error);
|
||||
zend_ce_compile_error->create_object = zend_default_exception_new;
|
||||
|
||||
zend_ce_parse_error = register_class_ParseError(zend_ce_compile_error);
|
||||
INIT_CLASS_ENTRY(ce, "ParseError", class_ParseError_methods);
|
||||
zend_ce_parse_error = zend_register_internal_class_ex(&ce, zend_ce_compile_error);
|
||||
zend_ce_parse_error->create_object = zend_default_exception_new;
|
||||
|
||||
zend_ce_type_error = register_class_TypeError(zend_ce_error);
|
||||
INIT_CLASS_ENTRY(ce, "TypeError", class_TypeError_methods);
|
||||
zend_ce_type_error = zend_register_internal_class_ex(&ce, zend_ce_error);
|
||||
zend_ce_type_error->create_object = zend_default_exception_new;
|
||||
|
||||
zend_ce_argument_count_error = register_class_ArgumentCountError(zend_ce_type_error);
|
||||
INIT_CLASS_ENTRY(ce, "ArgumentCountError", class_ArgumentCountError_methods);
|
||||
zend_ce_argument_count_error = zend_register_internal_class_ex(&ce, zend_ce_type_error);
|
||||
zend_ce_argument_count_error->create_object = zend_default_exception_new;
|
||||
|
||||
zend_ce_value_error = register_class_ValueError(zend_ce_error);
|
||||
INIT_CLASS_ENTRY(ce, "ValueError", class_ValueError_methods);
|
||||
zend_ce_value_error = zend_register_internal_class_ex(&ce, zend_ce_error);
|
||||
zend_ce_value_error->create_object = zend_default_exception_new;
|
||||
|
||||
zend_ce_arithmetic_error = register_class_ArithmeticError(zend_ce_error);
|
||||
INIT_CLASS_ENTRY(ce, "ArithmeticError", class_ArithmeticError_methods);
|
||||
zend_ce_arithmetic_error = zend_register_internal_class_ex(&ce, zend_ce_error);
|
||||
zend_ce_arithmetic_error->create_object = zend_default_exception_new;
|
||||
|
||||
zend_ce_division_by_zero_error = register_class_DivisionByZeroError(zend_ce_arithmetic_error);
|
||||
INIT_CLASS_ENTRY(ce, "DivisionByZeroError", class_DivisionByZeroError_methods);
|
||||
zend_ce_division_by_zero_error = zend_register_internal_class_ex(&ce, zend_ce_arithmetic_error);
|
||||
zend_ce_division_by_zero_error->create_object = zend_default_exception_new;
|
||||
|
||||
zend_ce_unhandled_match_error = register_class_UnhandledMatchError(zend_ce_error);
|
||||
zend_ce_unhandled_match_error->create_object = zend_default_exception_new;
|
||||
|
||||
INIT_CLASS_ENTRY(zend_ce_unwind_exit, "UnwindExit", NULL);
|
||||
|
||||
INIT_CLASS_ENTRY(ce, "UnhandledMatchError", NULL);
|
||||
zend_ce_unhandled_match_error = zend_register_internal_class_ex(&ce, zend_ce_error);
|
||||
zend_ce_unhandled_match_error->create_object = zend_default_exception_new;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
@@ -987,7 +1014,7 @@ ZEND_API ZEND_COLD void zend_throw_unwind_exit(void)
|
||||
EG(current_execute_data)->opline = EG(exception_op);
|
||||
}
|
||||
|
||||
ZEND_API bool zend_is_unwind_exit(zend_object *ex)
|
||||
ZEND_API zend_bool zend_is_unwind_exit(zend_object *ex)
|
||||
{
|
||||
return ex->ce == &zend_ce_unwind_exit;
|
||||
}
|
||||
@@ -70,7 +70,7 @@ extern ZEND_API void (*zend_throw_exception_hook)(zend_object *ex);
|
||||
ZEND_API ZEND_COLD zend_result zend_exception_error(zend_object *exception, int severity);
|
||||
|
||||
ZEND_API ZEND_COLD void zend_throw_unwind_exit(void);
|
||||
ZEND_API bool zend_is_unwind_exit(zend_object *ex);
|
||||
ZEND_API zend_bool zend_is_unwind_exit(zend_object *ex);
|
||||
|
||||
#include "zend_globals.h"
|
||||
|
||||
|
||||
Loaded 100 of 1378 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user