File: 008.phpt

package info (click to toggle)
php-yac 2.0.1%2B0.9.2-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 548 kB
  • ctags: 565
  • sloc: ansic: 4,581; xml: 298; makefile: 1
file content (39 lines) | stat: -rw-r--r-- 731 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
--TEST--
Check for yac prefix
--SKIPIF--
<?php if (!extension_loaded("yac")) print "skip"; ?>
--INI--
yac.enable=1
yac.enable_cli=1
yac.keys_memory_size=4M
yac.values_memory_size=32M
--FILE--
<?php
$yac = new Yac("dummy_");
$yac2 = new Yac();

$key = "bar";
$value = true;

$yac->set($key, $value);
var_dump($yac->get($key));  //true
var_dump($yac2->get($key)); //false
var_dump($yac2->get("dummy_" . $key)); //true

$yac2->delete($key);  //fail
var_dump($yac->get($key));  //true

$yac->delete($key); //okey
var_dump($yac->get($key));  //false

$yac->set($key, $value);
$yac2->delete("dummy_" . $key);  //okey
var_dump($yac->get($key));  //false
?>
--EXPECTF--
bool(true)
bool(false)
bool(true)
bool(true)
bool(false)
bool(false)