File: igbinary_068.phpt

package info (click to toggle)
php-igbinary 3.2.16-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,024 kB
  • sloc: ansic: 3,373; xml: 1,106; pascal: 10; makefile: 2; php: 2; sh: 1
file content (20 lines) | stat: -rw-r--r-- 461 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--TEST--
Test serializing and unserializing PHP_INT_MIN
--FILE--
<?php

if (!defined('PHP_INT_MIN')) {
	define('PHP_INT_MIN', ~PHP_INT_MAX);
}
var_export(PHP_INT_MAX === igbinary_unserialize(igbinary_serialize(PHP_INT_MAX)));
echo "\n";

var_export(PHP_INT_MIN === igbinary_unserialize(igbinary_serialize(PHP_INT_MIN)));
echo "\n";
var_export(PHP_INT_MIN+1 === igbinary_unserialize(igbinary_serialize(PHP_INT_MIN + 1)));
echo "\n";
?>
--EXPECT--
true
true
true