File: apc_bin_002.phpt

package info (click to toggle)
php-apcu 5.1.17%2B4.0.11-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,888 kB
  • sloc: ansic: 11,028; php: 1,705; xml: 859; pascal: 5; makefile: 1
file content (29 lines) | stat: -rw-r--r-- 757 bytes parent folder | download | duplicates (5)
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
--TEST--
APC: bindump user cache, variation 2
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
<?php
/* XXX this is a hack, but otherwise the data for each platform 
   has te be created manually */
apc_clear_cache();
apc_store('foo', 42);
apcu_bin_dumpfile(array('foo'), dirname(__FILE__) . '/foo.bin', APC_BIN_VERIFY_MD5 | APC_BIN_VERIFY_CRC32);
--INI--
apc.enabled=1
apc.enable_cli=1
--FILE--
<?php
apc_clear_cache();
var_dump(apc_fetch('foo'));
apcu_bin_loadfile(dirname(__FILE__) . '/foo.bin', NULL, APC_BIN_VERIFY_MD5 | APC_BIN_VERIFY_CRC32);
var_dump(apc_fetch('foo'));
?>
===DONE===
<?php exit(0); ?>
--CLEAN--
<?php
unlink(dirname(__FILE__) . '/foo.bin');
--EXPECTF--
bool(false)
int(42)
===DONE===