Skip to content

Stdlib: spl_autoload_register() VM (closes #1369) - #1405

Merged
PurHur merged 1 commit into
masterfrom
fix/issue-1369-spl-autoload
May 24, 2026
Merged

PurHur merged 1 commit into
masterfrom
fix/issue-1369-spl-autoload

Conversation

@PurHur

@PurHur PurHur commented May 24, 2026

Copy link
Copy Markdown
Owner

Summary

  • Implement spl_autoload_register() for the VM: callbacks stored on Context, invoked when resolving unknown classes before PSR-4 loaders.
  • Support string function names, Class::method, and [class, method] array callables.
  • JIT/AOT explicitly deferred; capabilities matrix and compliance PHPT updated.

Test plan

  • SplAutoloadRegisterTest (Runtime, no subprocess)
  • test/compliance/cases/stdlib/spl_autoload_register.phpt
  • php script/capability-matrix.php --check
  • Manual: php bin/vm.php with autoload demo script

Closes #1369

Made with Cursor

Register string and array callables on Context and invoke them when resolving
unknown classes; JIT deferred with compliance PHPT and unit coverage.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Stdlib: spl_autoload_register() — VM + LLVM JIT/AOT

1 participant