File: apc_entry_002.phpt

package info (click to toggle)
php-apcu 5.1.8%2B4.0.11-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 1,860 kB
  • ctags: 2,003
  • sloc: ansic: 12,013; php: 1,699; xml: 644; pascal: 5; makefile: 1
file content (20 lines) | stat: -rw-r--r-- 433 bytes parent folder | download | duplicates (3)
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}('test')
#1 %s(4): apcu_entry('test', Object(Closure))
#2 {main}
  thrown in %s on line 3