File manager - Edit - /opt/alt/tests/alt-php82-pecl-memcache_8.2-1.el8/tests/githubbug53.phpt
Back
--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
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.24 |
proxy
|
phpinfo
|
Settings