If I have a string (containing a PDF file) is it possible to make a "virtual" file to avoid writing to the hard disk, to be later used in a function which requires an existing file?
// theorical code
$file=stringToVirtualFile($string);
require($file);
You can use the special php://memory to have a file handle that reference in-memory data instead of data written to a file. You may also use php://temp to have a file backed memory store (where the file will be written to disk if it exceeds 2MB by default).