- file_get_contents: documentation ( source)
- var_dump: documentation ( source)
- spl_object_hash: documentation ( source)
- fwrite: documentation ( source)
- rewind: documentation ( source)
- fread: documentation ( source)
- fopen: documentation ( source)
<?php
$content = file_get_contents(__FILE__);
$h = fopen('php://temp', 'r+b');
fwrite($h, $content);
rewind($h);
var_dump(spl_object_hash($h));
$h2 = fopen('php://temp', 'r+b');
fwrite($h2, 'Nenenenenenenen');
rewind($h2);
var_dump(fread($h, 20));
var_dump(fread($h2, 20));