Skip to content

More informative C Zend API #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 207 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
207 commits
Select commit Hold shift + click to select a range
8202b4e
Properly patch jmp tables
dstogov Aug 17, 2020
a02237d
Removed outdated/duplicated code
dstogov Aug 17, 2020
72383cc
Promote warnings in ext/zip
Girgias Jul 8, 2020
28e24e7
Fixed JIT for indirectly recursive traces
dstogov Aug 17, 2020
afc93e4
JIT for ZEND_ISSET_ISEMPTY_CV
dstogov Aug 17, 2020
32052e7
Fixed support for possible indirect variable modification (ext/standa…
dstogov Aug 17, 2020
3343eb6
Fixed trace type inference for FE_FETCH_R/RW
dstogov Aug 17, 2020
fd0b57d
Fixed support for named arguments
dstogov Aug 17, 2020
5d94ff8
JIT extension may be NULL
dstogov Aug 18, 2020
1ae80f8
Fix HTTP response status code
cmb69 Aug 17, 2020
3e8172d
Merge branch 'PHP-7.3' into PHP-7.4
cmb69 Aug 18, 2020
c8e6f05
Merge branch 'PHP-7.4' into master
cmb69 Aug 18, 2020
499bf91
Prepare for 7.4.11
derickr Aug 18, 2020
ac97e4b
Merge branch 'PHP-7.4' into master
derickr Aug 18, 2020
ff14b7a
7.3.23 is next
cmb69 Aug 18, 2020
48d7125
Merge branch 'PHP-7.3' into PHP-7.4
cmb69 Aug 18, 2020
2d32ddb
Merge branch 'PHP-7.4' into master
cmb69 Aug 18, 2020
8c90002
Fixed bug #79987 (Memory leak in SplFileInfo because of missing zend_…
dstogov Aug 18, 2020
6f36b20
Don't add guard for empty()
dstogov Aug 18, 2020
4514afc
Fix #79988: new reserved keyword `match` is a backward incompatible c…
cmb69 Aug 18, 2020
9b4abd0
Update NEWS for PHP 8.0.0beta2
sgolemon Aug 18, 2020
c905717
Update NEWS for 8.0.0beta3
sgolemon Aug 18, 2020
f7c43b8
Fix #47021: SoapClient stumbles over WSDL delivered with "Transfer-En…
mbeccati Aug 18, 2020
3877172
Merge branch 'PHP-7.3' into PHP-7.4
mbeccati Aug 18, 2020
cf3fb14
Merge branch 'PHP-7.4'
mbeccati Aug 18, 2020
bf9ef51
Promote warnings to exceptions in ext/pspell
kocsismate Aug 18, 2020
f2d8488
Fixed register allocation for CASE instruction. CASE don't destroy fi…
dstogov Aug 18, 2020
f559c78
Check for exception after $this destruction
dstogov Aug 18, 2020
9883fec
Fix more basic function stubs
TysonAndre Aug 18, 2020
736c5dc
Fixed memory leak (ext/hash/tests/mhash_001.phpt failure)
dstogov Aug 19, 2020
9f6820f
Fix #79968: Manipulation on unattached DOMChildNode should throw DOME…
beberlei Aug 15, 2020
a34fd4d
Update NEWS w.r.t to bugfix #79968
beberlei Aug 19, 2020
c6c1682
Fixed tracing JIT crash in case SSA for op_array is not provided
dstogov Aug 19, 2020
bcadf9d
Shrink live intervals of IS_VAR/IS_TMP_VAR
dstogov Aug 19, 2020
22982ee
Load zval type into register to eliminate double load
dstogov Aug 19, 2020
4e6fbb0
Promote warnings to exceptions in ext/gd
kocsismate Aug 19, 2020
aed1f78
micro-optimization
dstogov Aug 20, 2020
dd29a6e
efree() doesn't use line number arguments (pass zeros)
dstogov Aug 20, 2020
c64cb19
cleanup unused parameters
dstogov Aug 20, 2020
35a3e45
Better registers usage
dstogov Aug 20, 2020
8095a0e
Better register usage for ASSIGN_DIM_OP
dstogov Aug 21, 2020
ff66e49
OCI8 classes were already renamed in 8; this now follows the new-new …
cjbj Aug 21, 2020
8c57474
ensure installed ini don't interfere
remicollet Aug 21, 2020
46d62e5
Fix wrong datatype
manuelm Aug 21, 2020
8f9f308
Merge branch 'PHP-7.3' into PHP-7.4
cmb69 Aug 21, 2020
13419be
Merge branch 'PHP-7.4' into master
cmb69 Aug 21, 2020
1b21b56
sqlite3 linkage issue on some systems/package combination fix.
devnexen Aug 15, 2020
3c5412f
Merge branch 'PHP-7.4' into master
cmb69 Aug 21, 2020
f32653a
fileinfo build fix proposal for haiku.
devnexen Aug 13, 2020
47c787f
Squash a Linux compile warning
cjbj Aug 22, 2020
b2a33ab
Fix #80007: Potential type confusion in unixtojd() parameter parsing
andypost Aug 21, 2020
81fffa8
Merge branch 'PHP-7.3' into PHP-7.4
cmb69 Aug 22, 2020
969a432
Merge branch 'PHP-7.4' into master
cmb69 Aug 22, 2020
e6044d4
Fix #55847: DOTNET .NET 4.0 GAC new location
cmb69 Aug 6, 2020
4bba59d
Update PHP-Parser from 4.3.0 to 4.9.0
TysonAndre Aug 23, 2020
118406a
Remove custom hacks from gen_stub.php after PHP-Parser upgrade
kocsismate Aug 23, 2020
5c18ee5
Fixed use-after-free introduced by aed1f785159e7c9e81da8f2e2e06df9a6e…
dstogov Aug 24, 2020
2c2bb50
sapi/fpm/config.m4: check for libapparmor's aa_change_profile()
kees Aug 23, 2020
9395e01
Check variadic parameter for type and duplicate name
nikic Aug 24, 2020
fcd26ff
Fix #80002: calc free space for new interned string is wrong
cmb69 Aug 20, 2020
10df94d
Merge branch 'PHP-7.3' into PHP-7.4
cmb69 Aug 24, 2020
08d2e51
Merge branch 'PHP-7.4' into master
cmb69 Aug 24, 2020
844a2dd
Fix #79986: str_ireplace bug with diacritics characters
cmb69 Aug 18, 2020
5ab7b30
Merge branch 'PHP-7.3' into PHP-7.4
cmb69 Aug 24, 2020
c925028
Merge branch 'PHP-7.4' into master
cmb69 Aug 24, 2020
32c6a0b
further network libraries detection for Haiku system.
devnexen Aug 16, 2020
bfeb2f6
Fix: Gracefully handle empty user input in run-tests.php
Berbe Aug 19, 2020
6b6c2c0
Fix #79979: passing value to by-ref param via CUFA crashes
cmb69 Aug 24, 2020
5643f34
Merge branch 'PHP-7.4' into master
cmb69 Aug 24, 2020
e056e2d
Check for duplicate names in gen_stub.php
TysonAndre Aug 23, 2020
bb54694
Fix refcounting
nikic Aug 24, 2020
779e904
Merge branch 'PHP-7.4'
nikic Aug 24, 2020
7a6ae9b
Fix refcounting for the named params case as well
nikic Aug 24, 2020
8c3574b
Remove php_my_setlocale workaround
nikic Aug 24, 2020
9feb988
Clean up setlocale implementation
nikic Aug 24, 2020
c557c41
Drop a spurious zend_string_release
nikic Aug 24, 2020
cc35cfd
Promote warnings to exceptions in ext/filter
kocsismate Aug 10, 2020
ffff237
Promote warning to exception in ext/posix
kocsismate Aug 18, 2020
74de17f
Fix potential integer overflow detected by oss-fuzz
cmb69 Aug 24, 2020
5dd1877
Merge branch 'PHP-7.3' into PHP-7.4
cmb69 Aug 24, 2020
1fb66b8
Promote warning to exception in ext/enchant
kocsismate Aug 19, 2020
ecf4e70
Merge branch 'PHP-7.4' into master
cmb69 Aug 24, 2020
ef7904b
JIT for MATCH and CASE_STRICT instructions
dstogov Aug 24, 2020
54fd1fc
Support for CASE_STRICT
dstogov Aug 24, 2020
d384537
Move AVOID_REFCOUNTING type info flag into a separate bit
dstogov Aug 25, 2020
afde6dc
Simplify change_node_zval implementation
nikic Aug 25, 2020
f4e9d0e
Don't return temporary from SXE write_property handler
nikic Aug 25, 2020
f068fbc
Promote warnings to exceptions in ext/xmlreader
kocsismate Aug 19, 2020
be5ba20
Promote warnings to exceptions in ext/phar
kocsismate Aug 18, 2020
9f05c32
Remove useless same_zval function
twose Aug 25, 2020
0630820
Remove bogus REGISTER_LONG_CONSTANT
nikic Aug 25, 2020
86e7aa2
Merge branch 'PHP-7.3' into PHP-7.4
nikic Aug 25, 2020
4a98b64
Merge branch 'PHP-7.4'
nikic Aug 25, 2020
3df306d
Promote warnings to exceptions in ext/pcntl
kocsismate Aug 17, 2020
d54bc29
Promote warnings to exceptions in ext/shmop
kocsismate Aug 13, 2020
3324bb8
Avoid double-free
cmb69 Aug 25, 2020
5ecefd0
Fix XMLWriter::writeDtdEntity() stub
nikic Aug 25, 2020
259d050
Clean up BreakIterator create_object handler
nikic Aug 14, 2020
923a146
Merge branch 'PHP-7.3' into PHP-7.4
cmb69 Aug 25, 2020
7e5ed81
Merge branch 'PHP-7.4' into master
cmb69 Aug 25, 2020
f77200f
Fixed JIT failure on "$a = []; $a[1] += 2;"
dstogov Aug 25, 2020
6c8fb12
Promote warnings to exceptions in ext/simplexml
kocsismate Aug 18, 2020
647fb38
Ensure RuleBasedBreakIterator constructor throws on failure
nikic Aug 25, 2020
2369f48
Infer information about packed/hash arrays and use it for JIT
dstogov Aug 25, 2020
ea87d04
Promote warnings to exceptions in ext/pcre
kocsismate Aug 25, 2020
e86b5c8
Record information about packed arrays
dstogov Aug 25, 2020
571f6a5
Don't enable --with-mm in CI
nikic Aug 25, 2020
c2c90cf
Merge branch 'PHP-7.4'
nikic Aug 25, 2020
e999544
Avoid priniting "array [long, string] of"
dstogov Aug 25, 2020
145aba5
Merge branch 'jit_match'
dstogov Aug 25, 2020
5948a66
Prevent negative array index access
dstogov Aug 25, 2020
d4383be
Use guard to check if array is packed or hash
dstogov Aug 25, 2020
f6e5cc3
Prevent double-construction of IntlRuleBasedBreakIterator
nikic Aug 26, 2020
72eaf50
Prevent double-construction of IntlGregorianCalendar
nikic Aug 26, 2020
6b55425
Prevent double-construction of NumberFormatter
nikic Aug 26, 2020
f593019
Prevent ResourceBundle double-construction
nikic Aug 26, 2020
1954aed
Fix over-eager named params optimization
nikic Aug 26, 2020
d179e34
Fix memory leak when yielding from non-iterable
nikic Aug 26, 2020
bf3e772
Merge branch 'PHP-7.3' into PHP-7.4
nikic Aug 26, 2020
d7d2b06
Merge branch 'PHP-7.4'
nikic Aug 26, 2020
492621f
Fix memory leak on unknown named param
nikic Aug 26, 2020
1003ae2
Fix passing of undef var to named arg
nikic Aug 26, 2020
083f5f2
Improved JIT for FETCH_DIM_R/IS and ISSET_DIM_OBJ
dstogov Aug 26, 2020
0487bcf
Avoid socket path clash in test
nikic Aug 26, 2020
eb17f99
Merge branch 'PHP-7.4'
nikic Aug 26, 2020
795ad1e
Fix memory leak on unknown named param in iterator unpack
nikic Aug 26, 2020
358721b
Fix file name clash in test
nikic Aug 26, 2020
ebbe333
Merge branch 'PHP-7.4'
nikic Aug 26, 2020
1b2ec73
Drop various unused macros/APIs
Girgias Aug 26, 2020
5ff15e2
Fix #64130: COM obj parameters passed by reference are not updated
cmb69 Aug 26, 2020
1ff981d
Merge branch 'PHP-7.3' into PHP-7.4
cmb69 Aug 26, 2020
fc4a6cd
Merge branch 'PHP-7.4' into master
cmb69 Aug 26, 2020
75ac3f1
Separate COM::__construct()s $server_name array
cmb69 Aug 25, 2020
b087bd2
Merge branch 'PHP-7.3' into PHP-7.4
cmb69 Aug 26, 2020
2f9e9d4
Merge branch 'PHP-7.4' into master
cmb69 Aug 26, 2020
86cd009
Fix pass by ref error for named params
nikic Aug 26, 2020
55798e0
Lowercase method name in zend_call_method()
nikic Aug 26, 2020
1b7ee6d
Fix com_safearray_proxy related memory management issues
cmb69 Aug 26, 2020
8e2f219
Merge branch 'PHP-7.3' into PHP-7.4
cmb69 Aug 26, 2020
00edc3f
Merge branch 'PHP-7.4' into master
cmb69 Aug 26, 2020
247105a
Property handle read_property exception in fetch_property_address
nikic Aug 26, 2020
e069032
Merge branch 'PHP-7.4'
nikic Aug 26, 2020
9e58187
Voidify functions in zend.c
Girgias Aug 15, 2020
826c788
Boolify functions in zend.c
Girgias Aug 15, 2020
976f9b1
Voidify functions in zend_alloc.c
Girgias Aug 15, 2020
60019a9
Boolify functions in zend_alloc.c
Girgias Aug 15, 2020
3130976
Boolify functions in zend_API.c
Girgias Aug 15, 2020
26f0ad7
Boolify functions in zend_ast.c
Girgias Aug 15, 2020
06f1fba
Boolify functions in zend_attributes.c
Girgias Aug 15, 2020
76e6762
Boolify functions in zend_bitset.h
Girgias Aug 15, 2020
002c1f6
Boolify functions in zend_builtin_functions.c
Girgias Aug 15, 2020
a35d350
Boolify functions in zend_closure.c
Girgias Aug 15, 2020
640bb8b
boolify zend_constant.c
Girgias Aug 15, 2020
88efdd1
Boolify zend_exception.c
Girgias Aug 15, 2020
efef6f7
Voidify zend_execute.c
Girgias Aug 15, 2020
ef1fe77
Boolify zend_execute.c
Girgias Aug 15, 2020
9141257
Drop zend_handle_sigsegv() unused var
Girgias Aug 15, 2020
7f478fd
Boolify zend_extensions.c
Girgias Aug 15, 2020
700448c
Voidify zend_extensions.c
Girgias Aug 15, 2020
b7d5d01
Fix zend_extension
Girgias Aug 16, 2020
abcb59a
Boolify zend_gdb.c
Girgias Aug 15, 2020
5d70fe8
Boolify zend_generator.c
Girgias Aug 15, 2020
d70cbaf
Boolify zend_hash.c
Girgias Aug 15, 2020
2f7ed86
Boolify zend_highlight.c
Girgias Aug 15, 2020
71b5d1b
Boolify zend_inheritence.c
Girgias Aug 15, 2020
315d298
Boolify zend_ini.c
Girgias Aug 15, 2020
ce33408
Voidify zend_ini.c
Girgias Aug 15, 2020
801605f
Fix zend.c after voidification of zend_copy_ini_directives()
Girgias Aug 16, 2020
8d36546
Boolify zend_interface.c
Girgias Aug 15, 2020
34766d7
Boolify zend_language_scanner.l
Girgias Aug 15, 2020
c389890
Voidify language_scanner.l
Girgias Aug 16, 2020
b915d59
Voidify zend_list.c
Girgias Aug 15, 2020
1889901
Boolify zend_list.c
Girgias Aug 15, 2020
3542add
Boolify zend_multibyte.c
Girgias Aug 15, 2020
ba8a0a3
Boolify zend_multiply.h
Girgias Aug 15, 2020
b935df4
Boolify zend_object_handler.c
Girgias Aug 15, 2020
b73b448
Revert "Boolify zend_object_handler.c"
Girgias Aug 16, 2020
13b326e
Voidify zend_opcode.c
Girgias Aug 16, 2020
9d31dc9
Boolify zend_operators.c
Girgias Aug 16, 2020
3a6fc73
Boolify zend_signal.c
Girgias Aug 16, 2020
9fdb0dc
Voidify zend_signal.c
Girgias Aug 16, 2020
d476a97
Fix PCNTL Code due to zend_sigaction() voidification
Girgias Aug 16, 2020
22e5f71
Voidify zend_stack.c
Girgias Aug 16, 2020
efdf2d1
Boolify zend_stream.c
Girgias Aug 16, 2020
14e6f25
Boolify zend_string.c
Girgias Aug 16, 2020
d81edcb
Update FTP code after zend_list_close() voidification
Girgias Aug 16, 2020
73e6f4d
Fix streamfuncs.c due to zend_list_close() voidification
Girgias Aug 16, 2020
6d9a6c7
Fix ZIP after zend_list_close() voidification
Girgias Aug 16, 2020
f93e105
Fix Tokenizer extension after voidification of zend_prepare_string_fo…
Girgias Aug 16, 2020
f4e9196
Fix PHP_FUNCTION(highlight_string) after voidification of highlight_s…
Girgias Aug 16, 2020
36b9243
Boolify zend_virtual_cwd.c
Girgias Aug 16, 2020
bcfa1f9
Boolify zend_weakref.c
Girgias Aug 16, 2020
7f20490
Boolify zend_VM
Girgias Aug 16, 2020
ce59e42
Zend_API.h slight teak
Girgias Aug 16, 2020
32149e4
Fix zend_extension incompatible function pointer
Girgias Aug 16, 2020
0001c4b
Fix zend_stream function to be compatible for Zend LList
Girgias Aug 16, 2020
06c5779
Fix zend_module_entry enum due to zend_API changes
Girgias Aug 18, 2020
45aef0f
Fix incompatible pointer error for Zend object handlers.
Girgias Aug 20, 2020
4f8829a
Fix OpCache
Girgias Aug 20, 2020
d276dce
Shot in the dark to fix the JIT
Girgias Aug 21, 2020
39cc10b
Typedef ZEND_RESULT_CODE to zend_result
Girgias Aug 24, 2020
b548cdb
Use zend_result instead of ZEND_RESULT_CODE
Girgias Aug 24, 2020
bbc67c4
Attempt to fix some variable types in VM due to JIT failures
Girgias Aug 23, 2020
a953eaa
Partial revert of 'Shot in the dark to fix JIT'
Girgias Aug 24, 2020
3bc1ce8
Other change to see if this is root cause of JIT failure
Girgias Aug 24, 2020
85dc37f
Fix spurious change
Girgias Aug 25, 2020
9ffcda2
Update UPGRADING.INTERNALS
Girgias Aug 26, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
18 changes: 17 additions & 1 deletion NEWS
Original file line number Diff line number Diff line change
@@ -1,7 +1,23 @@
PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? ????, PHP 8.0.0beta2
?? ??? ????, PHP 8.0.0beta3

- Calendar:
. Fixed bug #80007 (Potential type confusion in unixtojd() parameter parsing).
(Andy Postnikov)

- COM:
. Fixed bug #55847 (DOTNET .NET 4.0 GAC new location). (cmb)

- DOM:
. Fixed bug #79968 (DOMChildNode API crash on unattached nodes). (Benjamin)


20 Aug 2020, PHP 8.0.0beta2

- SPL:
. Fixed bug #79987 (Memory leak in SplFileInfo because of missing
zend_restore_error_handling()). (Dmitry)

