diff --git a/appendices/migration70/incompatible.xml b/appendices/migration70/incompatible.xml index cb0fad92ca..f36b484dd0 100644 --- a/appendices/migration70/incompatible.xml +++ b/appendices/migration70/incompatible.xml @@ -6,6 +6,7 @@ &appendices.migration70.incompatible.variable-handling; &appendices.migration70.incompatible.foreach; + &appendices.migration70.incompatible.integers; &appendices.migration70.incompatible.removed-functions; &appendices.migration70.incompatible.removed-ini-directives; &appendices.migration70.incompatible.other; diff --git a/appendices/migration70/incompatible/integers.xml b/appendices/migration70/incompatible/integers.xml new file mode 100644 index 0000000000..f8423d942c --- /dev/null +++ b/appendices/migration70/incompatible/integers.xml @@ -0,0 +1,80 @@ + + + + + Changes to <type>integer</type> handling + + + Invalid octal literals + + + Previously, octal literals that contained invalid numbers were silently + truncated (0128 was taken as 012). + Now, an invalid octal literal will cause a parse error. + + + + + Negative bitshifts + + + Bitwise shifts by negative numbers will now throw an + ArithmeticError: + + + +> -1); +?> +]]> + + &example.outputs.5; + + + + &example.outputs.7; + + + + + + + + Out of range bitshifts + + + Bitwise shifts (in either direction) beyond the bit width of an + integer will always result in 0. Previously, the behaviour of + such shifts was architecture dependent. + + + + + diff --git a/appendices/migration70/incompatible/other.xml b/appendices/migration70/incompatible/other.xml index 99e0f22939..e0d81391e2 100644 --- a/appendices/migration70/incompatible/other.xml +++ b/appendices/migration70/incompatible/other.xml @@ -79,16 +79,6 @@ function foo($a, $b, $unused, $unused) { removed. ; should be used instead. - - - Invalid octal literals - - - Previously, octal literals that contained invalid numbers were silently - truncated (0128 was taken as 012). - Now, an invalid octal literal will cause a parse error. - -