����JFIF��� ( %"1"%)+...383,7(-.- 404 Not Found
Sh3ll
OdayForums


Server : Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.20
System : Linux st2.domain.com 3.10.0-1127.10.1.el7.x86_64 #1 SMP Wed Jun 3 14:28:03 UTC 2020 x86_64
User : apache ( 48)
PHP Version : 7.4.20
Disable Function : NONE
Directory :  /proc/self/root/usr/share/tests/pecl/memcached/tests/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/self/root/usr/share/tests/pecl/memcached/tests/callback_exception.phpt
--TEST--
make sure that callback exception behaves correctly
--SKIPIF--
<?php include "skipif.inc";?>
--FILE--
<?php

function throw_something(Memcached $object, $p_id = null)
{
    throw new Exception("from cb");
}

function empty_cb(Memcached $object, $p_id = null)
{
    echo "empty_cb called\n";
}

try {
    $m = new Memcached('test_id', 'throw_something');
    echo "fail\n";
} catch (Exception $e) {
    echo "success\n";
}

try {
    $m = new Memcached('test_id', 'throw_something');
    echo "fail\n";
} catch (Exception $e) {
    echo "success\n";
}

try {
    $m = new Memcached('test_id', 'empty_cb');
    $m = new Memcached('test_id', 'empty_cb');
} catch (Exception $e) {
    echo "fail\n";
}

try {
    $m = new Memcached(null, 'throw_something');
    echo "fail\n";
} catch (Exception $e) {
    echo "success\n";
}

echo "OK\n";

?>
--EXPECT--
success
success
empty_cb called
success
OK

ZeroDay Forums Mini