Doc #69304 [Opn->Nab]: Documentation Issue

From: Date: Thu, 26 Mar 2015 12:13:06 +0000
Subject: Doc #69304 [Opn->Nab]: Documentation Issue
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-12055@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=69304&edit=1 ID: 69304 Updated by: cmb@php.net Reported by: nils-kuebler at web dot de Summary: Documentation Issue -Status: Open +Status: Not a bug Type: Documentation Problem Package: Documentation problem PHP Version: 5.6.7 Block user comment: N Private report: N New Comment: Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php > This text is telling me that an Integer in PHP is 100 Bytes big? No, it says that an array with 1,000,000 integers uses well over 100 MB. nikic has explained what's happening behind the scenes quite nicely in a blog article: <https://nikic.github.io/2011/12/12/How-big-are-PHP-arrays-really-Hint-BIG.html> Previous Comments: ------------------------------------------------------------------------ [2015-03-26 07:55:40] nils-kuebler at web dot de Description: ------------ This text is telling me that an Integer in PHP is 100 Bytes big? "A simple example of this is to reimplement the range() 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 memory being used. " --- From manual page: http://www.php.net/language.generators.overview --- ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=69304&edit=1

« previous php.doc.bugs (#12055) next »