Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:104670 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 51646 invoked from network); 12 Mar 2019 16:16:06 -0000 Received: from unknown (HELO thephantoms.co.uk) (176.126.243.54) by pb1.pair.com with SMTP; 12 Mar 2019 16:16:06 -0000 Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=exussum.co.uk; s=default; x=1553000760; h=Comment: DomainKey-Signature:Received:To:Subject:MIME-Version: Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To: References:Message-ID:User-Agent; bh=9OPPmhoMp5b4NN0Mwg+SvxKHpvn 2iXRSa41U/XtbCUY=; b=jA7yYhwuLsJlJXUfDK6HuTTuwVyEqW5n8Ebea+3NoOG G6jz2YTYeqHcHPdb8pcNPME7ovGu7N6JQDdB/BNkPi7+VA7UlP+VuzBCDJ+ermuB hckPXBlw8Q6VrdExGrC5JmmzNyHKP2DAPnc5rjZGedk4jHBFIFdocvkhMU5O4JEU = Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=exussum.co.uk; h=Received:To:Subject:MIME-Version:Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:References:Message-ID:X-Sender:User-Agent; b=bZzqdyZmiITmWAIPvbBJOPw6BHHP9rdEE1IvGivR5CMy+G4zwgMJGngQG/vNMp WP6akawE//BkirCjPhXpiHx5KqgMHxvJg+PoeOheCXFQ2/i0Q0CGndxJ6UDHFlg5 E3HLgIz5h5h0oXjtOH/JLg8UogE2i15VmDO6sExQoufJg=; Received: (qmail 13422 invoked by uid 48); 12 Mar 2019 13:05:59 -0000 To: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 12 Mar 2019 13:05:59 +0000 In-Reply-To: References: <571527C8-8801-48B5-AEF7-D64CE4C83597@exussum.co.uk> Message-ID: <0e924d54b48acaa966106e576f747ab3@exussum.co.uk> X-Sender: scott@exussum.co.uk User-Agent: RoundCube Webmail/0.1 Subject: Re: [PHP-DEV] =?UTF-8?Q?Base=5Fconvert=20changes?= From: scott@exussum.co.uk (Scott Dutton) On 11.03.2019 10:51, Nikita Popov wrote: > > Both changes sound reasonable to me. Could you show some examples > where the > output is going to change due to the zend_ulong->zend_long switch? > > Nikita Sure! For example var_dump(decbin(9223372036854775807)); would currently show string(64) "1000000000000000000000000000000000000000000000000000000000000000" After these changes it would show string(65) "-000000000000000000000000000000000000000000000000000000000000000" var_dump(decbin(9223372036854775806)); would be the same for both showing. string(63) "111111111111111111111111111111111111111111111111111111111111110" As the code is reused for decbin etc all of the helper functions have a similar effect. Also userland code would look like this currently $converted = base_convert($original, 2, 10); if ($original < 0) { $converted = - $converted; } So anyone who use coded around this will also break. I have pushed some fixed suggested to the PR again all comments welcome, my C is quite rusty so happy to change anything Thanks