Skip to content

Stdlib: is_uploaded_file() VM + LLVM JIT/AOT - #2206

Merged
PurHur merged 1 commit into
masterfrom
agent/stdlib-is_uploaded_file
May 25, 2026
Merged

Stdlib: is_uploaded_file() VM + LLVM JIT/AOT#2206
PurHur merged 1 commit into
masterfrom
agent/stdlib-is_uploaded_file

Conversation

@PurHur

@PurHur PurHur commented May 25, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds is_uploaded_file(string $filename): bool for VM, JIT, and AOT using native upload temp validation (no PHP internal wrappers).
  • Extracts upload helpers into lib/AOT/runtime/phpc_upload_temp.c and adds StringFsDir JIT bitcode linking (also fixes move_uploaded_file AOT segfault via missing stdlib.h).
  • Adds compliance PHPTs, AOT fixture, and unit tests.

Closes #2204

Test plan

  • vendor/bin/phpunit test/unit/IsUploadedFileBuiltinTest.php
  • vendor/bin/phpunit test/aot/AotTest.php --filter is_uploaded_file
  • Manual VM: php bin/vm.php with tempnam + is_uploaded_file
  • Bonus: vendor/bin/phpunit test/aot/AotTest.php --filter move_uploaded_file (AOT green after upload runtime split)

Made with Cursor

Closes #2204. Reuses upload temp validation from move_uploaded_file via
phpc_upload_temp.c; adds StringFsDir JIT bitcode linking and fixes AOT
segfault (missing stdlib.h for getenv).

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur
PurHur merged commit 6752bc4 into master May 25, 2026
@PurHur
PurHur deleted the agent/stdlib-is_uploaded_file branch May 25, 2026 22:57
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: is_uploaded_file() VM + LLVM JIT/AOT

1 participant