Skip to content

Arrays: Full associative array support (string keys, holes, rehash) #66

@PurHur

Description

@PurHur

Problem

HashTable has packed-list fast paths; several methods throw for non-packed arrays (mergeCopy, sliceCopy, etc.). rehash throws Need to implement rehash in lib/VM/HashTable.php.

Web apps use string-keyed maps ($_GET, config arrays, JSON-decoded data).

Goal

Reliable associative arrays for VM and JIT hashtables.

Tasks

  • Implement rehash for mixed key types
  • JIT: string-key get/set on __hashtable__ (partially used for superglobals)
  • Enable array_merge, array_slice on assoc arrays or document limits
  • PHPT regression suite for string keys, unset, isset

Acceptance criteria

$config = ['db' => 'localhost', 'port' => '3306']; operations work in VM+JIT without LogicException.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions