Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:87080 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 7187 invoked from network); 8 Jul 2015 19:45:46 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 8 Jul 2015 19:45:46 -0000 Authentication-Results: pb1.pair.com smtp.mail=smalyshev@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=smalyshev@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.220.53 as permitted sender) X-PHP-List-Original-Sender: smalyshev@gmail.com X-Host-Fingerprint: 209.85.220.53 mail-pa0-f53.google.com Received: from [209.85.220.53] ([209.85.220.53:35769] helo=mail-pa0-f53.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 2B/D3-01629-7ED7D955 for ; Wed, 08 Jul 2015 15:45:44 -0400 Received: by pactm7 with SMTP id tm7so136816599pac.2 for ; Wed, 08 Jul 2015 12:45:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=dBQJzmYl3/nNRXewfSkHlU288cYVwzLKaXv3keVOiZE=; b=l6j0Mw9NqfzJfqx60Qo5l/HmuKjD2FrzOXY8OuQDbH8y3tdATwetf3cwWc96QlgGjX c1Vh0RsjVZHTx33/xs3fOiPTYCL1useE383szRt6rjUcDvckUt0Cl7rjUdCBDCDt040g UBOmW5tFs794n3UOk76DrvuGWtOL74ffd9yQ3jWSvwSwGL9y+td1cMja14thLrM5TcdZ jZk3QMuJ/V5Ci6fdjiCBQZY7ng6NTjOeqqhmOlDswm9U3Cit11V9isQcsEwkIcWDD4MT hIsd5WxJdExhkROb1rKw4NweBDBGwtPS1gDBKyXNNIjr15hz3mA5iClgWCGvk8ZrovL8 QljA== X-Received: by 10.68.69.11 with SMTP id a11mr23633381pbu.169.1436384741497; Wed, 08 Jul 2015 12:45:41 -0700 (PDT) Received: from Stas-Air.local (108-66-6-48.lightspeed.sntcca.sbcglobal.net. [108.66.6.48]) by smtp.gmail.com with ESMTPSA id ks7sm3375581pbc.34.2015.07.08.12.45.40 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 Jul 2015 12:45:40 -0700 (PDT) Message-ID: <559D7DE1.8000603@gmail.com> Date: Wed, 08 Jul 2015 12:45:37 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Net Mo , internals@lists.php.net References: In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Change IntlChar::getNumericValue() to return something less horrible when the char is not numeric? From: smalyshev@gmail.com (Stanislav Malyshev) Hi! > ICU documentation: > http://icu-project.org/apiref/icu4c/uchar_8h.html#a36982efc84143b9bb5a11bf54b86af48 > > Currently the PHP function returns the U_NO_NUMERIC_VALUE constant, which > is set to the very weird "float(-123456789)"; basically it's a value that > it's certain it doesn't have an Unicode numeric character equivalent > counterpart. > > I would change the function to return NULL instead; what do you think? While the exact value of U_NO_NUMERIC_VALUE looks weird, nobody is going to use it directly, you'd be using U_NO_NUMERIC_VALUE. Comparing to it doesn't look wrong. So changing that to null doesn't seem to improve much, just introduce incompatibility with ICU. -- Stas Malyshev smalyshev@gmail.com