Download | Plain Text | No Line Numbers
- --- a/build/gen_stub.php 2026-02-10 19:25:51.000000000 +0100
- +++ b/build/gen_stub.php 2026-03-12 22:21:02.653934390 +0100
- @@ -3029,6 +3029,7 @@
- "username" => "ZEND_STR_USERNAME",
- "password" => "ZEND_STR_PASSWORD",
- "clone" => "ZEND_STR_CLONE",
- + "memory_limit" => "ZEND_STR_MEMORY_LIMIT",
- '8.0' => 'ZEND_STR_8_DOT_0',
- '8.1' => 'ZEND_STR_8_DOT_1',
- '8.2' => 'ZEND_STR_8_DOT_2',
- --- a/main/main.c 2026-03-12 22:19:31.115021800 +0100
- +++ b/main/main.c 2026-03-12 22:21:24.390432386 +0100
- @@ -378,12 +378,18 @@
- }
-
- if (zend_set_memory_limit(value) == FAILURE) {
- - zend_error(E_ERROR, "Failed to set memory limit to %zd bytes (Current memory usage is %zd bytes)", value, zend_memory_usage(true));
- - return FAILURE;
- + if (stage != ZEND_INI_STAGE_DEACTIVATE) {
- + zend_error(E_ERROR, "Failed to set memory limit to %zd bytes (Current memory usage is %zd bytes)", value, zend_memory_usage(true));
- + return FAILURE;
- + }
- }
-
- - PG(memory_limit) = value;
- PG(max_memory_limit) = value;
- + if (stage == ZEND_INI_STAGE_DEACTIVATE) {
- + PG(memory_limit) = value;
- + } else {
- + zend_alter_ini_entry(ZSTR_KNOWN(ZEND_STR_MEMORY_LIMIT), new_value, PHP_INI_ALL, stage);
- + }
-
- return SUCCESS;
- }
- --- a/Zend/zend_string.h 2026-02-10 19:25:51.000000000 +0100
- +++ b/Zend/zend_string.h 2026-03-12 22:21:02.655401423 +0100
- @@ -636,6 +636,7 @@
- _(ZEND_STR_SINCE, "since") \
- _(ZEND_STR_GET, "get") \
- _(ZEND_STR_SET, "set") \
- + _(ZEND_STR_MEMORY_LIMIT, "memory_limit") \
- _(ZEND_STR_8_DOT_0, "8.0") \
- _(ZEND_STR_8_DOT_1, "8.1") \
- _(ZEND_STR_8_DOT_2, "8.2") \
-