php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #69304 Documentation Issue
Submitted: 2015-03-26 07:55 UTC Modified: 2015-03-26 12:13 UTC
From: nils-kuebler at web dot de Assigned:
Status: Not a bug Package: Documentation problem
PHP Version: 5.6.7 OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: nils-kuebler at web dot de
New email:
PHP Version: OS:

 

 [2015-03-26 07:55 UTC] 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
---



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-03-26 12:13 UTC] cmb@php.net
-Status: Open +Status: Not a bug
 [2015-03-26 12:13 UTC] cmb@php.net
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>
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 01:01:30 2024 UTC