Skip to content

Integer arithmethic with large number variants fails #8778

Closed
@cmb69

Description

@cmb69

Description

The following code:

<?php
$int = 0x100000000;
var_dump(
    $int,
    new variant($int) + 1
);

Resulted in this output:

int(4294967296)

Fatal error: Uncaught TypeError: Unsupported operand types: variant + int in %s:%d

But I expected this output instead:

int(4294967296)
int(4294967297)

PHP Version

PHP-8.0

Operating System

Windows x64

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions