equal
deleted
inserted
replaced
27 * @return resource |
27 * @return resource |
28 */ |
28 */ |
29 |
29 |
30 function init($int, $base = 10) |
30 function init($int, $base = 10) |
31 { |
31 { |
32 return ( is_resource($int) ) ? $int : gmp_init($int, $base); |
32 return ( is_resource($int) || (is_object($int) && $int instanceof \GMP) ) ? $int : gmp_init($int, $base); |
33 } |
33 } |
34 |
34 |
35 /** |
35 /** |
36 * Converts a number from a GMP integer to a string |
36 * Converts a number from a GMP integer to a string |
37 * @param resource |
37 * @param resource |