rfc:remove_hex_support_in_numeric_strings

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
rfc:remove_hex_support_in_numeric_strings [2015/01/03 19:38] nikicrfc:remove_hex_support_in_numeric_strings [2015/01/27 22:39] – RFC accepted nikic
Line 2: Line 2:
   * Date: 2014-08-19   * Date: 2014-08-19
   * Author: Nikita Popov <nikic@php.net>   * Author: Nikita Popov <nikic@php.net>
-  * Status: Draft+  * Status: Accepted
   * Target version: PHP 7   * Target version: PHP 7
  
Line 11: Line 11:
 PHP internally has two primary methods from converting strings into numbers: PHP internally has two primary methods from converting strings into numbers:
  
-The first, and most commonly used, are direct casts to the integer or float types (''convert_to_long'' and ''convert_to_double''). These casts to **NOT** support hexadecimal decimals:+The first, and most commonly used, are direct casts to the integer or float types (''convert_to_long'' and ''convert_to_double''). These casts do **NOT** support hexadecimal numbers:
  
 <code php> <code php>
Line 39: Line 39:
 var_dump('0x123' == '291'); // TRUE var_dump('0x123' == '291'); // TRUE
  
-var_dump((int) '0x123' == (int) '291')); // FALSE+var_dump((int) '0x123' == (int) '291'); // FALSE
 </code> </code>
  
Line 66: Line 66:
  
 ===== Vote ===== ===== Vote =====
 +
 +As this is a language change a 2/3 majority is required.
 +
 +The vote started on 2015-01-17 and ends on 2015-01-27.
 +
 +<doodle title="Remove hex support in numeric strings?" auth="nikic" voteType="single" closed="true">
 +   * Yes
 +   * No
 +</doodle>
  
rfc/remove_hex_support_in_numeric_strings.txt · Last modified: 2017/09/22 13:28 by 127.0.0.1