06 Aug 2020, PHP 8.0.0beta1

Expand Down
10 changes: 9 additions & 1 deletion UPGRADING
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ PHP 8.0 UPGRADE NOTES
========================================

- Core:
. `match` is now a reserved keyword.
. Assertion failures now throw by default. If the old behavior is desired,
then set `assert.exception=0` in INI settings.
. Methods with the same name as the class are no longer interpreted as
Expand Down Expand Up @@ -148,7 +149,7 @@ PHP 8.0 UPGRADE NOTES
new class {};
// -> class@anonymous

The name shown above is still followed by a null byte and and a unique
The name shown above is still followed by a null byte and a unique
suffix.
. Non-absolute trait method references in trait alias adaptations are now
required to be unambiguous:
Expand Down Expand Up @@ -380,6 +381,9 @@ PHP 8.0 UPGRADE NOTES
removed.

- OCI8:
. The OCI-Lob class is now called OCILob, and the OCI-Collection class is now
called OCICollection for name compliance enforced by PHP 8 arginfo
type annotation tooling.
. Several alias functions have been marked as deprecated.
. oci_internal_debug() and its alias ociinternaldebug() have been removed.

Expand Down Expand Up @@ -1044,6 +1048,10 @@ PHP 8.0 UPGRADE NOTES
. New INI directive to set the maximum string length in an argument of a
stringified stack strace.

- com.dotnet_version
. New INI directive to choose the version of the .NET framework to use for
dotnet objects.

========================================
12. Windows Support
========================================
Expand Down
196 changes: 195 additions & 1 deletion UPGRADING.INTERNALS
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ PHP 8.0 INTERNALS UPGRADE NOTES
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

2. Build system changes
a. Abstract
Expand Down Expand Up @@ -157,6 +158,28 @@ PHP 8.0 INTERNALS UPGRADE NOTES
- 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()
Expand All @@ -168,8 +191,39 @@ PHP 8.0 INTERNALS UPGRADE NOTES
- zend_wrong_parameter*()
- zend_wrong_callback_error()
- zend_parse_arg_class()
3. Argument int to zend_bool in Zend Engine 4.0:
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:
Expand All @@ -184,6 +238,135 @@ PHP 8.0 INTERNALS UPGRADE NOTES
- 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, and request_shutdown_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()

u. Instead of overwriting zend_error_cb extensions with debugging, monitoring
use-cases catching Errors/Exceptions are strongly encouraged to use
Expand All @@ -201,6 +384,17 @@ PHP 8.0 INTERNALS UPGRADE NOTES
}
zend_register_error_notify_callback(my_error_notify_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()

========================
2. Build system changes
========================
Expand Down
22 changes: 22 additions & 0 deletions Zend/tests/bug79979.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
--TEST--
Bug #79979 (passing value to by-ref param via CUF(A) crashes)
--FILE--
<?php

namespace Foo;

call_user_func_array("str_replace", ["a", "b", "c", new \stdClass]);
call_user_func_array("str_replace", ["a", "b", "c", "replace_count" => new \stdClass]);

\call_user_func_array("str_replace", ["a", "b", "c", new \stdClass]);
\call_user_func_array("str_replace", ["a", "b", "c", "replace_count" => new \stdClass]);

?>
--EXPECTF--
Warning: str_replace(): Argument #4 ($replace_count) must be passed by reference, value given in %s on line %d

Warning: str_replace(): Argument #4 ($replace_count) must be passed by reference, value given in %s on line %d

Warning: str_replace(): Argument #4 ($replace_count) must be passed by reference, value given in %s on line %d

Warning: str_replace(): Argument #4 ($replace_count) must be passed by reference, value given in %s on line %d
23 changes: 23 additions & 0 deletions Zend/tests/exception_during_by_reference_magic_get.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
--TEST--
Exception thrown by __get() during =& assignment
--FILE--
<?php

class Test {
private $x;
public function &__get($name) {
throw new Exception("Foobar");
}
}

$test = new Test;
$y = 5;
try {
$test->x =& $y;
} catch (Exception $e) {
echo $e->getMessage(), "\n";
}

?>
--EXPECT--
Foobar
18 changes: 18 additions & 0 deletions Zend/tests/generators/yield_from_non_iterable.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
--TEST--
Yield from non-iterable
--FILE--
<?php

function gen() {
yield from new stdClass;
}

try {
gen()->current();
} catch (Error $e) {
echo $e->getMessage(), "\n";
}

?>
--EXPECT--
Can use "yield from" only with arrays and Traversables
13 changes: 13 additions & 0 deletions Zend/tests/named_params/cannot_pass_by_ref.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
--TEST--
Cannot pass by reference error with named parameters
--FILE--
<?php
function test($a, &$e) {}
try {
test(e: 42);
} catch (Error $e) {
echo $e->getMessage(), "\n";
}
?>
--EXPECT--
Cannot pass parameter 2 by reference
17 changes: 17 additions & 0 deletions Zend/tests/named_params/undef_var.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
--TEST--
Passing undefined variabled to named arg
--FILE--
<?php

function func1($arg) { var_dump($arg); }
func1(arg: $undef);
func2(arg: $undef);
function func2($arg) { var_dump($arg); }

?>
--EXPECTF--
Warning: Undefined variable $undef in %s on line %d
NULL

Warning: Undefined variable $undef in %s on line %d
NULL
Loading