Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gmp throws the wrong error when a GMP object is passed to gmp_init #9308

Closed
@MagicalTux

Description

@MagicalTux

Description

Issue can be found inhttps://github.com/php/php-src/blob/master/ext/gmp/gmp.c#L624

The following code:

<?php$x =gmp_init(gmp_init(123));

Resulted in this output:

PHP Warning:  Uncaught TypeError: gmp_init(): Argument #1 ($num) must be of type GMP|string|int, GMP given in php shell code:1

But I expected this output instead:

PHP Warning:  Uncaught TypeError: gmp_init(): Argument #1 ($num) must be of type string|int, GMP given in php shell code:1

PHP Version

8.1.6

Operating System

Gentoo

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp