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/pearbug7618.phpt
--TEST--
pearbug7618
--INI--
track_errors=Off
--FILE--
<?php

require_once __DIR__ . '/callcache.inc';
require_once __DIR__ . '/tmpdir.inc';
require_once __DIR__ . '/cache_lite_base.inc';

$options = array(
    'cacheDir' => tmpDir() . '/',
    'lifeTime' => 60,
    'automaticSerialization' => true
);

$cache = new Cache_Lite($options);
$cacheid = "testid";
$tmpar = array();
for ($i=0; $i<2; $i++) {
    $ar[] = 'foo';
    if ($cache->save($ar,$cacheid)) {
        echo "TRUE\n";
    } else {
        echo "FALSE\n";
    }
    if ($data = $cache->get($cacheid)) {
        echo($data[0] . "\n");
    } else {
        echo "FALSE\n";
    }
}
$cache->remove('testid');

?>
--EXPECT--
TRUE
foo
TRUE
foo

Hry