-
Notifications
You must be signed in to change notification settings - Fork 813
Closed as not planned
Labels
duplicateThis issue or pull request already existsThis issue or pull request already exists
Description
Description
The following code:
<?php
var_dump(-9223372036854775807);
var_dump(-9223372036854775808);
var_dump(PHP_INT_MIN);
var_dump(-9223372036854775807 - 1 === PHP_INT_MIN);
var_dump(-9223372036854775808 === PHP_INT_MIN);
Resulted in this output in PHP 8 (all versions):
int(-9223372036854775807)
float(-9.223372036854776E+18)
int(-9223372036854775808)
bool(true)
bool(false)
Resulted in this output in PHP 7 (all versions):
int(-9223372036854775807)
float(-9.2233720368548E+18)
int(-9223372036854775808)
bool(true)
bool(false)
But I expected this output instead:
int(-9223372036854775807)
int(-9223372036854775808)
int(-9223372036854775808)
bool(true)
bool(true)
PHP Version
all versions of PHP 7 and 8
Operating System
No response
Metadata
Metadata
Assignees
Labels
duplicateThis issue or pull request already existsThis issue or pull request already exists