php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #63354 Display Format
Submitted: 2012-10-25 05:54 UTC Modified: 2012-10-25 06:22 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: p dot varga at lottery24 dot net Assigned:
Status: Wont fix Package: Variables related
PHP Version: 5.4.7RC1 OS: Linux Suse Server
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: p dot varga at lottery24 dot net
New email:
PHP Version: OS:

 

 [2012-10-25 05:54 UTC] p dot varga at lottery24 dot net
Description:
------------
Hi!

It would be nice when the format of the numbers could be more human readable.
Example how it is now:
Allowed memory size of 130000000 bytes exhausted (tried to allocate 133600001 
bytes)

Thank you! Peter

Test script:
---------------
<?php
$s = "";

for ( $i = 1 ; $i < 10000 ; $i++ ) {
        $s .= str_repeat("x", 100000);
}
?>

Expected result:
----------------
Suggestion:
Allowed memory size of 130.000.000 bytes exhausted (tried to allocate 133.600.001 
bytes)


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-10-25 06:22 UTC] aharvey@php.net
Integer to string conversion in PHP is fundamental behaviour — we couldn't change this without a massive backward compatibility break (not to mention the additional problem of deciding which of the at least four schemes I know of for digit grouping would be used).

Plus, number_format() already exists for the common cases.

Marking Won't Fix.
 [2012-10-25 06:22 UTC] aharvey@php.net
-Status: Open +Status: Wont fix
 [2012-10-25 07:18 UTC] p dot varga at lottery24 dot net
I think I did not explain myself understandable. this is the PHP message in the 
error log. it has NOTHING to do with a  massive backward compatibility break nor 
with number_format.
Just with the output in the error log and I think this can be really adapted very 
easy.

Thank you, Peter
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 06:01:30 2024 UTC