From eb6bcdda88746aa195d11f0fcb8edcf4e10986bd Mon Sep 17 00:00:00 2001 From: Naoya Harasawa Date: Fri, 16 May 2025 23:23:58 +0900 Subject: [PATCH] Correct memory usage estimation in range() documentation Updated the PHP manual to reflect a more accurate memory usage estimate for range(0, 1000000). Previous documentation stated it used over 100MB, but actual tests show around 18MB. Revised the estimate to 10MB for better accuracy based on real-world testing. --- language/generators.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/language/generators.xml b/language/generators.xml index 06e6bbf2f709..2b7510b3817e 100644 --- a/language/generators.xml +++ b/language/generators.xml @@ -33,7 +33,7 @@ function as a generator. The standard range function has to generate an array with every value in it and return it, which can result in large arrays: for example, calling - range(0, 1000000) will result in well over 100 MB of + range(0, 1000000) will result in well over 10 MB of memory being used.