Skip to content

range("1", "4") returns ints; php 8.5 keeps numeric-string endpoints as strings. #284

Closed

Description

@blacktrs

Summary

range("1", "4") returns ints; php 8.5 keeps numeric-string endpoints as strings.

Repro

<?php
var_dump(range("1", "3"));

Expected (php)

array(3) {
  [0]=>
  string(1) "1"
  [1]=>
  string(1) "2"
  [2]=>
  string(1) "3"
}

Actual (manticore 9bf0a363, Darwin arm64)

array(3) {
  [0]=>
  int(1)
  [1]=>
  int(2)
  [2]=>
  int(3)
}

Tracking

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