Newsgroups: php.internals,php.qa Path: news.php.net Xref: news.php.net php.internals:28851 php.qa:28181 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 17536 invoked by uid 1010); 16 Apr 2007 08:19:05 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 17519 invoked from network); 16 Apr 2007 08:19:05 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Apr 2007 08:19:05 -0000 Authentication-Results: pb1.pair.com header.from=tijnema@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=tijnema@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.132.246 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: tijnema@gmail.com X-Host-Fingerprint: 209.85.132.246 an-out-0708.google.com Received: from [209.85.132.246] ([209.85.132.246:14582] helo=an-out-0708.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 83/83-18278-87133264 for ; Mon, 16 Apr 2007 04:19:05 -0400 Received: by an-out-0708.google.com with SMTP id c28so1902787ana for ; Mon, 16 Apr 2007 01:19:01 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=A/KgjEJ9tg7sRNYGSvn3kwptMRHUcAHZ97IM7m3aJ5P2w6n1X/YC+mvKeJB8p2TooARlrx78JE53nSTiMrCCW3/pLVTEMh+wi8hiD//Te8HNSgVRY2Tj2NWojGPuBI/cPUn67aQLPicOAuKQWOsQpbxXBPtQ+uyWXhnQ3iPq9p4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=m1JUFZWgnBVxfrIXTa4I3xE2Qa/Lvu2NGyzASQiksyUitDpYvxCClABCX/Bbxq4sdlJkMuDngIRa9xuhyOAOVwbSPGEzsBraBEERIFRdxcWkNh53s9t6USoFFFamkSDBuSSXuf7bfw/bFa9nVcbVpmI1WPy0MgTi7zlM1tbP1Gk= Received: by 10.100.178.7 with SMTP id a7mr4282655anf.1176711541348; Mon, 16 Apr 2007 01:19:01 -0700 (PDT) Received: by 10.100.91.8 with HTTP; Mon, 16 Apr 2007 01:19:01 -0700 (PDT) Message-ID: Date: Mon, 16 Apr 2007 10:19:01 +0200 To: "Antony Dovgal" Cc: "Sebastian Nohn" , "Zend Framework General" , ilia@php.net, php-qa@lists.php.net, internals@lists.php.net In-Reply-To: <46232F84.70603@zend.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <46210672.2010804@nohn.net> <46211D80.8050609@zend.com> <1956.84.63.50.23.1176620736.squirrel@ssl.nohn.org> <46232F84.70603@zend.com> Subject: Re: [PHP-DEV] ZF 0.8.0 Unit Tests behaving different on PHP 5.2.1 and PHP 5.2.2-dev From: tijnema@gmail.com ("Tijnema !") On 4/16/07, Antony Dovgal wrote: > On 04/15/2007 11:05 AM, Sebastian Nohn wrote: > > > $a = 6900000000; > > var_dump($a); > > $b = "A is: ".$a; > > var_dump($b); > > ?> > > > > 5.2.1 output is: > > > > float(6.9E+9) > > string(16) "A is: 6900000000" > > > > 5.2.2-dev output is: > > > > float(6.9E+9) > > string(12) "A is: 6.9E+9" > > Nice catch, thanks. > > What do you think is the most correct output for 1 000 000 000 000 000 (with precision = 14)? > Versions <= 5.2.1 output "1E+15", 5.2.2 says "1.0E+15". > > Both options looks ok to me, but we need to decide which one is the best. > I can find pros/cons for both options myself and it doesn't matter for me which one is chosen, though somebody might. > I remember asking people on the channel and the most popular answer was "both are legal and look ok". > > Opinions? > > -- > Wbr, > Antony Dovgal The second one "1.0E+15" is more precise, as it has the extra 0. Other than that there's no big difference between them. But because it was in 5.2.1 and before, it might be better to choose the first one. Tijnema > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > >