Skip to content

var_export(PHP_INT_MIN) prints the literal -9223372036854775808 instead of -9223372036854775807-1 #330

Closed

Description

@blacktrs

Summary

var_export(PHP_INT_MIN) prints the literal -9223372036854775808 instead of -9223372036854775807-1.

Repro

<?php
var_export(PHP_INT_MIN);
echo "\n";
var_export([PHP_INT_MIN]);
echo "\n";

Expected (php)

-9223372036854775807-1
array (
  0 => -9223372036854775807-1,
)

Actual (manticore 2e07cc36, Darwin arm64)

-9223372036854775808
array (
  0 => -9223372036854775808,
)

Tracking

Known-bug repro: tests/aot/repro/wrong/var_export_int_min.php — bash tests/aot/xfail.sh -k var_export_int_min 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