Heray-Was-Here
Server : Apache
System : Linux infong-uk56 4.4.400-icpu-108 #2 SMP Wed Feb 11 11:51:01 UTC 2026 x86_64
User : u78863098 ( 10368940)
PHP Version : 8.4.24
Disable Function : NONE
Directory :  /usr/lib/php8.4/test/Cache_Lite/tests/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/lib/php8.4/test/Cache_Lite/tests/pearbug13693.phpt
--TEST--
pearbug13693
--INI--
track_errors=Off
--FILE--
<?php
require_once __DIR__ . '/bootstrap.php';
require_once __DIR__ . '/../Cache/Lite.php';

// Create temp dir
$dir = dirname( __FILE__ ) . '/' . uniqid();
mkdir($dir);

$options = array(
'cacheDir' => $dir,
'lifeTime' => 60,
);
$id = '#13693';
$cache = new Cache_Lite($options);
$cache->save('stuff', $id);
// Must be true
echo $cache->remove($id) === true ? "OK\n" : "ERROR\n";
// Will return a PEAR Error
echo $cache->remove($id) instanceof PEAR_Error ? "OK\n" : "ERROR\n";
// Will return true
echo $cache->remove($id, 'default', true) === true ? "OK\n" : "ERROR\n";

// Remove temp dir
rmdir($dir);
--EXPECT--
OK
OK
OK

Hry