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