Skip to content

Incorrect multiplication if used before operation (int) #8937

@popov-do

Description

@popov-do

Description

The following code:

<?php
echo (int)(314.15*100);
echo "\n";
echo (int)(314.14*100);
echo "\n";
echo (314.15*100);

Resulted in this output:

31414 
31414
31415

But I expected this output instead:

31415
31414
31415

PHP Version

PHP 8.1.7

Operating System

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions