Linux SRV-16 6.18.44-paas #1 SMP PREEMPT_DYNAMIC Thu Aug 13 10:08:12 UTC 2026 x86_64
/
opt
/
php-7.4.25-202110251523
/
share
/
test
/
mongodb
/
tests
/
standalone
/
//opt/php-7.4.25-202110251523/share/test/mongodb/tests/standalone/bug0166.phpt
--TEST-- Disable serialization of objects --SKIPIF-- <?php require __DIR__ . "/../utils/basic-skipif.inc"; ?> <?php skip_if_not_live(); ?> <?php skip_if_not_clean(); ?> --FILE-- <?php require_once __DIR__ . "/../utils/basic.inc"; $str = 'O:22:"MongoDB\Driver\Manager":0:{}'; try { /* We throw exception in 5.3 - 5.6 triggers warning and returns false * This is inconsistency is only with manipulated serialization strings, or using them across versions * which isn't support by PHP in the getgo anyway */ $v = @unserialize($str); var_dump($v); } catch(Exception $e) { var_dump(false); } $manager = create_test_manager(); throws(function() use ($manager) { serialize($manager); }, "Exception"); ?> ===DONE=== <?php exit(0); ?> --EXPECT-- bool(false) OK: Got Exception ===DONE===