hhvm icon indicating copy to clipboard operation
hhvm copied to clipboard

php://memory == php://tempfile

Open ptarjan opened this issue 11 years ago • 3 comments

php://memory is backed by TempFile, not MemFile - is this intentional? Zend is never disk-backed for php://memory

Found out by investigating why fstat fails on an UrlFile - backed by MemFile which doesn't implement it, then got confused by fstat working on php://memory

ptarjan avatar Sep 18 '14 18:09 ptarjan

It MemFile isn't writable, wouldn't be hard to add a MutableMemFile that would work for this. Additionally in PHP php://tempfile is initially memory backed, but we immediately write to disk.

paulbiss avatar Nov 11 '14 07:11 paulbiss

@paulbiss Any progress on this in the last year and a half?

Orvid avatar Mar 16 '16 16:03 Orvid

This issue still reproduces on an hhvm build from June 2025.

lexidor avatar Jul 03 '25 20:07 lexidor