summaryrefslogtreecommitdiff
path: root/ext/gmp/gmp.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/gmp/gmp.c')
-rw-r--r--ext/gmp/gmp.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/gmp/gmp.c b/ext/gmp/gmp.c
index 0f4b317fd0..da1ab3047f 100644
--- a/ext/gmp/gmp.c
+++ b/ext/gmp/gmp.c
@@ -605,6 +605,9 @@ static zend_result convert_to_gmp(mpz_t gmpnumber, zval *val, zend_long base, ui
if ((base == 0 || base == 16) && (numstr[1] == 'x' || numstr[1] == 'X')) {
base = 16;
skip_lead = 1;
+ } else if ((base == 0 || base == 8) && (numstr[1] == 'o' || numstr[1] == 'O')) {
+ base = 8;
+ skip_lead = 1;
} else if ((base == 0 || base == 2) && (numstr[1] == 'b' || numstr[1] == 'B')) {
base = 2;
skip_lead = 1;