PATH:
opt
/
alt
/
tests
/
alt-php52-pecl-memcached_2.1.0-1.el8
/
tests
--TEST-- Callback initializer throws and dies --SKIPIF-- <?php if (!extension_loaded("memcached")) print "skip"; ?> --FILE-- <?php function init_cb($m, $id) { echo "ran throwing cb\n"; var_dump($m->isPersistent()); throw new RuntimeException('Cb exception'); } function init_cb_die($m, $id) { echo "ran quitting cb\n"; die("quit in cb"); } error_reporting(0); echo "cb with exception\n"; try { $m1 = new Memcached(null, 'init_cb'); } catch (RuntimeException $e) { echo $e->getMessage(), "\n"; } echo "cb persistent with exception\n"; try { $m2 = new Memcached('foo', 'init_cb'); } catch (RuntimeException $e) { echo $e->getMessage(), "\n"; } echo "cb persistent dies\n"; try { $m3 = new Memcached('bar', 'init_cb_die'); } catch (RuntimeException $e) { echo $e->getMessage(), "\n"; } echo "not run\n"; --EXPECT-- cb with exception ran throwing cb bool(false) Cb exception cb persistent with exception ran throwing cb bool(true) Cb exception cb persistent dies ran quitting cb quit in cb
[-] options.phpt
[edit]
[-] check_if_persistent.phpt
[edit]
[-] getserverlist.phpt
[edit]
[-] types_json.phpt
[edit]
[-] check_if_pristine.phpt
[edit]
[-] callback_exception.phpt
[edit]
[-] construct_persistent.phpt
[edit]
[-] testdata.res
[edit]
[-] session_badconf_emptyprefix.phpt
[edit]
[-] deletemultitypes.phpt
[edit]
[-] session_badconf_prefix.phpt
[edit]
[-] session_badconf_servers.phpt
[edit]
[-] invoke_callback_twice.phpt
[edit]
[-] types.inc
[edit]
[-] bug_16084.phpt
[edit]
[-] callback_exception_2.phpt
[edit]
[-] invoke_callback.phpt
[edit]
[-] session_badconf_locktime.phpt
[edit]
[-] construct.phpt
[edit]
[-] 001.phpt
[edit]
[-] invoke_callback_2.phpt
[edit]
[-] clone.phpt
[edit]
[-] no-not-found.phpt
[edit]
[-] incrdecr_invalid_key.phpt
[edit]
[-] config.inc
[edit]
[-] deleted.phpt
[edit]
[+]
..
[-] bad_construct.phpt
[edit]