php-src/ext/gmp/tests/unserialize_with_reference.phpt
2018-02-03 13:54:34 +01:00

17 lines
332 B
PHP

--TEST--
Unserialize GMP instance with internal reference to itself
--SKIPIF--
<?php if (!extension_loaded('gmp')) die('skip gmp extension not loaded'); ?>
--FILE--
<?php
$s = 'C:3:"GMP":23:{s:1:"2";a:1:{i:46;R:1;}}';
var_dump(unserialize($s));
?>
--EXPECT--
object(GMP)#1 (2) {
[46]=>
*RECURSION*
["num"]=>
string(1) "2"
}