New PHP5 APC - version 3.0.18, using PHP5 5.2.0-8+etch10,
[php5-apc.git] / tests / apc_002.phpt
diff --git a/tests/apc_002.phpt b/tests/apc_002.phpt
new file mode 100644 (file)
index 0000000..8f22162
--- /dev/null
@@ -0,0 +1,34 @@
+--TEST--
+APC: apc_store/fetch with objects
+--SKIPIF--
+<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
+--INI--
+apc.enabled=1
+apc.enable_cli=1
+apc.file_update_protection=0
+--FILE--
+<?php
+
+class foo { }
+$foo = new foo;
+var_dump($foo);
+apc_store('foo',$foo);
+unset($foo);
+$bar = apc_fetch('foo');
+var_dump($bar);
+$bar->a = true;
+var_dump($bar);
+
+?>
+===DONE===
+<?php exit(0); ?>
+--EXPECTF--
+object(foo)#%d (0) {
+}
+object(foo)#%d (0) {
+}
+object(foo)#%d (1) {
+  ["a"]=>
+  bool(true)
+}
+===DONE===