SplTempFileObject::__construct Construir un nuevo objeto de fichero temporal &reftitle.description; public SplTempFileObject::__construct intmaxMemory2 * 1024 * 1024 Construir un nuevo objeto de fichero temporal. &reftitle.parameters; maxMemory La cantidad máxima de memoria (en bytes, por omisión es 2 MB) para el fichero temporal a usar. Su el fichero temporal supera este tamaño, Este será movido a un archivo en el directorio temporal del sistema. Si maxMemory es negativo, se usará memoria. Si maxMemory es cero, no se usará memoria. &reftitle.errors; Lanza una RuntimeException si un error ocurre. &reftitle.examples; Ejemplo de <methodname>SplTempFileObject</methodname> Este ejemplo escribe un fichero temporal en la memoria mientras se puede escribir y leer en este. fwrite("Esta es la primera línea\n"); $temp->fwrite("Y esta es la segunda.\n"); echo "Escrito " . $temp->ftell() . " bytes al fichero temporal.\n\n"; // Rebobina y lee lo que fué escrito $temp->rewind(); foreach ($temp as $line) { echo $line; } ?> ]]> &example.outputs.similar; &reftitle.seealso; SplFileObject PHP input/output streams (para php://temp y php://memory)