xref: /PHP-7.0/ext/gmp/tests/bug50175.phpt (revision 834daa45)
1--TEST--
2Bug #50175: gmp_init() results 0 on given base and number starting with 0x or 0b
3--FILE--
4<?php
5
6var_dump(gmp_init('0bcd', 16));
7var_dump(gmp_init('0xyz', 36));
8
9?>
10--EXPECTF--
11object(GMP)#%d (1) {
12  ["num"]=>
13  string(4) "3021"
14}
15object(GMP)#%d (1) {
16  ["num"]=>
17  string(5) "44027"
18}
19