Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return type for function gmp_setbit() and gmp_clrbit() are incorrectly documented as GMP #4140

Closed
GaryAllan opened this issue Nov 23, 2024 · 0 comments · Fixed by #4162
Closed

Comments

@GaryAllan
Copy link

The return type for functions gmp_setbit() and gmp_clrbit() is void

See https://github.com/php/php-src/blob/c84b7ed0c52da92d598b2ddf67275e9c9a1e8d81/ext/gmp/gmp.stub.php#L170-L172

https://www.php.net/manual/en/function.gmp-setbit.php documents the return type as GMP.
https://www.php.net/manual/en/function.gmp-clrbit.php documents the return type as GMP.

They do not return a GMP object.

echo (string) gmp_setbit(gmp_init(0), 1);    // Doesn't print 2
nielsdos added a commit to nielsdos/doc-en that referenced this issue Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant