Skip to content

Commit 999e16a

Browse files
committed
Merge branch 'PHP-8.5'
* PHP-8.5: memory_limit is not always limited by max_memory_limit
2 parents da238e7 + 37e82ea commit 999e16a

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
--TEST--
2+
GH-17951 Runtime Change 6
3+
--INI--
4+
memory_limit=128M
5+
max_memory_limit=512M
6+
--FILE--
7+
<?php
8+
for($i = 0; $i < 3; $i++) {
9+
ini_set('memory_limit', '1024M');
10+
echo ini_get('memory_limit');
11+
}
12+
?>
13+
--EXPECTF--
14+
Warning: Failed to set memory_limit to 1073741824 bytes. Setting to max_memory_limit instead (currently: 536870912 bytes) in %s on line %d
15+
512M
16+
Warning: Failed to set memory_limit to 1073741824 bytes. Setting to max_memory_limit instead (currently: 536870912 bytes) in %s on line %d
17+
512M
18+
Warning: Failed to set memory_limit to 1073741824 bytes. Setting to max_memory_limit instead (currently: 536870912 bytes) in %s on line %d
19+
512M

0 commit comments

Comments
 (0)