Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

--TEST-- References are not counted twice --FILE-- <?php $ref1 = 1; $ref2 = 2; $arr = [&..

Decoded Output download

--TEST--
References are not counted twice
--FILE--
<?php

$ref1 = 1;
$ref2 = 2;

$arr = [&$ref1, &$ref1, &$ref2, &$ref2];
var_dump(serialize($arr));

?>
--EXPECT--
string(38) "a:4:{i:0;i:1;i:1;R:2;i:2;i:2;i:3;R:3;}"

Did this file decode correctly?

Original Code

--TEST--
References are not counted twice
--FILE--
<?php

$ref1 = 1;
$ref2 = 2;

$arr = [&$ref1, &$ref1, &$ref2, &$ref2];
var_dump(serialize($arr));

?>
--EXPECT--
string(38) "a:4:{i:0;i:1;i:1;R:2;i:2;i:2;i:3;R:3;}"

Function Calls

None

Variables

None

Stats

MD5 b3959cceb575dd3daee6856c2f291d81
Eval Count 0
Decode Time 81 ms