HEX
Server: Apache
System: Linux sg241.singhost.net 2.6.32-896.16.1.lve1.4.51.el6.x86_64 #1 SMP Wed Jan 17 13:19:23 EST 2018 x86_64
User: honghock (909)
PHP: 8.0.30
Disabled: passthru,system,shell_exec,show_source,exec,popen,proc_open
Upload Files
File: //opt/cloudlinux/alt-php54/root/usr/share/pear/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