File: apc_entry_002.phpt

package info (click to toggle)
php-apcu 5.1.24-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 840 kB
  • sloc: ansic: 4,414; php: 907; xml: 766; makefile: 2
file content (20 lines) | stat: -rw-r--r-- 436 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--TEST--
APC: apcu_entry (exception)
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--INI--
apc.enabled=1
apc.enable_cli=1
--FILE--
<?php
$value = apcu_entry("test", function($key){
	throw new Exception($key);
});
?>
--EXPECTF--
Fatal error: Uncaught Exception: test in %s:3
Stack trace:
#0 [internal function]: {closure%S}('test')
#1 %s(%d): apcu_entry('test', Object(Closure))
#2 {main}
  thrown in %s on line 3