Skip to content

Language: array_map() JIT/AOT parity (stdlib subset for web helpers) #542

Description

@PurHur

Problem

docs/capabilities.md lists array_map as VM only (no JIT / no AOT). Web apps and templates often use functional helpers:

$ids = array_map('intval', explode(',', $_GET['ids'] ?? ''));

Not a 003-MiniWebApp v1 blocker (Router uses loops), but gaps the capability matrix vs Zend for API-style examples.

Goal

array_map with string function name or callable subset (document limits) in JIT and AOT, matching VM for compliance fixtures.

Implementation hints

Layer Files
VM ext/standard/ — already yes
JIT lib/JIT/Builtin/Standard/ — callback dispatch or inline for string builtins
AOT lib/AOT/Builtin/ shared with VM
Matrix script/capability-matrix.php

Acceptance criteria

docker run --rm -v "$(pwd):/compiler" -w /compiler php-compiler:22.04-dev \
  vendor/bin/phpunit test/compliance/cases/stdlib/array_map_string.phpt

(Matrix row shows JIT/AOT yes.)

Verification (local / Docker only)

./script/ci-local.sh --filter array_map

Dependencies

Priority

P3 — stdlib polish

Links

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions