checksums); $imageJsonFile = "$imageFile.json"; $fp = fopen($imageJsonFile, 'w'); fwrite($fp, $json_result); fclose($fp); $phar->startBuffering(); $phar->setStub($this->generateStub()); $phar->addFile($imageJsonFile, "core_image.json"); $phar->compressFiles(Phar::GZ); $phar->stopBuffering(); rename($imagePharFile, $imageFile); } protected function generateStub() { $data = parent::generateStub(); $data .= "__HALT_COMPILER();"; return $data; } }