2
Check for serialization handler, ini-directive
5
if (!extension_loaded('session')) {
6
exit('skip session extension not loaded');
10
phpinfo(INFO_MODULES);
11
$str = ob_get_clean();
13
$array = explode("\n", $str);
14
$array = preg_grep('/^igbinary session support.*yes/', $array);
16
exit('skip igbinary session handler not available');
22
ini_set('session.serialize_handler', 'igbinary');
26
function open($path, $name) {
36
return pack('H*', '0000000214011103666f6f0601');
39
function write($id, $data) {
41
$output .= substr(bin2hex($data), 8). "\n";
45
function destroy($id) {
53
session_set_save_handler('open', 'close', 'read', 'write', 'destroy', 'gc');
57
echo ++$_SESSION['foo'], "\n";
59
session_write_close();
64
* you can add regression tests for your extension here
66
* the output of your test code has to be equal to the
67
* text in the --EXPECT-- section below for the tests
68
* to pass, differences between the output and the
69
* expected text are interpreted as failure
71
* see php5/README.TESTING for further information on
72
* writing regression tests