php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #38910 output of echo is different
Submitted: 2006-09-21 13:28 UTC Modified: 2010-12-22 13:00 UTC
Votes:1
Avg. Score:1.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: femteuwen at cs dot com Assigned:
Status: Not a bug Package: *General Issues
PHP Version: 5.1.6 OS: Win32 and UNIX
Private report: No CVE-ID: None
 [2006-09-21 13:28 UTC] femteuwen at cs dot com
Description:
------------
echo(abs(5e93));

on 5.1.6/unix-64bits outputs: 5E+93
on 5.1.6/win-32bits outputs:  5E+093


Reproduce code:
---------------
echo(abs(5e93));

Expected result:
----------------
same result, version/OS/architecture independent.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-09-21 15:15 UTC] femteuwen at cs dot com
it's the echo function that produces the output difference.

echo(5e93); 

on 5.1.6/unix-64bits outputs: 5E+93
on 5.1.6/win-32bits outputs:  5E+093
 [2010-12-22 13:00 UTC] johannes@php.net
-Status: Open +Status: Bogus -Package: Feature/Change Request +Package: *General Issues
 [2010-12-22 13:00 UTC] johannes@php.net
The size of the integer variable is system dependent, larger numbers become floats, floats are imprecise.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 17 14:04:04 2025 UTC