Skip to content

[ Runtime ] var_export does not retain float-ness of 1.0 #9874

Open

Description

@lexidor

Describe the bug
var_export and var_export_pure do not maintain float-ness of floating point values that can be cleanly represented as an integer.

Standalone code, or other way to reproduce the problem
\var_export_pure(1.0);

Steps to reproduce the behavior:

  1. Run var_export on a float (1.0)
  2. Observe 1
  3. Expect 1.0

Expected behavior

1.0

Actual behavior

1

Environment

  • Operating system

Ubuntu 26.04

  • Installation method

dockerhub hersheltheodorelayton/hhvm-full

  • HHVM Version
HipHop VM 26.9.29 (rel) (packedptr)
Compiler: heads/hhvm-oss-20260929-0-g7770b7775daf4aa3c287d0ef0a0deadb77c2ed27
Repo schema: dc7e862078876bc8e004ef3ca127bf951d3f2e5c
hackc-4e6507a0c2cea669b32ee599dc2c481e376a53d7-26.9.29

Additional context
N/A

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions