X7ROOT File Manager
Current Path:
/opt/alt/tests/alt-php84-pecl-memcached_3.2.0-2.el8/tests
opt
/
alt
/
tests
/
alt-php84-pecl-memcached_3.2.0-2.el8
/
tests
/
ðŸ“
..
📄
001.phpt
(183 B)
📄
add.phpt
(341 B)
📄
append.phpt
(651 B)
📄
bad_construct.phpt
(781 B)
📄
bad_construct_8.phpt
(701 B)
📄
bug_16084.phpt
(429 B)
📄
bug_16959.phpt
(1.25 KB)
📄
bug_17137.phpt
(921 B)
📄
bug_18639.phpt
(402 B)
📄
cachecallback.phpt
(1.18 KB)
📄
callback_exception.phpt
(903 B)
📄
callback_exception_2.phpt
(976 B)
📄
cas.phpt
(406 B)
📄
cas_multi.phpt
(1012 B)
📄
check_if_persistent.phpt
(795 B)
📄
check_if_pristine.phpt
(629 B)
📄
check_key.phpt
(3.75 KB)
📄
clone.phpt
(324 B)
📄
compression_types.phpt
(1.98 KB)
📄
conf_persist.phpt
(591 B)
📄
config.inc
(1.91 KB)
📄
construct.phpt
(154 B)
📄
construct_persistent.phpt
(447 B)
📄
default_behavior.phpt
(826 B)
📄
deleted.phpt
(435 B)
📄
deletemulti.phpt
(1.59 KB)
📄
deletemultitypes.phpt
(392 B)
📄
expire.phpt
(1.34 KB)
📄
flush_buffers.phpt
(545 B)
📄
get_flags.phpt
(1.13 KB)
📄
getdelayed.phpt
(1.12 KB)
📄
getmulti.phpt
(865 B)
📄
getserverbykey.phpt
(1023 B)
📄
getserverlist.phpt
(1012 B)
📄
gh_155.phpt
(1.2 KB)
📄
gh_21.phpt
(642 B)
📄
gh_500.phpt
(494 B)
📄
gh_77.phpt
(580 B)
📄
gh_90.phpt
(1.78 KB)
📄
gh_93.phpt
(863 B)
📄
incrdecr.phpt
(1.37 KB)
📄
incrdecr_64.phpt
(807 B)
📄
incrdecr_bykey.phpt
(1.39 KB)
📄
incrdecr_initial.phpt
(1.11 KB)
📄
incrdecr_invalid_key.phpt
(302 B)
📄
invalid_options.phpt
(356 B)
📄
invoke_callback.phpt
(540 B)
📄
invoke_callback_2.phpt
(1.48 KB)
📄
invoke_callback_twice.phpt
(357 B)
📄
keys_ascii.phpt
(3.18 KB)
📄
keys_binary.phpt
(3.26 KB)
📄
localserver.phpt
(322 B)
📄
memcachedserver.phpt
(2.84 KB)
📄
memcachedserver6.phpt
(2.72 KB)
📄
multi_order.phpt
(686 B)
📄
no-not-found.phpt
(470 B)
📄
options.phpt
(1.3 KB)
📄
pr_75.phpt
(644 B)
📄
prepend.phpt
(639 B)
📄
replace.phpt
(398 B)
📄
rescode.phpt
(1.78 KB)
📄
reset_keyprefix.phpt
(800 B)
📄
sasl_basic.phpt
(757 B)
📄
server.inc
(2.26 KB)
📄
server.php
(4.68 KB)
📄
session_badconf_emptyprefix.phpt
(629 B)
📄
session_badconf_locktime.phpt
(543 B)
📄
session_badconf_persistent.phpt
(662 B)
📄
session_badconf_prefix.phpt
(655 B)
📄
session_badconf_servers-php72.phpt
(771 B)
📄
session_badconf_servers.phpt
(698 B)
📄
session_basic.phpt
(706 B)
📄
session_basic2.phpt
(726 B)
📄
session_basic3.phpt
(735 B)
📄
session_lazy_warning.phpt
(1 KB)
📄
session_lock-php71.phpt
(1.58 KB)
📄
session_lock.phpt
(1.48 KB)
📄
session_persistent.phpt
(630 B)
📄
session_regenerate.phpt
(485 B)
📄
set_encoding_key2.phpt
(1 KB)
📄
set_large.phpt
(335 B)
📄
setmulti.phpt
(1.14 KB)
📄
setoptions.phpt
(1.05 KB)
📄
skipif.inc
(394 B)
📄
stats.phpt
(447 B)
📄
stats_hang.phpt
(2.17 KB)
📄
testdata.res
(4.76 KB)
📄
touch_binary.phpt
(1.85 KB)
📄
types.inc
(2.76 KB)
📄
types_igbinary.phpt
(451 B)
📄
types_igbinary_multi.phpt
(469 B)
📄
types_json.phpt
(437 B)
📄
types_json_multi.phpt
(455 B)
📄
types_msgpack.phpt
(501 B)
📄
types_msgpack_multi.phpt
(513 B)
📄
types_php.phpt
(348 B)
📄
types_php_multi.phpt
(360 B)
📄
undefined_set.phpt
(633 B)
📄
user-flags.phpt
(2.52 KB)
📄
vbucket.phpt
(627 B)
📄
vbucket_error_7.phpt
(1.03 KB)
📄
vbucket_error_8.phpt
(1.08 KB)
📄
version.phpt
(269 B)
Editing: user-flags.phpt
--TEST-- Memcached user flags --SKIPIF-- <?php include "skipif.inc";?> --FILE-- <?php function check_flags ($flags, $expected_flags) { foreach ($expected_flags as $f) { if (($flags & $f) != $f) { echo "Flag {$f} is not set" . PHP_EOL; return; } } echo "Flags OK" . PHP_EOL; } function get_flags($m, $key) { return $m->get($key, null, Memcached::GET_EXTENDED)['flags']; } define ('FLAG_1', 1); define ('FLAG_2', 2); define ('FLAG_4', 4); define ('FLAG_32', 32); define ('FLAG_64', 64); define ('FLAG_TOO_LARGE', pow(2, 16)); include dirname (__FILE__) . '/config.inc'; $m = memc_get_instance (array (Memcached::OPT_BINARY_PROTOCOL => true)); $key = uniqid ('udf_test_'); // Set with flags off $m->set ($key, '1', 10); $v = $m->get($key, null, Memcached::GET_EXTENDED); var_dump($v); // Set flags on $m->setOption(Memcached::OPT_USER_FLAGS, FLAG_1); $m->set ($key, '1', 10); $m->get($key); check_flags(get_flags($m, $key), array(FLAG_1)); // Multiple flags $m->setOption(Memcached::OPT_USER_FLAGS, FLAG_1 | FLAG_2 | FLAG_4); $m->set ($key, '1', 10); $m->get($key); check_flags(get_flags($m, $key), array(FLAG_1, FLAG_2, FLAG_4)); // Even more flags $m->setOption(Memcached::OPT_USER_FLAGS, FLAG_1 | FLAG_2 | FLAG_4 | FLAG_32 | FLAG_64); $m->set ($key, '1', 10); $m->get($key); check_flags(get_flags($m, $key), array(FLAG_1, FLAG_2, FLAG_4, FLAG_32, FLAG_64)); // User flags with get multi $values = array( uniqid ('udf_test_multi_') => "first", uniqid ('udf_test_multi_') => "second", uniqid ('udf_test_multi_') => "third", ); $m->setOption(Memcached::OPT_USER_FLAGS, FLAG_2 | FLAG_4); $m->setMulti($values); $m->getMulti(array_keys($values)); $flags = $m->getMulti(array_keys($values), Memcached::GET_EXTENDED); foreach (array_keys($values) as $key) { check_flags($flags[$key]['flags'], array(FLAG_2, FLAG_4)); } // User flags with compression on $m->setOption(Memcached::OPT_USER_FLAGS, FLAG_1 | FLAG_2 | FLAG_4); $m->setOption(Memcached::OPT_COMPRESSION, true); $m->setOption(Memcached::OPT_COMPRESSION_TYPE, Memcached::COMPRESSION_FASTLZ); $m->set ($key, '1', 10); $m->get($key); check_flags(get_flags($m, $key), array(FLAG_1, FLAG_2, FLAG_4)); // Too large flags $m->setOption(Memcached::OPT_USER_FLAGS, FLAG_TOO_LARGE); echo "DONE TEST\n"; ?> --EXPECTF-- array(3) { ["value"]=> string(1) "1" ["cas"]=> int(%d) ["flags"]=> int(0) } Flags OK Flags OK Flags OK Flags OK Flags OK Flags OK Flags OK Warning: Memcached::setOption(): MEMC_OPT_USER_FLAGS must be < 65535 in %s on line %d DONE TEST
Upload File
Create Folder