Skip to content

ArrayObject::ksort() and its sibling sort methods are missing: calling one traps with "Call to undefined method". #612

Closed

Description

@blacktrs

Summary

ArrayObject::ksort() and its sibling sort methods are missing: calling one traps with "Call to undefined method".

Repro

<?php
$ao = new ArrayObject(['b' => 2, 'a' => 1, 'c' => 3]);
$ao->ksort();
echo json_encode($ao->getArrayCopy()), "\n";
$ao->asort();
echo json_encode($ao->getArrayCopy()), "\n";

Expected (php)

{"a":1,"b":2,"c":3}
{"a":1,"b":2,"c":3}

Actual (manticore 072d4b4a, Darwin arm64)


[exit code 255]
PHP Fatal error:  Uncaught Error: Call to undefined method ArrayObject::ksort()

Tracking

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