%.123e stands for 1.123 since PHP 5.2.1 (bug #40482)

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@232464 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Jakub Vrana 2007-03-23 17:07:29 +00:00
parent 5aaaf20064
commit a7ec74d5b5

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.16 $ -->
<!-- $Revision: 1.17 $ -->
<!-- splitted from ./en/functions/strings.xml, last change in rev 1.2 -->
<refentry id="function.sprintf">
<refnamediv>
@ -98,6 +98,9 @@
<member>
<literal>e</literal> - the argument is treated as scientific
notation (e.g. 1.2e+2).
The precision specifier stands for the number of digits after the
decimal point since PHP 5.2.1. In earlier versions, it was taken as
number of significant digits (one less).
</member>
<member>
<literal>u</literal> - the argument is treated as an
@ -315,7 +318,7 @@ $formatted = sprintf("%01.2f", $money);
<?php
$number = 362525200;
echo sprintf("%.3e", $number); // outputs 3.63e+8
echo sprintf("%.3e", $number); // outputs 3.625e+8
?>
]]>
</programlisting>