Warning: file_get_contents(https://raw.githubusercontent.com/Den1xxx/Filemanager/master/languages/ru.json): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 88
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 215
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 216
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 217
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 218
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 219
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 220
--TEST--
Null byte key position while unpacking objects
--SKIPIF--
'stdClass'
$placeholder = hex2bin('a178a178'); // 'x' => 'x'
$serialized = msgpack_pack($array);
$serialized = str_replace($placeholder, $stdClass, $serialized);
$unserialized = msgpack_unpack($serialized);
var_dump($unserialized);
unset($array['x']);
echo $unserialized == (object) $array ? 'OK' : 'ERROR', PHP_EOL;
}
$array = array('x' => 'x', 'foo' => 1);
test('single property, key at the beginning', $array);
$array = array('foo' => 1, 'x' => 'x');
test('single property, key at the end', $array);
$array = array('x' => 'x', 'foo' => 1, 'bar' => 2);
test('multiple properties, key at the beginning', $array);
$array = array('foo' => 1, 'x' => 'x', 'bar' => 2);
test('multiple properties, key in the middle', $array);
$array = array('foo' => 1, 'bar' => 2, 'x' => 'x');
test('multiple properties, key at the end', $array);
$array = array('null' => null, 'x' => 'x');
test('null, key at the end', $array);
$array = array('int' => 1, 'x' => 'x');
test('int, key at the end', $array);
$array = array('float' => 4.2, 'x' => 'x');
test('float, key at the end', $array);
$array = array('string' => 'str', 'x' => 'x');
test('string, key at the end', $array);
$array = array('array' => array(42), 'x' => 'x');
test('array, key at the end', $array);
class Foo { public $a = null; }
$obj = new Foo();
$array = array('object' => $obj, 'x' => 'x');
test('object, key at the end', $array);
--EXPECTF--
object(stdClass)#%d (1) {
["foo"]=>
int(1)
}
OK
object(stdClass)#%d (1) {
["foo"]=>
int(1)
}
OK
object(stdClass)#%d (2) {
["foo"]=>
int(1)
["bar"]=>
int(2)
}
OK
object(stdClass)#%d (2) {
["foo"]=>
int(1)
["bar"]=>
int(2)
}
OK
object(stdClass)#%d (2) {
["foo"]=>
int(1)
["bar"]=>
int(2)
}
OK
object(stdClass)#%d (1) {
["null"]=>
NULL
}
OK
object(stdClass)#%d (1) {
["int"]=>
int(1)
}
OK
object(stdClass)#%d (1) {
["float"]=>
float(4.2)
}
OK
object(stdClass)#%d (1) {
["string"]=>
string(3) "str"
}
OK
object(stdClass)#%d (1) {
["array"]=>
array(1) {
[0]=>
int(42)
}
}
OK
object(stdClass)#%d (1) {
["object"]=>
object(Foo)#%d (1) {
["a"]=>
NULL
}
}
OK