Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:70903 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 26621 invoked from network); 29 Dec 2013 08:05:44 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Dec 2013 08:05:44 -0000 Authentication-Results: pb1.pair.com header.from=yohgaki@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=yohgaki@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.217.182 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.217.182 mail-lb0-f182.google.com Received: from [209.85.217.182] ([209.85.217.182:51516] helo=mail-lb0-f182.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F2/93-31802-6D7DFB25 for ; Sun, 29 Dec 2013 03:05:43 -0500 Received: by mail-lb0-f182.google.com with SMTP id l4so5088235lbv.27 for ; Sun, 29 Dec 2013 00:05:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:from:date:message-id:subject:to:content-type; bh=fUbaOcuLwamTTiwNtcUnnx6ULSUPiRNTH+WKhxLOzE8=; b=Gzrhagrt02l020F0ZA0cfBruFXeHEheeZBznKCoaPB5uEolJ4eEtNelFCLC75gddpC 7qHQlfLvCnEcWh2/krD6WrpDHte4XnZJ49bFH4nr+cDMugWsn0dVEQ9mqrLis7af0Cee mYOTPW7Hfs4rkqP9acca58UR0Poz8eTilvOZy4HVl0qT4G23Juw799oVk2RI4y6LpZo+ 3Rv/Wcsv9WOgmw6l5+jH92EZhrvolemSzpzesXNj4YDa62T68SYU55ocBkbFW0hkzmD3 qkPVWbMUMjFuGrDKjBvwdTnpzuCOmCT2tHi5PaZ5u0IF3baE2atOq+OMcmpY54ppom1Q NsLA== X-Received: by 10.152.234.75 with SMTP id uc11mr11989598lac.30.1388304339520; Sun, 29 Dec 2013 00:05:39 -0800 (PST) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.112.6.68 with HTTP; Sun, 29 Dec 2013 00:04:59 -0800 (PST) Date: Sun, 29 Dec 2013 17:04:59 +0900 X-Google-Sender-Auth: 0YGAk3xgDODB7EXs3taYFPrDG18 Message-ID: To: "internals@lists.php.net" Content-Type: multipart/alternative; boundary=001a113412d6ff4fa404eea7caff Subject: GMP and empty() From: yohgaki@ohgaki.net (Yasuo Ohgaki) --001a113412d6ff4fa404eea7caff Content-Type: text/plain; charset=UTF-8 Hi all, GMP '0' object does not evaluated as empty() $ ./php-bin -r '$v = gmp_init("0"); var_dump(empty($v), $v == 0);' bool(false) bool(true) This may cause confusion and bugs in user scripts. Most math functions does not work with GMP object neither. We might be better to raise warning for math functions that do not support GMP object. Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net --001a113412d6ff4fa404eea7caff--