Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ PHP NEWS
. It is now possible to use the AES192, AES192C, AES256, and AES256C as
SNMPv3 security protocols if the underlying library supports them.
(eskyuu)
. It is now possible to reset the MIB tree using the new snmp_read_mib()
. It is now possible to reset the MIB tree using the new snmp_init_mib()
function. (eskyuu)
. Additional MIB parsing and output control functionality has been exposed
via the snmp_set_mib_option(), snmp_set_output_option(),
Expand Down
22 changes: 22 additions & 0 deletions UPGRADING
Original file line number Diff line number Diff line change
Expand Up @@ -878,6 +878,28 @@ PHP 8.6 UPGRADE NOTES
. EAI_IDN_ENCODE.
. SO_DETACH_REUSEPORT_BPF (Linux only).

- Sodium:
. SODIUM_CRYPTO_IPCRYPT_BYTES.
. SODIUM_CRYPTO_IPCRYPT_KEYBYTES.
. SODIUM_CRYPTO_IPCRYPT_ND_KEYBYTES.
. SODIUM_CRYPTO_IPCRYPT_ND_TWEAKBYTES.
. SODIUM_CRYPTO_IPCRYPT_ND_INPUTBYTES.
. SODIUM_CRYPTO_IPCRYPT_ND_OUTPUTBYTES.
. SODIUM_CRYPTO_IPCRYPT_NDX_KEYBYTES.
. SODIUM_CRYPTO_IPCRYPT_NDX_TWEAKBYTES.
. SODIUM_CRYPTO_IPCRYPT_NDX_INPUTBYTES.
. SODIUM_CRYPTO_IPCRYPT_NDX_OUTPUTBYTES.
. SODIUM_CRYPTO_IPCRYPT_PFX_KEYBYTES.
. SODIUM_CRYPTO_IPCRYPT_PFX_BYTES.
. SODIUM_CRYPTO_XOF_SHAKE128_BLOCKBYTES.
. SODIUM_CRYPTO_XOF_SHAKE128_STATEBYTES.
. SODIUM_CRYPTO_XOF_SHAKE256_BLOCKBYTES.
. SODIUM_CRYPTO_XOF_SHAKE256_STATEBYTES.
. SODIUM_CRYPTO_XOF_TURBOSHAKE128_BLOCKBYTES.
. SODIUM_CRYPTO_XOF_TURBOSHAKE128_STATEBYTES.
. SODIUM_CRYPTO_XOF_TURBOSHAKE256_BLOCKBYTES.
. SODIUM_CRYPTO_XOF_TURBOSHAKE256_STATEBYTES.

- Standard:
. ARRAY_FILTER_USE_VALUE.
. STREAM_CRYPTO_STATUS_NONE.
Expand Down
7 changes: 4 additions & 3 deletions Zend/zend.c
Original file line number Diff line number Diff line change
Expand Up @@ -1487,13 +1487,14 @@ ZEND_API ZEND_COLD void zend_error_zstr_at(
info->lineno = error_lineno;
info->filename = zend_string_copy(error_filename);
info->message = zend_string_copy(message);
EG(errors).size++;
if (EG(errors).size > EG(errors).capacity) {
uint32_t new_size = EG(errors).size + 1;
if (new_size > EG(errors).capacity) {
uint32_t capacity = EG(errors).capacity ? EG(errors).capacity + (EG(errors).capacity >> 1) : 2;
EG(errors).errors = erealloc(EG(errors).errors, sizeof(zend_error_info *) * capacity);
EG(errors).capacity = capacity;
}
EG(errors).errors[EG(errors).size - 1] = info;
EG(errors).errors[EG(errors).size] = info;
EG(errors).size = new_size;

/* Do not process non-fatal recorded error */
if (!(type & E_FATAL_ERRORS) || (type & E_DONT_BAIL)) {
Expand Down
5 changes: 4 additions & 1 deletion Zend/zend_builtin_functions.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ function exit(string|int $status = 0): never {}
/** @alias exit */
function die(string|int $status = 0): never {}

/** @refcount 1 */
/**
* @refcount 1
* @compile-time-eval
*/
function zend_version(): string {}

/** @forbid-dynamic-calls */
Expand Down
4 changes: 2 additions & 2 deletions Zend/zend_builtin_functions_arginfo.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 25 additions & 0 deletions ext/opcache/tests/zend_version.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
--TEST--
zend_version() should be evaluated at compile time
--EXTENSIONS--
opcache
--INI--
opcache.enable_cli=1
opcache.opt_debug_level=0x20000
--FILE--
<?php

$v = zend_version();
var_dump($v);

?>
--EXPECTF--
$_main:
; (lines=5, args=0, vars=1, tmps=%d)
; (after optimizer)
; %s.php:%s
0000 ASSIGN CV0($v) string("%s")
0001 INIT_FCALL 1 %d string("var_dump")
0002 SEND_VAR CV0($v) 1
0003 DO_ICALL
0004 RETURN int(1)
string(%d) "%s"