|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2020-05-27 12:13 UTC] requinix@php.net
-Status: Open
+Status: Not a bug
[2020-05-27 12:13 UTC] requinix@php.net
[2020-05-27 12:25 UTC] mr dot vladkuz at gmail dot com
[2020-05-27 12:30 UTC] bugreports at gmail dot com
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 01 00:00:01 2025 UTC |
Description: ------------ One bit is lost when using typed parameters function. This occurs for 2^18-2^19. Test script: --------------- class TypeHintEvil { private $num; public function getNum(): int { return $this->num; } public function setNum(int $num): void { $this->num = $num; } } $evil = new TypeHintEvil(); $evil->setNum(4860.98 * 100); echo $evil->getNum(); //486097 Expected result: ---------------- 486098 Actual result: -------------- 486097