I hereby claim:
- I am helgi on github.
- I am helgi (https://keybase.io/helgi) on keybase.
- I have a public key whose fingerprint is E2D3 707C 16EB 42A3 819D 176E A9BF 3A73 FB00 EE6A
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
<?php | |
require_once __DIR__ . '/vendor/php/PEAR2/Autoload.php'; | |
// Setup the local source dir | |
PEAR2\Autoload::initialize(__DIR__ . '/src'); | |
// Setup the Pyrus_Developer checkout | |
PEAR2\Autoload::initialize(__DIR__ . '/../Pyrus/src'); | |
// Fall back to the local vendor dir |
<?php | |
function saveCacheFile($file, $contents) | |
{ | |
$len = strlen($contents); | |
$cachefile_fp = @fopen($file, 'xb'); // x is the O_CREAT|O_EXCL mode | |
if ($cachefile_fp !== false) { // create file | |
if (fwrite($cachefile_fp, $contents, $len) < $len) { | |
fclose($cachefile_fp); | |
return PEAR::raiseError("Could not write $file."); |
<?php | |
function saveCacheFile($file, $contents) | |
{ | |
$serialized = serialize($contents); | |
$len = strlen($serialized); | |
$cachefile_fp = @fopen($file, 'xb'); // x is the O_CREAT|O_EXCL mode | |
if ($cachefile_fp !== false) { // create file | |
if (fwrite($cachefile_fp, $serialized, $len) < $len) { | |
return PEAR::raiseError("Could not write $file."); |