Skip to content

Regression: stream_get_meta_data() php://temp — stream_type MEMORY not TEMP (ext/standard/streams.c) #16577

Description

@PurHur

Category

stdlib · php-src-strict

Problem

stream_get_meta_data() on php://temp must report stream_type => 'TEMP' per php-src wrapper metadata. This compiler returns 'MEMORY', breaking code that branches on temp-stream semantics.

Repro Zend 8.2+ VM (2026-07-05)
stream_get_meta_data(fopen('php://temp','r+'))['stream_type'] 'TEMP' 'MEMORY'

php-src reference

PHP implementation target

  • ext/standard/VmFs.php / stream metadata helpers — distinguish php://temp from php://memory in stream_get_meta_data(); PHP in ext/standard, not new C runtime branches

Repro

./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && php bin/vm.php test/repro/maintainer_gap_stream_get_meta_data_temp_type.php'
# Zend: ok · VM: fail:'MEMORY'

Done when

  • Repro prints ok on VM/JIT/AOT
  • Compliance .phpt guard under test/compliance/cases/stdlib/
  • php-src-strict; no php-compiler-strict shortcut

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:vmVirtual machinebugSomething isn't workingenhancementNew feature or requestimplementation-readySpec complete: repro, php-src ref, done-when — safe for workers to claimphase-4:stdlibPhase 4 – stdlib for web appsstdlib

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions