~ufirst/phpredis/igbinary

« back to all changes in this revision

Viewing changes to tests/igbinary_045b.phpt

  • Committer: Michael Ruoss
  • Date: 2015-03-18 14:12:19 UTC
  • Revision ID: git-v1:c591bdc61de714458440ff13454bc51d94ab5f3d
new build info structure

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
--TEST--
2
 
APCu serializer registration
3
 
--SKIPIF--
4
 
<?php
5
 
if (!extension_loaded('apcu')) {
6
 
        echo "skip APCu not loaded";
7
 
}
8
 
 
9
 
$ext = new ReflectionExtension('apcu');
10
 
if (version_compare($ext->getVersion(), '4.0.2', '<')) {
11
 
        echo "skip require APCu version 4.0.2 or above";
12
 
}
13
 
 
14
 
--INI--
15
 
apc.enable_cli=1
16
 
apc.serializer=igbinary
17
 
--FILE--
18
 
<?php
19
 
echo ini_get('apc.serializer'), "\n";
20
 
 
21
 
class Bar {
22
 
        public $foo = 10;
23
 
}
24
 
 
25
 
$a = new Bar;
26
 
apc_store('foo', $a);
27
 
unset($a);
28
 
 
29
 
var_dump(apc_fetch('foo'));
30
 
--EXPECTF--
31
 
igbinary
32
 
object(Bar)#%d (1) {
33
 
  ["foo"]=>
34
 
  int(10)
35
 
}