Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:105171 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 8234 invoked from network); 9 Apr 2019 14:14:05 -0000 Received: from unknown (HELO xdebug.org) (82.113.146.227) by pb1.pair.com with SMTP; 9 Apr 2019 14:14:05 -0000 Received: from localhost (localhost [IPv6:::1]) by xdebug.org (Postfix) with ESMTPS id D7A2E10C5CD; Tue, 9 Apr 2019 12:10:56 +0100 (BST) Date: Tue, 9 Apr 2019 12:10:56 +0100 (BST) X-X-Sender: derick@singlemalt.home.derickrethans.nl To: Nikita Popov cc: Andrea Faulds , PHP internals In-Reply-To: Message-ID: References: <40683e93-f8e9-5a8c-9646-31c73c99396f@fischer.name> <5ca53eb4.1c69fb81.e223b.922eSMTPIN_ADDED_MISSING@mx.google.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Subject: Re: [PHP-DEV] [RFC] Permit trailing whitespace in numeric strings From: derick@php.net (Derick Rethans) On Tue, 9 Apr 2019, Nikita Popov wrote: > On Tue, Apr 9, 2019 at 12:57 PM Derick Rethans wrote: > > > > think about the desired behavior of (int)? > > > > I think there should be no difference in behaviour between implicit and > > explicit cases. > > So to rephrase my question: While I think there is a consensus that > "123xyz" and " 123" should not be accepted by an "int" parameter, it > is not clear to me that there is also a consensus that (int) "123xyz" > and (int) " 123" should result in 0 rather than 123. I meant that (int) should accept the same data as "int" parameters, and hence, the result of (int) " 123" should be 0. cheers, Derick -- https://derickrethans.nl | https://xdebug.org | https://dram.io Like Xdebug? Consider a donation: https://xdebug.org/donate.php, or become my Patron: https://www.patreon.com/derickr twitter: @derickr and @xdebug