Hi Chu,
Its currently coded to treat that as 'ff' so any odd amount of '-'
makes it negative, and any even amount is positive.
Thanks
Scott
On 19.06.2019 14:12, CHU Zhaowei wrote:
Hi Scott,
Could you clarify what will happen if multiple negative sign occurs.
I didn't find it in the RFC.
e.g. base_convert('--ff', 16, 10)
Thanks,
CHU Zhaowei
-----Original Message-----
From: Scott Dutton <sc...@exussum.co.uk>
Sent: Wednesday, June 19, 2019 3:24 PM
To: internals@lists.php.net
Subject: [PHP-DEV] [RFC] [Vote] Base convert changes
Hi all
I have put my RFC base convert changes to vote this morning
https://wiki.php.net/rfc/base_convert_improvements
Two votes, one to raise a deprecated error in PHP7.4 (raised to
exception in PHP
8) when base_convert encounters something it doesnt know how to
convert.
Second vote is to allow negative numbers, eg base_convert('-FF', 16,
10) would return -255 (this returns 255 currently)
Voting ends 3rd July
Thanks
Scott
--
PHP Internals - PHP Runtime Development Mailing List To unsubscribe,
visit:
http://www.php.net/unsub.php
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php