summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorGeorge Peter Banyard <girgias@php.net>2020-10-19 15:19:15 +0100
committerGeorge Peter Banyard <girgias@php.net>2021-01-04 21:09:23 +0100
commit589bdf30b2bea10172a49bcad26d44b18f192556 (patch)
tree2f507c6d291d4e7195ba1886abeb130d5515b46d /tests
parentab9f497b90bdbbe1f0b0ada1867d1007b7a5958d (diff)
downloadphp-git-589bdf30b2bea10172a49bcad26d44b18f192556.tar.gz
Implement Explicit octal notation for integers RFC
RFC: https://wiki.php.net/rfc/explicit_octal_notation Add an extensive test suits for other variants of integer literals Closes GH-6360
Diffstat (limited to 'tests')
-rw-r--r--tests/lang/integer_literals/binary_32bit.phpt82
-rw-r--r--tests/lang/integer_literals/binary_64bit.phpt82
-rw-r--r--tests/lang/integer_literals/hexadecimal_32bit.phpt82
-rw-r--r--tests/lang/integer_literals/hexadecimal_64bit.phpt83
-rw-r--r--tests/lang/integer_literals/octal_32bit.phpt118
-rw-r--r--tests/lang/integer_literals/octal_64bit.phpt133
6 files changed, 580 insertions, 0 deletions
diff --git a/tests/lang/integer_literals/binary_32bit.phpt b/tests/lang/integer_literals/binary_32bit.phpt
new file mode 100644
index 0000000000..4318940446
--- /dev/null
+++ b/tests/lang/integer_literals/binary_32bit.phpt
@@ -0,0 +1,82 @@
+--TEST--
+Binary integer strings (32bit)
+--SKIPIF--
+<?php
+if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only");
+?>
+--FILE--
+<?php
+/* Using binary prefix notation lowercase */
+/* Maximum value representable as integer */
+$binary = 0b1111111111111111111111111111111;
+var_dump($binary);
+var_dump(PHP_INT_MAX);
+
+/* Floating number */
+$binary = 0b111111010000101010101010101010111111111111111111111111111111111111111111111111111111;
+var_dump($binary);
+
+/* Integer */
+$binary = 0b1010110;
+var_dump($binary);
+
+/* underscore separator */
+$binary = 0b1_010110;
+var_dump($binary);
+
+/* Ignore leading 0 and _ */
+$binary = 0b0_01010110;
+var_dump($binary);
+$binary = 0b0_1010110;
+var_dump($binary);
+
+/* Overflow to infinity */
+$binary = 0b111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111;
+var_dump($binary);
+
+/* Using binary prefix notation uppercase */
+/* Maximum value representable as integer */
+$binary = 0B1111111111111111111111111111111;
+var_dump($binary);
+var_dump(PHP_INT_MAX);
+
+/* Floating number */
+$binary = 0B111111010000101010101010101010111111111111111111111111111111111111111111111111111111;
+var_dump($binary);
+
+/* Integer */
+$binary = 0B1010110;
+var_dump($binary);
+
+/* underscore separator */
+$binary = 0B1_010110;
+var_dump($binary);
+
+/* Ignore leading 0 and _ */
+$binary = 0B0_01010110;
+var_dump($binary);
+$binary = 0B0_1010110;
+var_dump($binary);
+
+/* Overflow to infinity */
+$binary = 0B111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111;
+var_dump($binary);
+
+?>
+--EXPECT--
+int(2147483647)
+int(2147483647)
+float(1.9119287772983036E+25)
+int(86)
+int(86)
+int(86)
+int(86)
+float(INF)
+int(2147483647)
+int(2147483647)
+float(1.9119287772983036E+25)
+int(86)
+int(86)
+int(86)
+int(86)
+float(INF)
diff --git a/tests/lang/integer_literals/binary_64bit.phpt b/tests/lang/integer_literals/binary_64bit.phpt
new file mode 100644
index 0000000000..9b6c3997ae
--- /dev/null
+++ b/tests/lang/integer_literals/binary_64bit.phpt
@@ -0,0 +1,82 @@
+--TEST--
+Binary integer strings (64bit)
+--SKIPIF--
+<?php
+if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
+?>
+--FILE--
+<?php
+/* Using binary prefix notation lowercase */
+/* Maximum value representable as integer */
+$binary = 0b111111111111111111111111111111111111111111111111111111111111111;
+var_dump($binary);
+var_dump(PHP_INT_MAX);
+
+/* Floating number */
+$binary = 0b111111010000101010101010101010111111111111111111111111111111111111111111111111111111;
+var_dump($binary);
+
+/* Integer */
+$binary = 0b1010110;
+var_dump($binary);
+
+/* underscore separator */
+$binary = 0b1_010110;
+var_dump($binary);
+
+/* Ignore leading 0 and _ */
+$binary = 0b0_01010110;
+var_dump($binary);
+$binary = 0b0_1010110;
+var_dump($binary);
+
+/* Overflow to infinity */
+$binary = 0b111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111;
+var_dump($binary);
+
+/* Using binary prefix notation uppercase */
+/* Maximum value representable as integer */
+$binary = 0B111111111111111111111111111111111111111111111111111111111111111;
+var_dump($binary);
+var_dump(PHP_INT_MAX);
+
+/* Floating number */
+$binary = 0B111111010000101010101010101010111111111111111111111111111111111111111111111111111111;
+var_dump($binary);
+
+/* Integer */
+$binary = 0B1010110;
+var_dump($binary);
+
+/* underscore separator */
+$binary = 0B1_010110;
+var_dump($binary);
+
+/* Ignore leading 0 and _ */
+$binary = 0B0_01010110;
+var_dump($binary);
+$binary = 0B0_1010110;
+var_dump($binary);
+
+/* Overflow to infinity */
+$binary = 0B111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111;
+var_dump($binary);
+
+?>
+--EXPECT--
+int(9223372036854775807)
+int(9223372036854775807)
+float(1.9119287772983036E+25)
+int(86)
+int(86)
+int(86)
+int(86)
+float(INF)
+int(9223372036854775807)
+int(9223372036854775807)
+float(1.9119287772983036E+25)
+int(86)
+int(86)
+int(86)
+int(86)
+float(INF)
diff --git a/tests/lang/integer_literals/hexadecimal_32bit.phpt b/tests/lang/integer_literals/hexadecimal_32bit.phpt
new file mode 100644
index 0000000000..1793354a5d
--- /dev/null
+++ b/tests/lang/integer_literals/hexadecimal_32bit.phpt
@@ -0,0 +1,82 @@
+--TEST--
+Hexadecimal integer strings (32bit)
+--SKIPIF--
+<?php
+if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only");
+?>
+--FILE--
+<?php
+/* Using hexadecimal prefix notation lowercase */
+/* Maximum value representable as integer */
+$hex = 0x7FFFFFFF;
+var_dump($hex);
+var_dump(PHP_INT_MAX);
+
+/* Floating number */
+$hex = 0x45FFFABCDE0000000;
+var_dump($hex);
+
+/* Integer */
+$hex = 0x1C;
+var_dump($hex);
+
+/* underscore separator */
+$hex = 0x1_C;
+var_dump($hex);
+
+/* Ignore leading 0 and _ */
+$hex = 0x0_01C;
+var_dump($hex);
+$hex = 0x0_1C;
+var_dump($hex);
+
+/* Overflow to infinity */
+$hex = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;
+var_dump($hex);
+
+/* Using hexadecimal prefix notation uppercase */
+/* Maximum value representable as integer */
+$hex = 0X7FFFFFFF;
+var_dump($hex);
+var_dump(PHP_INT_MAX);
+
+/* Floating number */
+$hex = 0X45FFFABCDE0000000;
+var_dump($hex);
+
+/* Integer */
+$hex = 0X1C;
+var_dump($hex);
+
+/* underscore separator */
+$hex = 0X1_C;
+var_dump($hex);
+
+/* Ignore leading 0 and _ */
+$hex = 0X0_01C;
+var_dump($hex);
+$hex = 0X0_1C;
+var_dump($hex);
+
+/* Overflow to infinity */
+$hex = 0XFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;
+var_dump($hex);
+
+?>
+--EXPECT--
+int(2147483647)
+int(2147483647)
+float(8.070441274821732E+19)
+int(28)
+int(28)
+int(28)
+int(28)
+float(INF)
+int(2147483647)
+int(2147483647)
+float(8.070441274821732E+19)
+int(28)
+int(28)
+int(28)
+int(28)
+float(INF)
diff --git a/tests/lang/integer_literals/hexadecimal_64bit.phpt b/tests/lang/integer_literals/hexadecimal_64bit.phpt
new file mode 100644
index 0000000000..780591d101
--- /dev/null
+++ b/tests/lang/integer_literals/hexadecimal_64bit.phpt
@@ -0,0 +1,83 @@
+--TEST--
+Hexadecimal integer strings (64bit)
+--SKIPIF--
+<?php
+if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
+?>
+--FILE--
+<?php
+/* Using hexadecimal prefix notation lowercase */
+/* Maximum value representable as integer */
+$hex = 0x7FFFFFFFFFFFFFFF;
+var_dump($hex);
+var_dump(PHP_INT_MAX);
+
+/* Floating number */
+$hex = 0x45FFFABCDE0000000;
+var_dump($hex);
+
+/* Integer */
+$hex = 0x1C;
+var_dump($hex);
+
+/* underscore separator */
+$hex = 0x1_C;
+var_dump($hex);
+
+/* Ignore leading 0 and _ */
+$hex = 0x0_01C;
+var_dump($hex);
+$hex = 0x0_1C;
+var_dump($hex);
+
+/* Overflow to infinity */
+$hex = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;
+var_dump($hex);
+
+
+/* Using hexadecimal prefix notation uppercase */
+/* Maximum value representable as integer */
+$hex = 0X7FFFFFFFFFFFFFFF;
+var_dump($hex);
+var_dump(PHP_INT_MAX);
+
+/* Floating number */
+$hex = 0X45FFFABCDE0000000;
+var_dump($hex);
+
+/* Integer */
+$hex = 0X1C;
+var_dump($hex);
+
+/* underscore separator */
+$hex = 0X1_C;
+var_dump($hex);
+
+/* Ignore leading 0 and _ */
+$hex = 0X0_01C;
+var_dump($hex);
+$hex = 0X0_1C;
+var_dump($hex);
+
+/* Overflow to infinity */
+$hex = 0XFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;
+var_dump($hex);
+
+?>
+--EXPECT--
+int(9223372036854775807)
+int(9223372036854775807)
+float(8.070441274821732E+19)
+int(28)
+int(28)
+int(28)
+int(28)
+float(INF)
+int(9223372036854775807)
+int(9223372036854775807)
+float(8.070441274821732E+19)
+int(28)
+int(28)
+int(28)
+int(28)
+float(INF)
diff --git a/tests/lang/integer_literals/octal_32bit.phpt b/tests/lang/integer_literals/octal_32bit.phpt
new file mode 100644
index 0000000000..472fe602c0
--- /dev/null
+++ b/tests/lang/integer_literals/octal_32bit.phpt
@@ -0,0 +1,118 @@
+--TEST--
+Octal integer strings (32bit)
+--SKIPIF--
+<?php
+if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only");
+?>
+--FILE--
+<?php
+/* Using octal prefix notation lowercase */
+/* Maximum value representable as integer */
+$octal = 0o17777777777;
+var_dump($octal);
+var_dump(PHP_INT_MAX);
+
+/* Floating number */
+$octal = 0o45734321536435450000000000;
+var_dump($octal);
+
+/* Integer */
+$octal = 0o16;
+var_dump($octal);
+
+/* underscore separator */
+$octal = 0o1_6;
+var_dump($octal);
+
+/* Ignore leading 0 and _ */
+$octal = 0o0_016;
+var_dump($octal);
+$octal = 0o0_16;
+var_dump($octal);
+
+/* Overflow to infinity */
+$octal = 0o77777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777;
+var_dump($octal);
+
+/* Using octal prefix notation uppercase */
+/* Maximum value representable as integer */
+$octal = 0O17777777777;
+var_dump($octal);
+var_dump(PHP_INT_MAX);
+
+/* Floating number */
+$octal = 0O45734321536435450000000000;
+var_dump($octal);
+
+/* Integer */
+$octal = 0O16;
+var_dump($octal);
+
+/* underscore separator */
+$octal = 0O1_6;
+var_dump($octal);
+
+/* Ignore leading 0 and _ */
+$octal = 0O0_016;
+var_dump($octal);
+$octal = 0O0_16;
+var_dump($octal);
+
+/* Overflow to infinity */
+$octal = 0O77777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777;
+var_dump($octal);
+
+/* Using no dedicated prefix */
+/* Maximum value representable as integer */
+$octal = 017777777777;
+var_dump($octal);
+var_dump(PHP_INT_MAX);
+
+/* Floating number */
+$octal = 045734321536435450000000000;
+var_dump($octal);
+
+/* Integer */
+$octal = 016;
+var_dump($octal);
+
+/* underscore separator */
+$octal = 01_6;
+var_dump($octal);
+
+/* Ignore leading 0 and _ */
+$octal = 00_016;
+var_dump($octal);
+$octal = 0_16;
+var_dump($octal);
+
+/* Overflow to infinity */
+$octal = 077777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777;
+var_dump($octal);
+
+?>
+--EXPECT--
+int(2147483647)
+int(2147483647)
+float(1.7912166229916324E+23)
+int(14)
+int(14)
+int(14)
+int(14)
+float(INF)
+int(2147483647)
+int(2147483647)
+float(1.7912166229916324E+23)
+int(14)
+int(14)
+int(14)
+int(14)
+float(INF)
+int(2147483647)
+int(2147483647)
+float(1.7912166229916324E+23)
+int(14)
+int(14)
+int(14)
+int(14)
+float(INF)
diff --git a/tests/lang/integer_literals/octal_64bit.phpt b/tests/lang/integer_literals/octal_64bit.phpt
new file mode 100644
index 0000000000..742900e4e8
--- /dev/null
+++ b/tests/lang/integer_literals/octal_64bit.phpt
@@ -0,0 +1,133 @@
+--TEST--
+Octal integer strings (64bit)
+--SKIPIF--
+<?php
+if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
+?>
+--FILE--
+<?php
+/* Using octal prefix notation lowercase */
+/* Maximum value representable as integer */
+$octal = 0o777777777777777777777;
+var_dump($octal);
+var_dump(PHP_INT_MAX);
+
+/* *technically* this should work but treat this as a degenerate case */
+$octal = 0o1000000000000000000000;
+var_dump($octal);
+
+/* Floating number */
+$octal = 0o45734321536435450000000000;
+var_dump($octal);
+
+/* Integer */
+$octal = 0o16;
+var_dump($octal);
+
+/* underscore separator */
+$octal = 0o1_6;
+var_dump($octal);
+
+/* Ignore leading 0 and _ */
+$octal = 0o0_016;
+var_dump($octal);
+$octal = 0o0_16;
+var_dump($octal);
+
+/* Overflow to infinity */
+$octal = 0o77777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777;
+var_dump($octal);
+
+/* Using octal prefix notation uppercase */
+/* Maximum value representable as integer */
+$octal = 0O777777777777777777777;
+var_dump($octal);
+var_dump(PHP_INT_MAX);
+
+/* *technically* this should work but treat this as a degenerate case */
+$octal = 0O1000000000000000000000;
+var_dump($octal);
+
+/* Floating number */
+$octal = 0O45734321536435450000000000;
+var_dump($octal);
+
+/* Integer */
+$octal = 0O16;
+var_dump($octal);
+
+/* underscore separator */
+$octal = 0O1_6;
+var_dump($octal);
+
+/* Ignore leading 0 and _ */
+$octal = 0O0_016;
+var_dump($octal);
+$octal = 0O0_16;
+var_dump($octal);
+
+/* Overflow to infinity */
+$octal = 0O77777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777;
+var_dump($octal);
+
+/* Using no dedicated prefix */
+/* Maximum value representable as integer */
+$octal = 0777777777777777777777;
+var_dump($octal);
+var_dump(PHP_INT_MAX);
+
+/* *technically* this should work but treat this as a degenerate case */
+$octal = 01000000000000000000000;
+var_dump($octal);
+
+/* Floating number */
+$octal = 045734321536435450000000000;
+var_dump($octal);
+
+/* Integer */
+$octal = 016;
+var_dump($octal);
+
+/* underscore separator */
+$octal = 01_6;
+var_dump($octal);
+
+/* Ignore leading 0 and _ */
+$octal = 00_016;
+var_dump($octal);
+$octal = 0_16;
+var_dump($octal);
+
+/* Overflow to infinity */
+$octal = 077777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777;
+var_dump($octal);
+
+?>
+--EXPECT--
+int(9223372036854775807)
+int(9223372036854775807)
+float(9.223372036854776E+18)
+float(1.7912166229916324E+23)
+int(14)
+int(14)
+int(14)
+int(14)
+float(INF)
+int(9223372036854775807)
+int(9223372036854775807)
+float(9.223372036854776E+18)
+float(1.7912166229916324E+23)
+int(14)
+int(14)
+int(14)
+int(14)
+float(INF)
+int(9223372036854775807)
+int(9223372036854775807)
+float(9.223372036854776E+18)
+float(1.7912166229916324E+23)
+int(14)
+int(14)
+int(14)
+int(14)
+float(INF)