Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:87082 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 65286 invoked from network); 9 Jul 2015 06:01:10 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Jul 2015 06:01:10 -0000 Authentication-Results: pb1.pair.com header.from=netmo.php@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=netmo.php@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.223.180 as permitted sender) X-PHP-List-Original-Sender: netmo.php@gmail.com X-Host-Fingerprint: 209.85.223.180 mail-ie0-f180.google.com Received: from [209.85.223.180] ([209.85.223.180:36098] helo=mail-ie0-f180.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 99/C0-32504-32E0E955 for ; Thu, 09 Jul 2015 02:01:09 -0400 Received: by iecvh10 with SMTP id vh10so170419804iec.3 for ; Wed, 08 Jul 2015 23:01:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=1Q2gTWUPpSsaH3xqk7ByxkI6WOWLOXwoJ2Rx7B4QuHE=; b=mVb6/rSYIz+jkk+YaLTx2Gj72/pPqFC2c/JXF+B0t5NPjLkO4O1EEibRMfWoDjN4Yb 6KxK+dkfKCiTuhZU7+M6jMO/KENm4IakZLKpqI5HUDzPzby1aFUtMZqFYm0wruWmFTCl GYSFvKoRRoAuGdF5gngRbH95RcI8CAspY5NGGqiDMpjdANZTuvNn20qNr8aD0AdDdzaD USJP2Q+Jcdl6WlIElMtJ5/jP5O615nE4HJqogYaeyKLHpGGdGuOgLXuMjK6IRDkAryYx B7HqIqGg6HjaUGXn954VetdqAZryIQgaw+Mx/zjWrArox4MFIaWQ1f77ZPsfqP2Nt9u0 vAHQ== MIME-Version: 1.0 X-Received: by 10.107.133.234 with SMTP id p103mr24438423ioi.85.1436421664188; Wed, 08 Jul 2015 23:01:04 -0700 (PDT) Received: by 10.107.137.25 with HTTP; Wed, 8 Jul 2015 23:01:04 -0700 (PDT) Date: Thu, 9 Jul 2015 08:01:04 +0200 Message-ID: To: internals@lists.php.net Content-Type: multipart/alternative; boundary=001a113ea5000aaeb6051a6afb96 Subject: Re: [PHP-DEV] Change IntlChar::getNumericValue() to return something less horrible when the char is not numeric? From: netmo.php@gmail.com (Net Mo) --001a113ea5000aaeb6051a6afb96 Content-Type: text/plain; charset=UTF-8 I've asked Sara to add the NO_NUMERIC_VALUE constant to IntlChar because it is missing, but she suggested the method could return NULL instead. Any of the two options is fine for me... 2015-07-08 21:45 GMT+02:00 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 > --001a113ea5000aaeb6051a6afb96--