1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-22 05:41:20 +01:00

Allow GMP to be converted to string

This commit is contained in:
Matthew Brown 2018-05-05 13:04:27 -04:00
parent 3718bd5c61
commit c39af03a01
2 changed files with 3 additions and 1 deletions

View File

@ -3348,6 +3348,7 @@ return [
'gmmktime' => ['int', 'hour='=>'int', 'min='=>'int', 'sec='=>'int', 'mon='=>'int', 'day='=>'int', 'year='=>'int'],
'GMP::__construct' => ['void'],
'GMP::serialize' => ['string'],
'GMP::__toString' => ['string'],
'GMP::unserialize' => ['void', 'serialized'=>'string'],
'gmp_abs' => ['GMP', 'a'=>'GMP|string|int'],
'gmp_add' => ['GMP', 'a'=>'GMP|string|int', 'b'=>'GMP|string|int'],

View File

@ -66,7 +66,8 @@ class BinaryOperationTest extends TestCase
$a = gmp_init(2);
$b = gmp_init(4);
$c = $a + $b;
$d = $c + 3;',
$d = $c + 3;
echo $d;',
'assertions' => [
'$a' => 'GMP',
'$b' => 'GMP',