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

MySQLi uses unsupported format specifier on Windows #8267

Closed
@cmb69

Description

@cmb69

Description

The following code:

<?php$mysqli =newmysqli($host,$user,$pass,$db);$mysqli->query("DROP TABLE IF EXISTS foo");var_dump($mysqli->query("CREATE TABLE foo (id BIGINT UNSIGNED AUTO_INCREMENT, PRIMARY KEY (id))"));var_dump($mysqli->query("INSERT INTO foo VALUES (9223372036854775807)"));var_dump($mysqli->insert_id);var_dump($mysqli->query("INSERT INTO foo VALUES (0)"));var_dump($mysqli->insert_id);

Resulted in this output:

string(5) "%I64u"string(5) "%I64u"

But I expected this output instead:

string(19) "9223372036854775807"string(19) "9223372036854775808"

The problem is that as of PHP 8.0.0, the %I* specifiers are no longer supported by our customsnprintf andspprintf implementations. This issue came up inphp/doc-en#1483.


Well, actually I expected the following:

int(9223372036854775807)string(19) "9223372036854775808"

but thatoff-by-one error is a minor issue, and fixing it would be a BC break.

PHP Version

PHP 8.0.17-dev

Operating System

Windows

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