Doc #50886 [Csd->ReO]: Incomplete documentation for php://memory

From: Date: Wed, 09 Dec 2015 13:37:39 +0000
Subject: Doc #50886 [Csd->ReO]: Incomplete documentation for php://memory
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-12921@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=50886&edit=1 ID: 50886 Updated by: cweiske@php.net Reported by: nospam at mckenzies dot net Summary: Incomplete documentation for php://memory -Status: Closed +Status: Re-Opened Type: Documentation Problem Package: Documentation problem Operating System: any PHP Version: Irrelevant Block user comment: N Private report: N Previous Comments: ------------------------------------------------------------------------ [2010-02-22 04:11:03] nospam at mckenzies dot net Thta's what I figured. Could someone add that to the docs? ------------------------------------------------------------------------ [2010-02-16 07:59:33] kalle@php.net Yes it only works for streams. You cannot store data in php://memory, and later use it in another stream: This will not work, because after file_put_contents() the stream will be closed and the data in php://memory will be lost: file_put_contents('php://memory', 'PHP'); echo file_get_contents('php://memory'); ------------------------------------------------------------------------ [2010-01-30 17:01:21] nospam at mckenzies dot net The documentation referred to is: http://us3.php.net/manual/en/wrappers.php.php ------------------------------------------------------------------------ [2010-01-30 16:56:06] nospam at mckenzies dot net Description: ------------ The documentation for php://memory is incomplete. There is no example and there is no mention of what functions support the use of php://memory. Does it only work with streams? Reproduce code: --------------- $text = 'Some text.'; file_put_contents('php://memory', $text); echo file_get_contents('php://memory'); Expected result: ---------------- Some text. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=50886&edit=1

« previous php.doc.bugs (#12921) next »