Skip to content

A float with an integral value passed to an int parameter reaches the callee as its raw IEEE bits. #298

Closed

Description

@blacktrs

Summary

A float with an integral value passed to an int parameter reaches the callee as its raw IEEE bits.

Repro

<?php
function f(int $n): int { return $n; }
$n = 1000;
echo f($n / 2), "\n";
echo f(10.0), "\n";

Expected (php)

500
10

Actual (manticore 5e4d6fb8, Darwin arm64)

4647503709213818880
4621819117588971520

Tracking

Known-bug repro: tests/aot/repro/wrong/float_arg_to_int_param.php — bash tests/aot/xfail.sh -k float_arg_to_int_param reports XFAIL while this is open and XPASS once it is fixed; then move the repro into tests/aot/cases/ and close this issue.

Activity

  1. added
    bug
    wrong-answer
    on Oct 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugwrong-answer

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions