import zend session tests
Esse commit está contido em:
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
spl_autoload_register(function ($class) {
|
||||
var_dump("Loading $class");
|
||||
eval('class Bar {}');
|
||||
});
|
||||
|
||||
class Foo
|
||||
{
|
||||
function __sleep()
|
||||
{
|
||||
new Bar;
|
||||
return array();
|
||||
}
|
||||
}
|
||||
|
||||
session_start();
|
||||
$_SESSION['foo'] = new Foo;
|
||||
|
||||
?>
|
||||
@@ -0,0 +1 @@
|
||||
string(11) "Loading Bar"
|
||||
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
ob_start();
|
||||
|
||||
/*
|
||||
* Prototype : int session_cache_expire([int $new_cache_expire])
|
||||
* Description : Return current cache expire
|
||||
* Source code : ext/session/session.c
|
||||
*/
|
||||
|
||||
echo "*** Testing session_cache_expire() : variation ***\n";
|
||||
|
||||
ini_set("session.cache_expire", 360);
|
||||
var_dump(session_cache_expire());
|
||||
var_dump(session_cache_expire(1234567890));
|
||||
var_dump(session_cache_expire(180));
|
||||
var_dump(session_start());
|
||||
var_dump(session_cache_expire());
|
||||
var_dump(session_destroy());
|
||||
var_dump(session_cache_expire());
|
||||
|
||||
echo "Done";
|
||||
ob_end_flush();
|
||||
?>
|
||||
@@ -0,0 +1,9 @@
|
||||
*** Testing session_cache_expire() : variation ***
|
||||
int(360)
|
||||
int(360)
|
||||
int(1234567890)
|
||||
bool(true)
|
||||
int(180)
|
||||
bool(true)
|
||||
int(180)
|
||||
Done
|
||||
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
ob_start();
|
||||
|
||||
/*
|
||||
* Prototype : int session_cache_expire([int $new_cache_expire])
|
||||
* Description : Return current cache expire
|
||||
* Source code : ext/session/session.c
|
||||
*/
|
||||
|
||||
echo "*** Testing session_cache_expire() : variation ***\n";
|
||||
|
||||
var_dump(ini_get("session.cache_expire"));
|
||||
var_dump(session_cache_expire());
|
||||
var_dump(ini_get("session.cache_expire"));
|
||||
var_dump(session_cache_expire(1234567890));
|
||||
var_dump(ini_get("session.cache_expire"));
|
||||
var_dump(session_start());
|
||||
var_dump(session_cache_expire());
|
||||
var_dump(ini_get("session.cache_expire"));
|
||||
var_dump(session_destroy());
|
||||
var_dump(session_cache_expire());
|
||||
var_dump(ini_get("session.cache_expire"));
|
||||
|
||||
echo "Done";
|
||||
ob_end_flush();
|
||||
?>
|
||||
@@ -0,0 +1,13 @@
|
||||
*** Testing session_cache_expire() : variation ***
|
||||
string(3) "180"
|
||||
int(180)
|
||||
string(3) "180"
|
||||
int(180)
|
||||
string(10) "1234567890"
|
||||
bool(true)
|
||||
int(1234567890)
|
||||
string(10) "1234567890"
|
||||
bool(true)
|
||||
int(1234567890)
|
||||
string(10) "1234567890"
|
||||
Done
|
||||
@@ -0,0 +1,89 @@
|
||||
<?php
|
||||
|
||||
ob_start();
|
||||
|
||||
/*
|
||||
* Prototype : string session_cache_limiter([string $cache_limiter])
|
||||
* Description : Get and/or set the current cache limiter
|
||||
* Source code : ext/session/session.c
|
||||
*/
|
||||
|
||||
echo "*** Testing session_cache_limiter() : error functionality ***\n";
|
||||
|
||||
// Get an unset variable
|
||||
$unset_var = 10;
|
||||
unset($unset_var);
|
||||
|
||||
class classA
|
||||
{
|
||||
public function __toString() {
|
||||
return "Hello World!";
|
||||
}
|
||||
}
|
||||
|
||||
$heredoc = <<<EOT
|
||||
Hello World!
|
||||
EOT;
|
||||
|
||||
$fp = fopen(__FILE__, "r");
|
||||
|
||||
// Unexpected values to be passed as arguments
|
||||
$inputs = array(
|
||||
|
||||
// Integer data
|
||||
/*1*/ 0,
|
||||
1,
|
||||
12345,
|
||||
-2345,
|
||||
|
||||
// Float data
|
||||
/*5*/ 10.5,
|
||||
-10.5,
|
||||
12.3456789000e10,
|
||||
12.3456789000E-10,
|
||||
.5,
|
||||
|
||||
// Null data
|
||||
/*10*/ NULL,
|
||||
null,
|
||||
|
||||
// Boolean data
|
||||
/*12*/ true,
|
||||
false,
|
||||
TRUE,
|
||||
FALSE,
|
||||
|
||||
// Empty strings
|
||||
/*16*/ "",
|
||||
'',
|
||||
|
||||
// Invalid string data
|
||||
/*18*/ "Nothing",
|
||||
'Nothing',
|
||||
$heredoc,
|
||||
|
||||
// Object data
|
||||
/*21*/ new classA(),
|
||||
|
||||
// Undefined data
|
||||
/*22*/ @$undefined_var,
|
||||
|
||||
// Unset data
|
||||
/*23*/ @$unset_var,
|
||||
|
||||
// Resource variable
|
||||
/*24*/ $fp
|
||||
);
|
||||
|
||||
|
||||
$iterator = 1;
|
||||
foreach($inputs as $input) {
|
||||
echo "\n-- Iteration $iterator --\n";
|
||||
var_dump(session_cache_limiter($input));
|
||||
$iterator++;
|
||||
};
|
||||
|
||||
fclose($fp);
|
||||
echo "Done";
|
||||
ob_end_flush();
|
||||
?>
|
||||
@@ -0,0 +1,75 @@
|
||||
*** Testing session_cache_limiter() : error functionality ***
|
||||
|
||||
-- Iteration 1 --
|
||||
string(7) "nocache"
|
||||
|
||||
-- Iteration 2 --
|
||||
string(1) "0"
|
||||
|
||||
-- Iteration 3 --
|
||||
string(1) "1"
|
||||
|
||||
-- Iteration 4 --
|
||||
string(5) "12345"
|
||||
|
||||
-- Iteration 5 --
|
||||
string(5) "-2345"
|
||||
|
||||
-- Iteration 6 --
|
||||
string(4) "10.5"
|
||||
|
||||
-- Iteration 7 --
|
||||
string(5) "-10.5"
|
||||
|
||||
-- Iteration 8 --
|
||||
string(12) "123456789000"
|
||||
|
||||
-- Iteration 9 --
|
||||
string(13) "1.23456789E-9"
|
||||
|
||||
-- Iteration 10 --
|
||||
string(3) "0.5"
|
||||
|
||||
-- Iteration 11 --
|
||||
string(0) ""
|
||||
|
||||
-- Iteration 12 --
|
||||
string(0) ""
|
||||
|
||||
-- Iteration 13 --
|
||||
string(1) "1"
|
||||
|
||||
-- Iteration 14 --
|
||||
string(0) ""
|
||||
|
||||
-- Iteration 15 --
|
||||
string(1) "1"
|
||||
|
||||
-- Iteration 16 --
|
||||
string(0) ""
|
||||
|
||||
-- Iteration 17 --
|
||||
string(0) ""
|
||||
|
||||
-- Iteration 18 --
|
||||
string(0) ""
|
||||
|
||||
-- Iteration 19 --
|
||||
string(7) "Nothing"
|
||||
|
||||
-- Iteration 20 --
|
||||
string(7) "Nothing"
|
||||
|
||||
-- Iteration 21 --
|
||||
string(12) "Hello World!"
|
||||
|
||||
-- Iteration 22 --
|
||||
string(12) "Hello World!"
|
||||
|
||||
-- Iteration 23 --
|
||||
string(0) ""
|
||||
|
||||
-- Iteration 24 --
|
||||
HipHop Warning: %a
|
||||
NULL
|
||||
Done
|
||||
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
ob_start();
|
||||
|
||||
/*
|
||||
* Prototype : string session_cache_limiter([string $cache_limiter])
|
||||
* Description : Get and/or set the current cache limiter
|
||||
* Source code : ext/session/session.c
|
||||
*/
|
||||
|
||||
echo "*** Testing session_cache_limiter() : variation ***\n";
|
||||
|
||||
var_dump(ini_get("session.cache_limiter"));
|
||||
var_dump(session_start());
|
||||
var_dump(ini_get("session.cache_limiter"));
|
||||
var_dump(session_cache_limiter("public"));
|
||||
var_dump(ini_get("session.cache_limiter"));
|
||||
var_dump(session_destroy());
|
||||
var_dump(ini_get("session.cache_limiter"));
|
||||
|
||||
echo "Done";
|
||||
ob_end_flush();
|
||||
?>
|
||||
@@ -0,0 +1,9 @@
|
||||
*** Testing session_cache_limiter() : variation ***
|
||||
string(7) "nocache"
|
||||
bool(true)
|
||||
string(7) "nocache"
|
||||
string(7) "nocache"
|
||||
string(6) "public"
|
||||
bool(true)
|
||||
string(6) "public"
|
||||
Done
|
||||
@@ -0,0 +1,89 @@
|
||||
<?php
|
||||
|
||||
ob_start();
|
||||
|
||||
/*
|
||||
* Prototype : bool session_commit(void)
|
||||
* Description : Write session data and end session
|
||||
* Source code : ext/session/session.c
|
||||
*/
|
||||
|
||||
echo "*** Testing session_commit() : error functionality ***\n";
|
||||
|
||||
// Get an unset variable
|
||||
$unset_var = 10;
|
||||
unset($unset_var);
|
||||
|
||||
class classA
|
||||
{
|
||||
public function __toString() {
|
||||
return "Hello World!";
|
||||
}
|
||||
}
|
||||
|
||||
$heredoc = <<<EOT
|
||||
Hello World!
|
||||
EOT;
|
||||
|
||||
$fp = fopen(__FILE__, "r");
|
||||
|
||||
// Unexpected values to be passed as arguments
|
||||
$inputs = array(
|
||||
|
||||
// Integer data
|
||||
/*1*/ 0,
|
||||
1,
|
||||
12345,
|
||||
-2345,
|
||||
|
||||
// Float data
|
||||
/*5*/ 10.5,
|
||||
-10.5,
|
||||
12.3456789000e10,
|
||||
12.3456789000E-10,
|
||||
.5,
|
||||
|
||||
// Null data
|
||||
/*10*/ NULL,
|
||||
null,
|
||||
|
||||
// Boolean data
|
||||
/*12*/ true,
|
||||
false,
|
||||
TRUE,
|
||||
FALSE,
|
||||
|
||||
// Empty strings
|
||||
/*16*/ "",
|
||||
'',
|
||||
|
||||
// Invalid string data
|
||||
/*18*/ "Nothing",
|
||||
'Nothing',
|
||||
$heredoc,
|
||||
|
||||
// Object data
|
||||
/*21*/ new classA(),
|
||||
|
||||
// Undefined data
|
||||
/*22*/ @$undefined_var,
|
||||
|
||||
// Unset data
|
||||
/*23*/ @$unset_var,
|
||||
|
||||
// Resource variable
|
||||
/*24*/ $fp
|
||||
);
|
||||
|
||||
|
||||
$iterator = 1;
|
||||
foreach($inputs as $input) {
|
||||
echo "\n-- Iteration $iterator --\n";
|
||||
var_dump(session_commit($input));
|
||||
$iterator++;
|
||||
};
|
||||
|
||||
fclose($fp);
|
||||
echo "Done";
|
||||
ob_end_flush();
|
||||
?>
|
||||
@@ -0,0 +1,74 @@
|
||||
*** Testing session_commit() : error functionality ***
|
||||
|
||||
-- Iteration 1 --
|
||||
NULL
|
||||
|
||||
-- Iteration 2 --
|
||||
NULL
|
||||
|
||||
-- Iteration 3 --
|
||||
NULL
|
||||
|
||||
-- Iteration 4 --
|
||||
NULL
|
||||
|
||||
-- Iteration 5 --
|
||||
NULL
|
||||
|
||||
-- Iteration 6 --
|
||||
NULL
|
||||
|
||||
-- Iteration 7 --
|
||||
NULL
|
||||
|
||||
-- Iteration 8 --
|
||||
NULL
|
||||
|
||||
-- Iteration 9 --
|
||||
NULL
|
||||
|
||||
-- Iteration 10 --
|
||||
NULL
|
||||
|
||||
-- Iteration 11 --
|
||||
NULL
|
||||
|
||||
-- Iteration 12 --
|
||||
NULL
|
||||
|
||||
-- Iteration 13 --
|
||||
NULL
|
||||
|
||||
-- Iteration 14 --
|
||||
NULL
|
||||
|
||||
-- Iteration 15 --
|
||||
NULL
|
||||
|
||||
-- Iteration 16 --
|
||||
NULL
|
||||
|
||||
-- Iteration 17 --
|
||||
NULL
|
||||
|
||||
-- Iteration 18 --
|
||||
NULL
|
||||
|
||||
-- Iteration 19 --
|
||||
NULL
|
||||
|
||||
-- Iteration 20 --
|
||||
NULL
|
||||
|
||||
-- Iteration 21 --
|
||||
NULL
|
||||
|
||||
-- Iteration 22 --
|
||||
NULL
|
||||
|
||||
-- Iteration 23 --
|
||||
NULL
|
||||
|
||||
-- Iteration 24 --
|
||||
NULL
|
||||
Done
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
ob_start();
|
||||
|
||||
/*
|
||||
* Prototype : bool session_commit(void)
|
||||
* Description : Write session data and end session
|
||||
* Source code : ext/session/session.c
|
||||
*/
|
||||
|
||||
echo "*** Testing session_commit() : variation ***\n";
|
||||
|
||||
var_dump(session_id("test"));
|
||||
var_dump(session_start());
|
||||
var_dump(session_id());
|
||||
var_dump(session_commit());
|
||||
var_dump(session_id());
|
||||
var_dump(session_start());
|
||||
var_dump(session_id());
|
||||
var_dump(session_commit());
|
||||
var_dump(session_id());
|
||||
var_dump(session_start());
|
||||
var_dump(session_id());
|
||||
var_dump(session_commit());
|
||||
var_dump(session_id());
|
||||
var_dump(session_start());
|
||||
var_dump(session_destroy());
|
||||
|
||||
echo "Done";
|
||||
ob_end_flush();
|
||||
?>
|
||||
@@ -0,0 +1,17 @@
|
||||
*** Testing session_commit() : variation ***
|
||||
string(0) ""
|
||||
bool(true)
|
||||
string(4) "test"
|
||||
NULL
|
||||
string(4) "test"
|
||||
bool(true)
|
||||
string(4) "test"
|
||||
NULL
|
||||
string(4) "test"
|
||||
bool(true)
|
||||
string(4) "test"
|
||||
NULL
|
||||
string(4) "test"
|
||||
bool(true)
|
||||
bool(true)
|
||||
Done
|
||||
@@ -0,0 +1,93 @@
|
||||
<?php
|
||||
|
||||
ob_start();
|
||||
|
||||
/*
|
||||
* Prototype : string session_decode(void)
|
||||
* Description : Decodes session data from a string
|
||||
* Source code : ext/session/session.c
|
||||
*/
|
||||
|
||||
echo "*** Testing session_decode() : basic functionality ***\n";
|
||||
|
||||
// Get an unset variable
|
||||
$unset_var = 10;
|
||||
unset($unset_var);
|
||||
|
||||
class classA
|
||||
{
|
||||
public function __toString() {
|
||||
return "Hello World!";
|
||||
}
|
||||
}
|
||||
|
||||
$heredoc = <<<EOT
|
||||
Hello World!
|
||||
EOT;
|
||||
|
||||
$fp = fopen(__FILE__, "r");
|
||||
|
||||
// Unexpected values to be passed as arguments
|
||||
$inputs = array(
|
||||
|
||||
// Integer data
|
||||
/*1*/ 0,
|
||||
1,
|
||||
12345,
|
||||
-2345,
|
||||
|
||||
// Float data
|
||||
/*5*/ 10.5,
|
||||
-10.5,
|
||||
12.3456789000e10,
|
||||
12.3456789000E-10,
|
||||
.5,
|
||||
|
||||
// Null data
|
||||
/*10*/ NULL,
|
||||
null,
|
||||
|
||||
// Boolean data
|
||||
/*12*/ true,
|
||||
false,
|
||||
TRUE,
|
||||
FALSE,
|
||||
|
||||
// Empty strings
|
||||
/*16*/ "",
|
||||
'',
|
||||
|
||||
// Invalid string data
|
||||
/*18*/ "Nothing",
|
||||
'Nothing',
|
||||
$heredoc,
|
||||
|
||||
// Object data
|
||||
/*21*/ new classA(),
|
||||
|
||||
// Undefined data
|
||||
/*22*/ @$undefined_var,
|
||||
|
||||
// Unset data
|
||||
/*23*/ @$unset_var,
|
||||
|
||||
// Resource variable
|
||||
/*24*/ $fp
|
||||
);
|
||||
|
||||
var_dump(session_start());
|
||||
$iterator = 1;
|
||||
foreach($inputs as $input) {
|
||||
echo "\n-- Iteration $iterator --\n";
|
||||
$_SESSION["data"] = $input;
|
||||
$encoded = session_encode();
|
||||
var_dump(session_decode($encoded));
|
||||
var_dump($_SESSION);
|
||||
$iterator++;
|
||||
};
|
||||
|
||||
var_dump(session_destroy());
|
||||
fclose($fp);
|
||||
echo "Done";
|
||||
ob_end_flush();
|
||||
?>
|
||||
@@ -0,0 +1,173 @@
|
||||
*** Testing session_decode() : basic functionality ***
|
||||
bool(true)
|
||||
|
||||
-- Iteration 1 --
|
||||
bool(true)
|
||||
array(1) {
|
||||
["data"]=>
|
||||
int(0)
|
||||
}
|
||||
|
||||
-- Iteration 2 --
|
||||
bool(true)
|
||||
array(1) {
|
||||
["data"]=>
|
||||
int(1)
|
||||
}
|
||||
|
||||
-- Iteration 3 --
|
||||
bool(true)
|
||||
array(1) {
|
||||
["data"]=>
|
||||
int(12345)
|
||||
}
|
||||
|
||||
-- Iteration 4 --
|
||||
bool(true)
|
||||
array(1) {
|
||||
["data"]=>
|
||||
int(-2345)
|
||||
}
|
||||
|
||||
-- Iteration 5 --
|
||||
bool(true)
|
||||
array(1) {
|
||||
["data"]=>
|
||||
float(10.5)
|
||||
}
|
||||
|
||||
-- Iteration 6 --
|
||||
bool(true)
|
||||
array(1) {
|
||||
["data"]=>
|
||||
float(-10.5)
|
||||
}
|
||||
|
||||
-- Iteration 7 --
|
||||
bool(true)
|
||||
array(1) {
|
||||
["data"]=>
|
||||
float(123456789000)
|
||||
}
|
||||
|
||||
-- Iteration 8 --
|
||||
bool(true)
|
||||
array(1) {
|
||||
["data"]=>
|
||||
float(1.23456789E-9)
|
||||
}
|
||||
|
||||
-- Iteration 9 --
|
||||
bool(true)
|
||||
array(1) {
|
||||
["data"]=>
|
||||
float(0.5)
|
||||
}
|
||||
|
||||
-- Iteration 10 --
|
||||
bool(true)
|
||||
array(1) {
|
||||
["data"]=>
|
||||
NULL
|
||||
}
|
||||
|
||||
-- Iteration 11 --
|
||||
bool(true)
|
||||
array(1) {
|
||||
["data"]=>
|
||||
NULL
|
||||
}
|
||||
|
||||
-- Iteration 12 --
|
||||
bool(true)
|
||||
array(1) {
|
||||
["data"]=>
|
||||
bool(true)
|
||||
}
|
||||
|
||||
-- Iteration 13 --
|
||||
bool(true)
|
||||
array(1) {
|
||||
["data"]=>
|
||||
bool(false)
|
||||
}
|
||||
|
||||
-- Iteration 14 --
|
||||
bool(true)
|
||||
array(1) {
|
||||
["data"]=>
|
||||
bool(true)
|
||||
}
|
||||
|
||||
-- Iteration 15 --
|
||||
bool(true)
|
||||
array(1) {
|
||||
["data"]=>
|
||||
bool(false)
|
||||
}
|
||||
|
||||
-- Iteration 16 --
|
||||
bool(true)
|
||||
array(1) {
|
||||
["data"]=>
|
||||
string(0) ""
|
||||
}
|
||||
|
||||
-- Iteration 17 --
|
||||
bool(true)
|
||||
array(1) {
|
||||
["data"]=>
|
||||
string(0) ""
|
||||
}
|
||||
|
||||
-- Iteration 18 --
|
||||
bool(true)
|
||||
array(1) {
|
||||
["data"]=>
|
||||
string(7) "Nothing"
|
||||
}
|
||||
|
||||
-- Iteration 19 --
|
||||
bool(true)
|
||||
array(1) {
|
||||
["data"]=>
|
||||
string(7) "Nothing"
|
||||
}
|
||||
|
||||
-- Iteration 20 --
|
||||
bool(true)
|
||||
array(1) {
|
||||
["data"]=>
|
||||
string(12) "Hello World!"
|
||||
}
|
||||
|
||||
-- Iteration 21 --
|
||||
bool(true)
|
||||
array(1) {
|
||||
["data"]=>
|
||||
object(classA)#2 (0) {
|
||||
}
|
||||
}
|
||||
|
||||
-- Iteration 22 --
|
||||
bool(true)
|
||||
array(1) {
|
||||
["data"]=>
|
||||
NULL
|
||||
}
|
||||
|
||||
-- Iteration 23 --
|
||||
bool(true)
|
||||
array(1) {
|
||||
["data"]=>
|
||||
NULL
|
||||
}
|
||||
|
||||
-- Iteration 24 --
|
||||
bool(true)
|
||||
array(1) {
|
||||
["data"]=>
|
||||
int(0)
|
||||
}
|
||||
bool(true)
|
||||
Done
|
||||
@@ -0,0 +1,91 @@
|
||||
<?php
|
||||
|
||||
ob_start();
|
||||
|
||||
/*
|
||||
* Prototype : string session_decode(void)
|
||||
* Description : Decodes session data from a string
|
||||
* Source code : ext/session/session.c
|
||||
*/
|
||||
|
||||
echo "*** Testing session_decode() : error functionality ***\n";
|
||||
|
||||
// Get an unset variable
|
||||
$unset_var = 10;
|
||||
unset($unset_var);
|
||||
|
||||
class classA
|
||||
{
|
||||
public function __toString() {
|
||||
return "Hello World!";
|
||||
}
|
||||
}
|
||||
|
||||
$heredoc = <<<EOT
|
||||
Hello World!
|
||||
EOT;
|
||||
|
||||
$fp = fopen(__FILE__, "r");
|
||||
|
||||
// Unexpected values to be passed as arguments
|
||||
$inputs = array(
|
||||
|
||||
// Integer data
|
||||
/*1*/ 0,
|
||||
1,
|
||||
12345,
|
||||
-2345,
|
||||
|
||||
// Float data
|
||||
/*5*/ 10.5,
|
||||
-10.5,
|
||||
12.3456789000e10,
|
||||
12.3456789000E-10,
|
||||
.5,
|
||||
|
||||
// Null data
|
||||
/*10*/ NULL,
|
||||
null,
|
||||
|
||||
// Boolean data
|
||||
/*12*/ true,
|
||||
false,
|
||||
TRUE,
|
||||
FALSE,
|
||||
|
||||
// Empty strings
|
||||
/*16*/ "",
|
||||
'',
|
||||
|
||||
// Invalid string data
|
||||
/*18*/ "Nothing",
|
||||
'Nothing',
|
||||
$heredoc,
|
||||
|
||||
// Object data
|
||||
/*21*/ new classA(),
|
||||
|
||||
// Undefined data
|
||||
/*22*/ @$undefined_var,
|
||||
|
||||
// Unset data
|
||||
/*23*/ @$unset_var,
|
||||
|
||||
// Resource variable
|
||||
/*24*/ $fp
|
||||
);
|
||||
|
||||
var_dump(session_start());
|
||||
$iterator = 1;
|
||||
foreach($inputs as $input) {
|
||||
echo "\n-- Iteration $iterator --\n";
|
||||
var_dump(session_decode($input));
|
||||
var_dump($_SESSION);
|
||||
$iterator++;
|
||||
};
|
||||
|
||||
var_dump(session_destroy());
|
||||
fclose($fp);
|
||||
echo "Done";
|
||||
ob_end_flush();
|
||||
?>
|
||||
@@ -0,0 +1,125 @@
|
||||
*** Testing session_decode() : error functionality ***
|
||||
bool(true)
|
||||
|
||||
-- Iteration 1 --
|
||||
bool(true)
|
||||
array(0) {
|
||||
}
|
||||
|
||||
-- Iteration 2 --
|
||||
bool(true)
|
||||
array(0) {
|
||||
}
|
||||
|
||||
-- Iteration 3 --
|
||||
bool(true)
|
||||
array(0) {
|
||||
}
|
||||
|
||||
-- Iteration 4 --
|
||||
bool(true)
|
||||
array(0) {
|
||||
}
|
||||
|
||||
-- Iteration 5 --
|
||||
bool(true)
|
||||
array(0) {
|
||||
}
|
||||
|
||||
-- Iteration 6 --
|
||||
bool(true)
|
||||
array(0) {
|
||||
}
|
||||
|
||||
-- Iteration 7 --
|
||||
bool(true)
|
||||
array(0) {
|
||||
}
|
||||
|
||||
-- Iteration 8 --
|
||||
bool(true)
|
||||
array(0) {
|
||||
}
|
||||
|
||||
-- Iteration 9 --
|
||||
bool(true)
|
||||
array(0) {
|
||||
}
|
||||
|
||||
-- Iteration 10 --
|
||||
bool(true)
|
||||
array(0) {
|
||||
}
|
||||
|
||||
-- Iteration 11 --
|
||||
bool(true)
|
||||
array(0) {
|
||||
}
|
||||
|
||||
-- Iteration 12 --
|
||||
bool(true)
|
||||
array(0) {
|
||||
}
|
||||
|
||||
-- Iteration 13 --
|
||||
bool(true)
|
||||
array(0) {
|
||||
}
|
||||
|
||||
-- Iteration 14 --
|
||||
bool(true)
|
||||
array(0) {
|
||||
}
|
||||
|
||||
-- Iteration 15 --
|
||||
bool(true)
|
||||
array(0) {
|
||||
}
|
||||
|
||||
-- Iteration 16 --
|
||||
bool(true)
|
||||
array(0) {
|
||||
}
|
||||
|
||||
-- Iteration 17 --
|
||||
bool(true)
|
||||
array(0) {
|
||||
}
|
||||
|
||||
-- Iteration 18 --
|
||||
bool(true)
|
||||
array(0) {
|
||||
}
|
||||
|
||||
-- Iteration 19 --
|
||||
bool(true)
|
||||
array(0) {
|
||||
}
|
||||
|
||||
-- Iteration 20 --
|
||||
bool(true)
|
||||
array(0) {
|
||||
}
|
||||
|
||||
-- Iteration 21 --
|
||||
bool(true)
|
||||
array(0) {
|
||||
}
|
||||
|
||||
-- Iteration 22 --
|
||||
bool(true)
|
||||
array(0) {
|
||||
}
|
||||
|
||||
-- Iteration 23 --
|
||||
bool(true)
|
||||
array(0) {
|
||||
}
|
||||
|
||||
-- Iteration 24 --
|
||||
HipHop Warning: %a
|
||||
NULL
|
||||
array(0) {
|
||||
}
|
||||
bool(true)
|
||||
Done
|
||||
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
ob_start();
|
||||
|
||||
/*
|
||||
* Prototype : string session_decode(void)
|
||||
* Description : Decodes session data from a string
|
||||
* Source code : ext/session/session.c
|
||||
*/
|
||||
|
||||
echo "*** Testing session_decode() : error functionality ***\n";
|
||||
$data = "foo|a:3:{i:0;i:1;i:1;i:2;i:2;i:3;}guff|R:1;blah|R:1;";
|
||||
|
||||
var_dump(session_start());
|
||||
for($index = 0; $index < strlen($data); $index++) {
|
||||
echo "\n-- Iteration $index --\n";
|
||||
$encoded = substr($data, 0, $index);
|
||||
var_dump(session_decode($encoded));
|
||||
var_dump($_SESSION);
|
||||
};
|
||||
|
||||
var_dump(session_destroy());
|
||||
echo "Done";
|
||||
ob_end_flush();
|
||||
?>
|
||||
@@ -0,0 +1,583 @@
|
||||
*** Testing session_decode() : error functionality ***
|
||||
bool(true)
|
||||
|
||||
-- Iteration 0 --
|
||||
bool(true)
|
||||
array(0) {
|
||||
}
|
||||
|
||||
-- Iteration 1 --
|
||||
bool(true)
|
||||
array(0) {
|
||||
}
|
||||
|
||||
-- Iteration 2 --
|
||||
bool(true)
|
||||
array(0) {
|
||||
}
|
||||
|
||||
-- Iteration 3 --
|
||||
bool(true)
|
||||
array(0) {
|
||||
}
|
||||
|
||||
-- Iteration 4 --
|
||||
bool(true)
|
||||
array(1) {
|
||||
["foo"]=>
|
||||
NULL
|
||||
}
|
||||
|
||||
-- Iteration 5 --
|
||||
bool(true)
|
||||
array(1) {
|
||||
["foo"]=>
|
||||
NULL
|
||||
}
|
||||
|
||||
-- Iteration 6 --
|
||||
bool(true)
|
||||
array(1) {
|
||||
["foo"]=>
|
||||
NULL
|
||||
}
|
||||
|
||||
-- Iteration 7 --
|
||||
bool(true)
|
||||
array(1) {
|
||||
["foo"]=>
|
||||
NULL
|
||||
}
|
||||
|
||||
-- Iteration 8 --
|
||||
bool(true)
|
||||
array(1) {
|
||||
["foo"]=>
|
||||
NULL
|
||||
}
|
||||
|
||||
-- Iteration 9 --
|
||||
bool(true)
|
||||
array(1) {
|
||||
["foo"]=>
|
||||
NULL
|
||||
}
|
||||
|
||||
-- Iteration 10 --
|
||||
bool(true)
|
||||
array(1) {
|
||||
["foo"]=>
|
||||
NULL
|
||||
}
|
||||
|
||||
-- Iteration 11 --
|
||||
bool(true)
|
||||
array(1) {
|
||||
["foo"]=>
|
||||
NULL
|
||||
}
|
||||
|
||||
-- Iteration 12 --
|
||||
bool(true)
|
||||
array(1) {
|
||||
["foo"]=>
|
||||
NULL
|
||||
}
|
||||
|
||||
-- Iteration 13 --
|
||||
bool(true)
|
||||
array(1) {
|
||||
["foo"]=>
|
||||
NULL
|
||||
}
|
||||
|
||||
-- Iteration 14 --
|
||||
bool(true)
|
||||
array(1) {
|
||||
["foo"]=>
|
||||
NULL
|
||||
}
|
||||
|
||||
-- Iteration 15 --
|
||||
bool(true)
|
||||
array(1) {
|
||||
["foo"]=>
|
||||
NULL
|
||||
}
|
||||
|
||||
-- Iteration 16 --
|
||||
bool(true)
|
||||
array(1) {
|
||||
["foo"]=>
|
||||
NULL
|
||||
}
|
||||
|
||||
-- Iteration 17 --
|
||||
bool(true)
|
||||
array(1) {
|
||||
["foo"]=>
|
||||
NULL
|
||||
}
|
||||
|
||||
-- Iteration 18 --
|
||||
bool(true)
|
||||
array(1) {
|
||||
["foo"]=>
|
||||
NULL
|
||||
}
|
||||
|
||||
-- Iteration 19 --
|
||||
bool(true)
|
||||
array(1) {
|
||||
["foo"]=>
|
||||
NULL
|
||||
}
|
||||
|
||||
-- Iteration 20 --
|
||||
bool(true)
|
||||
array(1) {
|
||||
["foo"]=>
|
||||
NULL
|
||||
}
|
||||
|
||||
-- Iteration 21 --
|
||||
bool(true)
|
||||
array(1) {
|
||||
["foo"]=>
|
||||
NULL
|
||||
}
|
||||
|
||||
-- Iteration 22 --
|
||||
bool(true)
|
||||
array(1) {
|
||||
["foo"]=>
|
||||
NULL
|
||||
}
|
||||
|
||||
-- Iteration 23 --
|
||||
bool(true)
|
||||
array(1) {
|
||||
["foo"]=>
|
||||
NULL
|
||||
}
|
||||
|
||||
-- Iteration 24 --
|
||||
bool(true)
|
||||
array(1) {
|
||||
["foo"]=>
|
||||
NULL
|
||||
}
|
||||
|
||||
-- Iteration 25 --
|
||||
bool(true)
|
||||
array(1) {
|
||||
["foo"]=>
|
||||
NULL
|
||||
}
|
||||
|
||||
-- Iteration 26 --
|
||||
bool(true)
|
||||
array(1) {
|
||||
["foo"]=>
|
||||
NULL
|
||||
}
|
||||
|
||||
-- Iteration 27 --
|
||||
bool(true)
|
||||
array(1) {
|
||||
["foo"]=>
|
||||
NULL
|
||||
}
|
||||
|
||||
-- Iteration 28 --
|
||||
bool(true)
|
||||
array(1) {
|
||||
["foo"]=>
|
||||
NULL
|
||||
}
|
||||
|
||||
-- Iteration 29 --
|
||||
bool(true)
|
||||
array(1) {
|
||||
["foo"]=>
|
||||
NULL
|
||||
}
|
||||
|
||||
-- Iteration 30 --
|
||||
bool(true)
|
||||
array(1) {
|
||||
["foo"]=>
|
||||
NULL
|
||||
}
|
||||
|
||||
-- Iteration 31 --
|
||||
bool(true)
|
||||
array(1) {
|
||||
["foo"]=>
|
||||
NULL
|
||||
}
|
||||
|
||||
-- Iteration 32 --
|
||||
bool(true)
|
||||
array(1) {
|
||||
["foo"]=>
|
||||
NULL
|
||||
}
|
||||
|
||||
-- Iteration 33 --
|
||||
bool(true)
|
||||
array(1) {
|
||||
["foo"]=>
|
||||
NULL
|
||||
}
|
||||
|
||||
-- Iteration 34 --
|
||||
bool(true)
|
||||
array(1) {
|
||||
["foo"]=>
|
||||
array(3) {
|
||||
[0]=>
|
||||
int(1)
|
||||
[1]=>
|
||||
int(2)
|
||||
[2]=>
|
||||
int(3)
|
||||
}
|
||||
}
|
||||
|
||||
-- Iteration 35 --
|
||||
bool(true)
|
||||
array(1) {
|
||||
["foo"]=>
|
||||
array(3) {
|
||||
[0]=>
|
||||
int(1)
|
||||
[1]=>
|
||||
int(2)
|
||||
[2]=>
|
||||
int(3)
|
||||
}
|
||||
}
|
||||
|
||||
-- Iteration 36 --
|
||||
bool(true)
|
||||
array(1) {
|
||||
["foo"]=>
|
||||
array(3) {
|
||||
[0]=>
|
||||
int(1)
|
||||
[1]=>
|
||||
int(2)
|
||||
[2]=>
|
||||
int(3)
|
||||
}
|
||||
}
|
||||
|
||||
-- Iteration 37 --
|
||||
bool(true)
|
||||
array(1) {
|
||||
["foo"]=>
|
||||
array(3) {
|
||||
[0]=>
|
||||
int(1)
|
||||
[1]=>
|
||||
int(2)
|
||||
[2]=>
|
||||
int(3)
|
||||
}
|
||||
}
|
||||
|
||||
-- Iteration 38 --
|
||||
bool(true)
|
||||
array(1) {
|
||||
["foo"]=>
|
||||
array(3) {
|
||||
[0]=>
|
||||
int(1)
|
||||
[1]=>
|
||||
int(2)
|
||||
[2]=>
|
||||
int(3)
|
||||
}
|
||||
}
|
||||
|
||||
-- Iteration 39 --
|
||||
bool(true)
|
||||
array(2) {
|
||||
["foo"]=>
|
||||
array(3) {
|
||||
[0]=>
|
||||
int(1)
|
||||
[1]=>
|
||||
int(2)
|
||||
[2]=>
|
||||
int(3)
|
||||
}
|
||||
["guff"]=>
|
||||
NULL
|
||||
}
|
||||
|
||||
-- Iteration 40 --
|
||||
bool(true)
|
||||
array(2) {
|
||||
["foo"]=>
|
||||
array(3) {
|
||||
[0]=>
|
||||
int(1)
|
||||
[1]=>
|
||||
int(2)
|
||||
[2]=>
|
||||
int(3)
|
||||
}
|
||||
["guff"]=>
|
||||
NULL
|
||||
}
|
||||
|
||||
-- Iteration 41 --
|
||||
bool(true)
|
||||
array(2) {
|
||||
["foo"]=>
|
||||
array(3) {
|
||||
[0]=>
|
||||
int(1)
|
||||
[1]=>
|
||||
int(2)
|
||||
[2]=>
|
||||
int(3)
|
||||
}
|
||||
["guff"]=>
|
||||
NULL
|
||||
}
|
||||
|
||||
-- Iteration 42 --
|
||||
bool(true)
|
||||
array(2) {
|
||||
["foo"]=>
|
||||
array(3) {
|
||||
[0]=>
|
||||
int(1)
|
||||
[1]=>
|
||||
int(2)
|
||||
[2]=>
|
||||
int(3)
|
||||
}
|
||||
["guff"]=>
|
||||
NULL
|
||||
}
|
||||
|
||||
-- Iteration 43 --
|
||||
bool(true)
|
||||
array(2) {
|
||||
["foo"]=>
|
||||
&array(3) {
|
||||
[0]=>
|
||||
int(1)
|
||||
[1]=>
|
||||
int(2)
|
||||
[2]=>
|
||||
int(3)
|
||||
}
|
||||
["guff"]=>
|
||||
&array(3) {
|
||||
[0]=>
|
||||
int(1)
|
||||
[1]=>
|
||||
int(2)
|
||||
[2]=>
|
||||
int(3)
|
||||
}
|
||||
}
|
||||
|
||||
-- Iteration 44 --
|
||||
bool(true)
|
||||
array(2) {
|
||||
["foo"]=>
|
||||
&array(3) {
|
||||
[0]=>
|
||||
int(1)
|
||||
[1]=>
|
||||
int(2)
|
||||
[2]=>
|
||||
int(3)
|
||||
}
|
||||
["guff"]=>
|
||||
&array(3) {
|
||||
[0]=>
|
||||
int(1)
|
||||
[1]=>
|
||||
int(2)
|
||||
[2]=>
|
||||
int(3)
|
||||
}
|
||||
}
|
||||
|
||||
-- Iteration 45 --
|
||||
bool(true)
|
||||
array(2) {
|
||||
["foo"]=>
|
||||
&array(3) {
|
||||
[0]=>
|
||||
int(1)
|
||||
[1]=>
|
||||
int(2)
|
||||
[2]=>
|
||||
int(3)
|
||||
}
|
||||
["guff"]=>
|
||||
&array(3) {
|
||||
[0]=>
|
||||
int(1)
|
||||
[1]=>
|
||||
int(2)
|
||||
[2]=>
|
||||
int(3)
|
||||
}
|
||||
}
|
||||
|
||||
-- Iteration 46 --
|
||||
bool(true)
|
||||
array(2) {
|
||||
["foo"]=>
|
||||
&array(3) {
|
||||
[0]=>
|
||||
int(1)
|
||||
[1]=>
|
||||
int(2)
|
||||
[2]=>
|
||||
int(3)
|
||||
}
|
||||
["guff"]=>
|
||||
&array(3) {
|
||||
[0]=>
|
||||
int(1)
|
||||
[1]=>
|
||||
int(2)
|
||||
[2]=>
|
||||
int(3)
|
||||
}
|
||||
}
|
||||
|
||||
-- Iteration 47 --
|
||||
bool(true)
|
||||
array(2) {
|
||||
["foo"]=>
|
||||
&array(3) {
|
||||
[0]=>
|
||||
int(1)
|
||||
[1]=>
|
||||
int(2)
|
||||
[2]=>
|
||||
int(3)
|
||||
}
|
||||
["guff"]=>
|
||||
&array(3) {
|
||||
[0]=>
|
||||
int(1)
|
||||
[1]=>
|
||||
int(2)
|
||||
[2]=>
|
||||
int(3)
|
||||
}
|
||||
}
|
||||
|
||||
-- Iteration 48 --
|
||||
bool(true)
|
||||
array(3) {
|
||||
["foo"]=>
|
||||
&array(3) {
|
||||
[0]=>
|
||||
int(1)
|
||||
[1]=>
|
||||
int(2)
|
||||
[2]=>
|
||||
int(3)
|
||||
}
|
||||
["guff"]=>
|
||||
&array(3) {
|
||||
[0]=>
|
||||
int(1)
|
||||
[1]=>
|
||||
int(2)
|
||||
[2]=>
|
||||
int(3)
|
||||
}
|
||||
["blah"]=>
|
||||
NULL
|
||||
}
|
||||
|
||||
-- Iteration 49 --
|
||||
bool(true)
|
||||
array(3) {
|
||||
["foo"]=>
|
||||
&array(3) {
|
||||
[0]=>
|
||||
int(1)
|
||||
[1]=>
|
||||
int(2)
|
||||
[2]=>
|
||||
int(3)
|
||||
}
|
||||
["guff"]=>
|
||||
&array(3) {
|
||||
[0]=>
|
||||
int(1)
|
||||
[1]=>
|
||||
int(2)
|
||||
[2]=>
|
||||
int(3)
|
||||
}
|
||||
["blah"]=>
|
||||
NULL
|
||||
}
|
||||
|
||||
-- Iteration 50 --
|
||||
bool(true)
|
||||
array(3) {
|
||||
["foo"]=>
|
||||
&array(3) {
|
||||
[0]=>
|
||||
int(1)
|
||||
[1]=>
|
||||
int(2)
|
||||
[2]=>
|
||||
int(3)
|
||||
}
|
||||
["guff"]=>
|
||||
&array(3) {
|
||||
[0]=>
|
||||
int(1)
|
||||
[1]=>
|
||||
int(2)
|
||||
[2]=>
|
||||
int(3)
|
||||
}
|
||||
["blah"]=>
|
||||
NULL
|
||||
}
|
||||
|
||||
-- Iteration 51 --
|
||||
bool(true)
|
||||
array(3) {
|
||||
["foo"]=>
|
||||
&array(3) {
|
||||
[0]=>
|
||||
int(1)
|
||||
[1]=>
|
||||
int(2)
|
||||
[2]=>
|
||||
int(3)
|
||||
}
|
||||
["guff"]=>
|
||||
&array(3) {
|
||||
[0]=>
|
||||
int(1)
|
||||
[1]=>
|
||||
int(2)
|
||||
[2]=>
|
||||
int(3)
|
||||
}
|
||||
["blah"]=>
|
||||
NULL
|
||||
}
|
||||
bool(true)
|
||||
Done
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
ob_start();
|
||||
|
||||
/*
|
||||
* Prototype : string session_decode(void)
|
||||
* Description : Decodes session data from a string
|
||||
* Source code : ext/session/session.c
|
||||
*/
|
||||
|
||||
echo "*** Testing session_decode() : variation ***\n";
|
||||
|
||||
var_dump(session_start());
|
||||
var_dump(session_decode("foo|a:3:{i:0;i:1;i:1;i:2;i:2;i:3;}guff|R:1;blah|R:1;"));
|
||||
var_dump($_SESSION);
|
||||
var_dump(session_decode("foo|a:3:{i:0;i:1;i:1;i:2;i:2;i:3;}guff|R:1;blah|R:1;"));
|
||||
var_dump($_SESSION);
|
||||
var_dump(session_decode("foo|a:3:{i:0;i:1;i:1;i:2;i:2;i:3;}guff|R:1;blah|R:1;"));
|
||||
var_dump($_SESSION);
|
||||
var_dump(session_decode("foo|a:3:{i:0;i:1;i:1;i:2;i:2;i:3;}guff|R:1;blah|R:1;"));
|
||||
var_dump($_SESSION);
|
||||
var_dump(session_decode("foo|a:3:{i:0;i:1;i:1;i:2;i:2;i:3;}guff|R:1;blah|R:1;"));
|
||||
var_dump($_SESSION);
|
||||
var_dump(session_destroy());
|
||||
|
||||
echo "Done";
|
||||
ob_end_flush();
|
||||
?>
|
||||
@@ -0,0 +1,154 @@
|
||||
*** Testing session_decode() : variation ***
|
||||
bool(true)
|
||||
bool(true)
|
||||
array(3) {
|
||||
["foo"]=>
|
||||
&array(3) {
|
||||
[0]=>
|
||||
int(1)
|
||||
[1]=>
|
||||
int(2)
|
||||
[2]=>
|
||||
int(3)
|
||||
}
|
||||
["guff"]=>
|
||||
&array(3) {
|
||||
[0]=>
|
||||
int(1)
|
||||
[1]=>
|
||||
int(2)
|
||||
[2]=>
|
||||
int(3)
|
||||
}
|
||||
["blah"]=>
|
||||
&array(3) {
|
||||
[0]=>
|
||||
int(1)
|
||||
[1]=>
|
||||
int(2)
|
||||
[2]=>
|
||||
int(3)
|
||||
}
|
||||
}
|
||||
bool(true)
|
||||
array(3) {
|
||||
["foo"]=>
|
||||
&array(3) {
|
||||
[0]=>
|
||||
int(1)
|
||||
[1]=>
|
||||
int(2)
|
||||
[2]=>
|
||||
int(3)
|
||||
}
|
||||
["guff"]=>
|
||||
&array(3) {
|
||||
[0]=>
|
||||
int(1)
|
||||
[1]=>
|
||||
int(2)
|
||||
[2]=>
|
||||
int(3)
|
||||
}
|
||||
["blah"]=>
|
||||
&array(3) {
|
||||
[0]=>
|
||||
int(1)
|
||||
[1]=>
|
||||
int(2)
|
||||
[2]=>
|
||||
int(3)
|
||||
}
|
||||
}
|
||||
bool(true)
|
||||
array(3) {
|
||||
["foo"]=>
|
||||
&array(3) {
|
||||
[0]=>
|
||||
int(1)
|
||||
[1]=>
|
||||
int(2)
|
||||
[2]=>
|
||||
int(3)
|
||||
}
|
||||
["guff"]=>
|
||||
&array(3) {
|
||||
[0]=>
|
||||
int(1)
|
||||
[1]=>
|
||||
int(2)
|
||||
[2]=>
|
||||
int(3)
|
||||
}
|
||||
["blah"]=>
|
||||
&array(3) {
|
||||
[0]=>
|
||||
int(1)
|
||||
[1]=>
|
||||
int(2)
|
||||
[2]=>
|
||||
int(3)
|
||||
}
|
||||
}
|
||||
bool(true)
|
||||
array(3) {
|
||||
["foo"]=>
|
||||
&array(3) {
|
||||
[0]=>
|
||||
int(1)
|
||||
[1]=>
|
||||
int(2)
|
||||
[2]=>
|
||||
int(3)
|
||||
}
|
||||
["guff"]=>
|
||||
&array(3) {
|
||||
[0]=>
|
||||
int(1)
|
||||
[1]=>
|
||||
int(2)
|
||||
[2]=>
|
||||
int(3)
|
||||
}
|
||||
["blah"]=>
|
||||
&array(3) {
|
||||
[0]=>
|
||||
int(1)
|
||||
[1]=>
|
||||
int(2)
|
||||
[2]=>
|
||||
int(3)
|
||||
}
|
||||
}
|
||||
bool(true)
|
||||
array(3) {
|
||||
["foo"]=>
|
||||
&array(3) {
|
||||
[0]=>
|
||||
int(1)
|
||||
[1]=>
|
||||
int(2)
|
||||
[2]=>
|
||||
int(3)
|
||||
}
|
||||
["guff"]=>
|
||||
&array(3) {
|
||||
[0]=>
|
||||
int(1)
|
||||
[1]=>
|
||||
int(2)
|
||||
[2]=>
|
||||
int(3)
|
||||
}
|
||||
["blah"]=>
|
||||
&array(3) {
|
||||
[0]=>
|
||||
int(1)
|
||||
[1]=>
|
||||
int(2)
|
||||
[2]=>
|
||||
int(3)
|
||||
}
|
||||
}
|
||||
bool(true)
|
||||
Done
|
||||
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
ob_start();
|
||||
|
||||
/*
|
||||
* Prototype : string session_decode(void)
|
||||
* Description : Decodes session data from a string
|
||||
* Source code : ext/session/session.c
|
||||
*/
|
||||
|
||||
echo "*** Testing session_decode() : variation ***\n";
|
||||
|
||||
var_dump(session_start());
|
||||
var_dump($_SESSION);
|
||||
$_SESSION["foo"] = 1234567890;
|
||||
$_SESSION["bar"] = "Hello World!";
|
||||
$_SESSION["guff"] = 123.456;
|
||||
var_dump($_SESSION);
|
||||
var_dump(session_decode("foo|a:3:{i:0;i:1;i:1;i:2;i:2;i:3;}guff|R:1;blah|R:1;"));
|
||||
var_dump($_SESSION);
|
||||
var_dump(session_destroy());
|
||||
|
||||
echo "Done";
|
||||
ob_end_flush();
|
||||
?>
|
||||
@@ -0,0 +1,46 @@
|
||||
*** Testing session_decode() : variation ***
|
||||
bool(true)
|
||||
array(0) {
|
||||
}
|
||||
array(3) {
|
||||
["foo"]=>
|
||||
int(1234567890)
|
||||
["bar"]=>
|
||||
string(12) "Hello World!"
|
||||
["guff"]=>
|
||||
float(123.456)
|
||||
}
|
||||
bool(true)
|
||||
array(4) {
|
||||
["foo"]=>
|
||||
&array(3) {
|
||||
[0]=>
|
||||
int(1)
|
||||
[1]=>
|
||||
int(2)
|
||||
[2]=>
|
||||
int(3)
|
||||
}
|
||||
["bar"]=>
|
||||
string(12) "Hello World!"
|
||||
["guff"]=>
|
||||
&array(3) {
|
||||
[0]=>
|
||||
int(1)
|
||||
[1]=>
|
||||
int(2)
|
||||
[2]=>
|
||||
int(3)
|
||||
}
|
||||
["blah"]=>
|
||||
&array(3) {
|
||||
[0]=>
|
||||
int(1)
|
||||
[1]=>
|
||||
int(2)
|
||||
[2]=>
|
||||
int(3)
|
||||
}
|
||||
}
|
||||
bool(true)
|
||||
Done
|
||||
@@ -0,0 +1,89 @@
|
||||
<?php
|
||||
|
||||
ob_start();
|
||||
|
||||
/*
|
||||
* Prototype : bool session_destroy(void)
|
||||
* Description : Destroys all data registered to a session
|
||||
* Source code : ext/session/session.c
|
||||
*/
|
||||
|
||||
echo "*** Testing session_destroy() : error functionality ***\n";
|
||||
|
||||
// Get an unset variable
|
||||
$unset_var = 10;
|
||||
unset($unset_var);
|
||||
|
||||
class classA
|
||||
{
|
||||
public function __toString() {
|
||||
return "Hello World!";
|
||||
}
|
||||
}
|
||||
|
||||
$heredoc = <<<EOT
|
||||
Hello World!
|
||||
EOT;
|
||||
|
||||
$fp = fopen(__FILE__, "r");
|
||||
|
||||
// Unexpected values to be passed as arguments
|
||||
$inputs = array(
|
||||
|
||||
// Integer data
|
||||
/*1*/ 0,
|
||||
1,
|
||||
12345,
|
||||
-2345,
|
||||
|
||||
// Float data
|
||||
/*5*/ 10.5,
|
||||
-10.5,
|
||||
12.3456789000e10,
|
||||
12.3456789000E-10,
|
||||
.5,
|
||||
|
||||
// Null data
|
||||
/*10*/ NULL,
|
||||
null,
|
||||
|
||||
// Boolean data
|
||||
/*12*/ true,
|
||||
false,
|
||||
TRUE,
|
||||
FALSE,
|
||||
|
||||
// Empty strings
|
||||
/*16*/ "",
|
||||
'',
|
||||
|
||||
// Invalid string data
|
||||
/*18*/ "Nothing",
|
||||
'Nothing',
|
||||
$heredoc,
|
||||
|
||||
// Object data
|
||||
/*21*/ new classA(),
|
||||
|
||||
// Undefined data
|
||||
/*22*/ @$undefined_var,
|
||||
|
||||
// Unset data
|
||||
/*23*/ @$unset_var,
|
||||
|
||||
// Resource variable
|
||||
/*24*/ $fp
|
||||
);
|
||||
|
||||
|
||||
$iterator = 1;
|
||||
foreach($inputs as $input) {
|
||||
echo "\n-- Iteration $iterator --\n";
|
||||
var_dump(session_destroy($input));
|
||||
$iterator++;
|
||||
};
|
||||
|
||||
fclose($fp);
|
||||
echo "Done";
|
||||
ob_end_flush();
|
||||
?>
|
||||
@@ -0,0 +1,98 @@
|
||||
*** Testing session_destroy() : error functionality ***
|
||||
|
||||
-- Iteration 1 --
|
||||
HipHop Warning: %a
|
||||
NULL
|
||||
|
||||
-- Iteration 2 --
|
||||
HipHop Warning: %a
|
||||
NULL
|
||||
|
||||
-- Iteration 3 --
|
||||
HipHop Warning: %a
|
||||
NULL
|
||||
|
||||
-- Iteration 4 --
|
||||
HipHop Warning: %a
|
||||
NULL
|
||||
|
||||
-- Iteration 5 --
|
||||
HipHop Warning: %a
|
||||
NULL
|
||||
|
||||
-- Iteration 6 --
|
||||
HipHop Warning: %a
|
||||
NULL
|
||||
|
||||
-- Iteration 7 --
|
||||
HipHop Warning: %a
|
||||
NULL
|
||||
|
||||
-- Iteration 8 --
|
||||
HipHop Warning: %a
|
||||
NULL
|
||||
|
||||
-- Iteration 9 --
|
||||
HipHop Warning: %a
|
||||
NULL
|
||||
|
||||
-- Iteration 10 --
|
||||
HipHop Warning: %a
|
||||
NULL
|
||||
|
||||
-- Iteration 11 --
|
||||
HipHop Warning: %a
|
||||
NULL
|
||||
|
||||
-- Iteration 12 --
|
||||
HipHop Warning: %a
|
||||
NULL
|
||||
|
||||
-- Iteration 13 --
|
||||
HipHop Warning: %a
|
||||
NULL
|
||||
|
||||
-- Iteration 14 --
|
||||
HipHop Warning: %a
|
||||
NULL
|
||||
|
||||
-- Iteration 15 --
|
||||
HipHop Warning: %a
|
||||
NULL
|
||||
|
||||
-- Iteration 16 --
|
||||
HipHop Warning: %a
|
||||
NULL
|
||||
|
||||
-- Iteration 17 --
|
||||
HipHop Warning: %a
|
||||
NULL
|
||||
|
||||
-- Iteration 18 --
|
||||
HipHop Warning: %a
|
||||
NULL
|
||||
|
||||
-- Iteration 19 --
|
||||
HipHop Warning: %a
|
||||
NULL
|
||||
|
||||
-- Iteration 20 --
|
||||
HipHop Warning: %a
|
||||
NULL
|
||||
|
||||
-- Iteration 21 --
|
||||
HipHop Warning: %a
|
||||
NULL
|
||||
|
||||
-- Iteration 22 --
|
||||
HipHop Warning: %a
|
||||
NULL
|
||||
|
||||
-- Iteration 23 --
|
||||
HipHop Warning: %a
|
||||
NULL
|
||||
|
||||
-- Iteration 24 --
|
||||
HipHop Warning: %a
|
||||
NULL
|
||||
Done
|
||||
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
ob_start();
|
||||
|
||||
/*
|
||||
* Prototype : bool session_destroy(void)
|
||||
* Description : Destroys all data registered to a session
|
||||
* Source code : ext/session/session.c
|
||||
*/
|
||||
|
||||
echo "*** Testing session_destroy() : variation ***\n";
|
||||
|
||||
var_dump(session_start());
|
||||
var_dump(session_destroy());
|
||||
var_dump(session_destroy());
|
||||
var_dump(session_destroy());
|
||||
var_dump(session_destroy());
|
||||
var_dump(session_destroy());
|
||||
|
||||
echo "Done";
|
||||
ob_end_flush();
|
||||
?>
|
||||
@@ -0,0 +1,12 @@
|
||||
*** Testing session_destroy() : variation ***
|
||||
bool(true)
|
||||
bool(true)
|
||||
HipHop Warning: %a
|
||||
bool(false)
|
||||
HipHop Warning: %a
|
||||
bool(false)
|
||||
HipHop Warning: %a
|
||||
bool(false)
|
||||
HipHop Warning: %a
|
||||
bool(false)
|
||||
Done
|
||||
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
ob_start();
|
||||
|
||||
/*
|
||||
* Prototype : bool session_destroy(void)
|
||||
* Description : Destroys all data registered to a session
|
||||
* Source code : ext/session/session.c
|
||||
*/
|
||||
|
||||
echo "*** Testing session_destroy() : variation ***\n";
|
||||
|
||||
var_dump(session_start());
|
||||
var_dump(session_id());
|
||||
var_dump(session_destroy());
|
||||
var_dump(session_id());
|
||||
var_dump(session_start());
|
||||
var_dump(session_id());
|
||||
var_dump(session_destroy());
|
||||
var_dump(session_id());
|
||||
|
||||
echo "Done";
|
||||
ob_end_flush();
|
||||
?>
|
||||
@@ -0,0 +1,10 @@
|
||||
*** Testing session_destroy() : variation ***
|
||||
bool(true)
|
||||
string(%d) "%s"
|
||||
bool(true)
|
||||
string(0) ""
|
||||
bool(true)
|
||||
string(%d) "%s"
|
||||
bool(true)
|
||||
string(0) ""
|
||||
Done
|
||||
@@ -0,0 +1,91 @@
|
||||
<?php
|
||||
|
||||
ob_start();
|
||||
|
||||
/*
|
||||
* Prototype : string session_encode(void)
|
||||
* Description : Encodes the current session data as a string
|
||||
* Source code : ext/session/session.c
|
||||
*/
|
||||
|
||||
echo "*** Testing session_encode() : basic functionality ***\n";
|
||||
|
||||
// Get an unset variable
|
||||
$unset_var = 10;
|
||||
unset($unset_var);
|
||||
|
||||
class classA
|
||||
{
|
||||
public function __toString() {
|
||||
return "Hello World!";
|
||||
}
|
||||
}
|
||||
|
||||
$heredoc = <<<EOT
|
||||
Hello World!
|
||||
EOT;
|
||||
|
||||
$fp = fopen(__FILE__, "r");
|
||||
|
||||
// Unexpected values to be passed as arguments
|
||||
$inputs = array(
|
||||
|
||||
// Integer data
|
||||
/*1*/ 0,
|
||||
1,
|
||||
12345,
|
||||
-2345,
|
||||
|
||||
// Float data
|
||||
/*5*/ 10.5,
|
||||
-10.5,
|
||||
12.3456789000e10,
|
||||
12.3456789000E-10,
|
||||
.5,
|
||||
|
||||
// Null data
|
||||
/*10*/ NULL,
|
||||
null,
|
||||
|
||||
// Boolean data
|
||||
/*12*/ true,
|
||||
false,
|
||||
TRUE,
|
||||
FALSE,
|
||||
|
||||
// Empty strings
|
||||
/*16*/ "",
|
||||
'',
|
||||
|
||||
// Invalid string data
|
||||
/*18*/ "Nothing",
|
||||
'Nothing',
|
||||
$heredoc,
|
||||
|
||||
// Object data
|
||||
/*21*/ new classA(),
|
||||
|
||||
// Undefined data
|
||||
/*22*/ @$undefined_var,
|
||||
|
||||
// Unset data
|
||||
/*23*/ @$unset_var,
|
||||
|
||||
// Resource variable
|
||||
/*24*/ $fp
|
||||
);
|
||||
|
||||
session_start();
|
||||
|
||||
$iterator = 1;
|
||||
foreach($inputs as $input) {
|
||||
echo "\n-- Iteration $iterator --\n";
|
||||
var_dump(session_encode($input));
|
||||
$iterator++;
|
||||
};
|
||||
|
||||
session_destroy();
|
||||
fclose($fp);
|
||||
echo "Done";
|
||||
ob_end_flush();
|
||||
?>
|
||||
@@ -0,0 +1,98 @@
|
||||
*** Testing session_encode() : basic functionality ***
|
||||
|
||||
-- Iteration 1 --
|
||||
HipHop Warning: %a
|
||||
NULL
|
||||
|
||||
-- Iteration 2 --
|
||||
HipHop Warning: %a
|
||||
NULL
|
||||
|
||||
-- Iteration 3 --
|
||||
HipHop Warning: %a
|
||||
NULL
|
||||
|
||||
-- Iteration 4 --
|
||||
HipHop Warning: %a
|
||||
NULL
|
||||
|
||||
-- Iteration 5 --
|
||||
HipHop Warning: %a
|
||||
NULL
|
||||
|
||||
-- Iteration 6 --
|
||||
HipHop Warning: %a
|
||||
NULL
|
||||
|
||||
-- Iteration 7 --
|
||||
HipHop Warning: %a
|
||||
NULL
|
||||
|
||||
-- Iteration 8 --
|
||||
HipHop Warning: %a
|
||||
NULL
|
||||
|
||||
-- Iteration 9 --
|
||||
HipHop Warning: %a
|
||||
NULL
|
||||
|
||||
-- Iteration 10 --
|
||||
HipHop Warning: %a
|
||||
NULL
|
||||
|
||||
-- Iteration 11 --
|
||||
HipHop Warning: %a
|
||||
NULL
|
||||
|
||||
-- Iteration 12 --
|
||||
HipHop Warning: %a
|
||||
NULL
|
||||
|
||||
-- Iteration 13 --
|
||||
HipHop Warning: %a
|
||||
NULL
|
||||
|
||||
-- Iteration 14 --
|
||||
HipHop Warning: %a
|
||||
NULL
|
||||
|
||||
-- Iteration 15 --
|
||||
HipHop Warning: %a
|
||||
NULL
|
||||
|
||||
-- Iteration 16 --
|
||||
HipHop Warning: %a
|
||||
NULL
|
||||
|
||||
-- Iteration 17 --
|
||||
HipHop Warning: %a
|
||||
NULL
|
||||
|
||||
-- Iteration 18 --
|
||||
HipHop Warning: %a
|
||||
NULL
|
||||
|
||||
-- Iteration 19 --
|
||||
HipHop Warning: %a
|
||||
NULL
|
||||
|
||||
-- Iteration 20 --
|
||||
HipHop Warning: %a
|
||||
NULL
|
||||
|
||||
-- Iteration 21 --
|
||||
HipHop Warning: %a
|
||||
NULL
|
||||
|
||||
-- Iteration 22 --
|
||||
HipHop Warning: %a
|
||||
NULL
|
||||
|
||||
-- Iteration 23 --
|
||||
HipHop Warning: %a
|
||||
NULL
|
||||
|
||||
-- Iteration 24 --
|
||||
HipHop Warning: %a
|
||||
NULL
|
||||
Done
|
||||
@@ -0,0 +1,91 @@
|
||||
<?php
|
||||
|
||||
ob_start();
|
||||
|
||||
/*
|
||||
* Prototype : string session_encode(void)
|
||||
* Description : Encodes the current session data as a string
|
||||
* Source code : ext/session/session.c
|
||||
*/
|
||||
|
||||
echo "*** Testing session_encode() : error functionality ***\n";
|
||||
|
||||
// Get an unset variable
|
||||
$unset_var = 10;
|
||||
unset($unset_var);
|
||||
|
||||
class classA
|
||||
{
|
||||
public function __toString() {
|
||||
return "Hello World!";
|
||||
}
|
||||
}
|
||||
|
||||
$heredoc = <<<EOT
|
||||
Hello World!
|
||||
EOT;
|
||||
|
||||
$fp = fopen(__FILE__, "r");
|
||||
|
||||
// Unexpected values to be passed as arguments
|
||||
$inputs = array(
|
||||
|
||||
// Integer data
|
||||
/*1*/ 0,
|
||||
1,
|
||||
12345,
|
||||
-2345,
|
||||
|
||||
// Float data
|
||||
/*5*/ 10.5,
|
||||
-10.5,
|
||||
12.3456789000e10,
|
||||
12.3456789000E-10,
|
||||
.5,
|
||||
|
||||
// Null data
|
||||
/*10*/ NULL,
|
||||
null,
|
||||
|
||||
// Boolean data
|
||||
/*12*/ true,
|
||||
false,
|
||||
TRUE,
|
||||
FALSE,
|
||||
|
||||
// Empty strings
|
||||
/*16*/ "",
|
||||
'',
|
||||
|
||||
// Invalid string data
|
||||
/*18*/ "Nothing",
|
||||
'Nothing',
|
||||
$heredoc,
|
||||
|
||||
// Object data
|
||||
/*21*/ new classA(),
|
||||
|
||||
// Undefined data
|
||||
/*22*/ @$undefined_var,
|
||||
|
||||
// Unset data
|
||||
/*23*/ @$unset_var,
|
||||
|
||||
// Resource variable
|
||||
/*24*/ $fp
|
||||
);
|
||||
|
||||
$iterator = 1;
|
||||
foreach($inputs as $input) {
|
||||
echo "\n-- Iteration $iterator --\n";
|
||||
var_dump(session_start());
|
||||
$_SESSION[$input] = "Hello World!";
|
||||
var_dump(session_encode());
|
||||
var_dump(session_destroy());
|
||||
$iterator++;
|
||||
};
|
||||
|
||||
fclose($fp);
|
||||
echo "Done";
|
||||
ob_end_flush();
|
||||
?>
|
||||
@@ -0,0 +1,139 @@
|
||||
*** Testing session_encode() : error functionality ***
|
||||
|
||||
-- Iteration 1 --
|
||||
bool(true)
|
||||
HipHop Notice: %a
|
||||
bool(false)
|
||||
bool(true)
|
||||
|
||||
-- Iteration 2 --
|
||||
bool(true)
|
||||
HipHop Notice: %a
|
||||
bool(false)
|
||||
bool(true)
|
||||
|
||||
-- Iteration 3 --
|
||||
bool(true)
|
||||
HipHop Notice: %a
|
||||
bool(false)
|
||||
bool(true)
|
||||
|
||||
-- Iteration 4 --
|
||||
bool(true)
|
||||
HipHop Notice: %a
|
||||
bool(false)
|
||||
bool(true)
|
||||
|
||||
-- Iteration 5 --
|
||||
bool(true)
|
||||
HipHop Notice: %a
|
||||
bool(false)
|
||||
bool(true)
|
||||
|
||||
-- Iteration 6 --
|
||||
bool(true)
|
||||
HipHop Notice: %a
|
||||
bool(false)
|
||||
bool(true)
|
||||
|
||||
-- Iteration 7 --
|
||||
bool(true)
|
||||
HipHop Notice: %a
|
||||
bool(false)
|
||||
bool(true)
|
||||
|
||||
-- Iteration 8 --
|
||||
bool(true)
|
||||
HipHop Notice: %a
|
||||
bool(false)
|
||||
bool(true)
|
||||
|
||||
-- Iteration 9 --
|
||||
bool(true)
|
||||
HipHop Notice: %a
|
||||
bool(false)
|
||||
bool(true)
|
||||
|
||||
-- Iteration 10 --
|
||||
bool(true)
|
||||
string(21) "|s:12:"Hello World!";"
|
||||
bool(true)
|
||||
|
||||
-- Iteration 11 --
|
||||
bool(true)
|
||||
string(21) "|s:12:"Hello World!";"
|
||||
bool(true)
|
||||
|
||||
-- Iteration 12 --
|
||||
bool(true)
|
||||
HipHop Notice: %a
|
||||
bool(false)
|
||||
bool(true)
|
||||
|
||||
-- Iteration 13 --
|
||||
bool(true)
|
||||
HipHop Notice: %a
|
||||
bool(false)
|
||||
bool(true)
|
||||
|
||||
-- Iteration 14 --
|
||||
bool(true)
|
||||
HipHop Notice: %a
|
||||
bool(false)
|
||||
bool(true)
|
||||
|
||||
-- Iteration 15 --
|
||||
bool(true)
|
||||
HipHop Notice: %a
|
||||
bool(false)
|
||||
bool(true)
|
||||
|
||||
-- Iteration 16 --
|
||||
bool(true)
|
||||
string(21) "|s:12:"Hello World!";"
|
||||
bool(true)
|
||||
|
||||
-- Iteration 17 --
|
||||
bool(true)
|
||||
string(21) "|s:12:"Hello World!";"
|
||||
bool(true)
|
||||
|
||||
-- Iteration 18 --
|
||||
bool(true)
|
||||
string(28) "Nothing|s:12:"Hello World!";"
|
||||
bool(true)
|
||||
|
||||
-- Iteration 19 --
|
||||
bool(true)
|
||||
string(28) "Nothing|s:12:"Hello World!";"
|
||||
bool(true)
|
||||
|
||||
-- Iteration 20 --
|
||||
bool(true)
|
||||
bool(false)
|
||||
bool(true)
|
||||
|
||||
-- Iteration 21 --
|
||||
bool(true)
|
||||
HipHop Warning: %a
|
||||
bool(false)
|
||||
bool(true)
|
||||
|
||||
-- Iteration 22 --
|
||||
bool(true)
|
||||
string(21) "|s:12:"Hello World!";"
|
||||
bool(true)
|
||||
|
||||
-- Iteration 23 --
|
||||
bool(true)
|
||||
string(21) "|s:12:"Hello World!";"
|
||||
bool(true)
|
||||
|
||||
-- Iteration 24 --
|
||||
bool(true)
|
||||
|
||||
Strict Standards: Resource ID#%d used as offset, casting to integer (%d) in hphp/test/zend/bad/ext-session/session_encode_error2.php on line %d
|
||||
HipHop Notice: %a
|
||||
bool(false)
|
||||
bool(true)
|
||||
Done
|
||||
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
ob_start();
|
||||
|
||||
/*
|
||||
* Prototype : string session_encode(void)
|
||||
* Description : Encodes the current session data as a string
|
||||
* Source code : ext/session/session.c
|
||||
*/
|
||||
|
||||
echo "*** Testing session_encode() : variation ***\n";
|
||||
|
||||
var_dump(session_encode());
|
||||
var_dump(session_start());
|
||||
var_dump(session_encode());
|
||||
var_dump(session_write_close());
|
||||
var_dump(session_encode());
|
||||
var_dump(session_start());
|
||||
var_dump(session_encode());
|
||||
var_dump(session_destroy());
|
||||
var_dump(session_encode());
|
||||
|
||||
echo "Done";
|
||||
ob_end_flush();
|
||||
?>
|
||||
@@ -0,0 +1,13 @@
|
||||
*** Testing session_encode() : variation ***
|
||||
HipHop Warning: %a
|
||||
bool(false)
|
||||
bool(true)
|
||||
bool(false)
|
||||
NULL
|
||||
bool(false)
|
||||
bool(true)
|
||||
bool(false)
|
||||
bool(true)
|
||||
HipHop Warning: %a
|
||||
bool(false)
|
||||
Done
|
||||
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
ob_start();
|
||||
|
||||
/*
|
||||
* Prototype : string session_encode(void)
|
||||
* Description : Encodes the current session data as a string
|
||||
* Source code : ext/session/session.c
|
||||
*/
|
||||
|
||||
echo "*** Testing session_encode() : variation ***\n";
|
||||
|
||||
var_dump(session_start());
|
||||
|
||||
$array = array(1,2,3);
|
||||
$_SESSION["foo"] = &$array;
|
||||
$_SESSION["guff"] = &$array;
|
||||
$_SESSION["blah"] = &$array;
|
||||
var_dump(session_encode());
|
||||
var_dump(session_destroy());
|
||||
|
||||
echo "Done";
|
||||
ob_end_flush();
|
||||
?>
|
||||
@@ -0,0 +1,5 @@
|
||||
*** Testing session_encode() : variation ***
|
||||
bool(true)
|
||||
string(52) "foo|a:3:{i:0;i:1;i:1;i:2;i:2;i:3;}guff|R:1;blah|R:1;"
|
||||
bool(true)
|
||||
Done
|
||||
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
ob_start();
|
||||
|
||||
/*
|
||||
* Prototype : string session_encode(void)
|
||||
* Description : Encodes the current session data as a string
|
||||
* Source code : ext/session/session.c
|
||||
*/
|
||||
|
||||
echo "*** Testing session_encode() : variation ***\n";
|
||||
|
||||
var_dump(session_start());
|
||||
|
||||
$array = array(1,2,3);
|
||||
$array["foo"] = &$array;
|
||||
$array["blah"] = &$array;
|
||||
$_SESSION["data"] = &$array;
|
||||
var_dump(session_encode());
|
||||
var_dump(session_destroy());
|
||||
|
||||
echo "Done";
|
||||
ob_end_flush();
|
||||
?>
|
||||
@@ -0,0 +1,5 @@
|
||||
*** Testing session_encode() : variation ***
|
||||
bool(true)
|
||||
string(64) "data|a:5:{i:0;i:1;i:1;i:2;i:2;i:3;s:3:"foo";R:1;s:4:"blah";R:1;}"
|
||||
bool(true)
|
||||
Done
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
ob_start();
|
||||
|
||||
/*
|
||||
* Prototype : string session_encode(void)
|
||||
* Description : Encodes the current session data as a string
|
||||
* Source code : ext/session/session.c
|
||||
*/
|
||||
|
||||
echo "*** Testing session_encode() : variation ***\n";
|
||||
|
||||
var_dump(session_start());
|
||||
$_SESSION[] = 1234567890;
|
||||
var_dump(session_encode());
|
||||
var_dump(session_destroy());
|
||||
var_dump(session_start());
|
||||
$_SESSION[1234567890] = "Hello World!";
|
||||
var_dump(session_encode());
|
||||
var_dump(session_destroy());
|
||||
var_dump(session_start());
|
||||
$_SESSION[-1234567890] = 1234567890;
|
||||
var_dump(session_encode());
|
||||
var_dump(session_destroy());
|
||||
|
||||
echo "Done";
|
||||
ob_end_flush();
|
||||
?>
|
||||
@@ -0,0 +1,14 @@
|
||||
*** Testing session_encode() : variation ***
|
||||
bool(true)
|
||||
HipHop Notice: %a
|
||||
bool(false)
|
||||
bool(true)
|
||||
bool(true)
|
||||
HipHop Notice: %a
|
||||
bool(false)
|
||||
bool(true)
|
||||
bool(true)
|
||||
HipHop Notice: %a
|
||||
bool(false)
|
||||
bool(true)
|
||||
Done
|
||||
@@ -0,0 +1,88 @@
|
||||
<?php
|
||||
|
||||
ob_start();
|
||||
|
||||
/*
|
||||
* Prototype : array session_get_cookie_params(void)
|
||||
* Description : Get the session cookie parameters
|
||||
* Source code : ext/session/session.c
|
||||
*/
|
||||
|
||||
echo "*** Testing session_get_cookie_params() : error functionality ***\n";
|
||||
|
||||
// Get an unset variable
|
||||
$unset_var = 10;
|
||||
unset($unset_var);
|
||||
|
||||
class classA
|
||||
{
|
||||
public function __toString() {
|
||||
return "Hello World!";
|
||||
}
|
||||
}
|
||||
|
||||
$heredoc = <<<EOT
|
||||
Hello World!
|
||||
EOT;
|
||||
|
||||
$fp = fopen(__FILE__, "r");
|
||||
|
||||
// Unexpected values to be passed as arguments
|
||||
$inputs = array(
|
||||
|
||||
// Integer data
|
||||
/*1*/ 0,
|
||||
1,
|
||||
12345,
|
||||
-2345,
|
||||
|
||||
// Float data
|
||||
/*5*/ 10.5,
|
||||
-10.5,
|
||||
12.3456789000e10,
|
||||
12.3456789000E-10,
|
||||
.5,
|
||||
|
||||
// Null data
|
||||
/*10*/ NULL,
|
||||
null,
|
||||
|
||||
// Boolean data
|
||||
/*12*/ true,
|
||||
false,
|
||||
TRUE,
|
||||
FALSE,
|
||||
|
||||
// Empty strings
|
||||
/*16*/ "",
|
||||
'',
|
||||
|
||||
// Invalid string data
|
||||
/*18*/ "Nothing",
|
||||
'Nothing',
|
||||
$heredoc,
|
||||
|
||||
// Object data
|
||||
/*21*/ new classA(),
|
||||
|
||||
// Undefined data
|
||||
/*22*/ @$undefined_var,
|
||||
|
||||
// Unset data
|
||||
/*23*/ @$unset_var,
|
||||
|
||||
// Resource variable
|
||||
/*24*/ $fp
|
||||
);
|
||||
|
||||
$iterator = 1;
|
||||
foreach($inputs as $input) {
|
||||
echo "\n-- Iteration $iterator --\n";
|
||||
var_dump(session_get_cookie_params($input));
|
||||
$iterator++;
|
||||
};
|
||||
|
||||
fclose($fp);
|
||||
echo "Done";
|
||||
ob_end_flush();
|
||||
?>
|
||||
@@ -0,0 +1,98 @@
|
||||
*** Testing session_get_cookie_params() : error functionality ***
|
||||
|
||||
-- Iteration 1 --
|
||||
HipHop Warning: %a
|
||||
NULL
|
||||
|
||||
-- Iteration 2 --
|
||||
HipHop Warning: %a
|
||||
NULL
|
||||
|
||||
-- Iteration 3 --
|
||||
HipHop Warning: %a
|
||||
NULL
|
||||
|
||||
-- Iteration 4 --
|
||||
HipHop Warning: %a
|
||||
NULL
|
||||
|
||||
-- Iteration 5 --
|
||||
HipHop Warning: %a
|
||||
NULL
|
||||
|
||||
-- Iteration 6 --
|
||||
HipHop Warning: %a
|
||||
NULL
|
||||
|
||||
-- Iteration 7 --
|
||||
HipHop Warning: %a
|
||||
NULL
|
||||
|
||||
-- Iteration 8 --
|
||||
HipHop Warning: %a
|
||||
NULL
|
||||
|
||||
-- Iteration 9 --
|
||||
HipHop Warning: %a
|
||||
NULL
|
||||
|
||||
-- Iteration 10 --
|
||||
HipHop Warning: %a
|
||||
NULL
|
||||
|
||||
-- Iteration 11 --
|
||||
HipHop Warning: %a
|
||||
NULL
|
||||
|
||||
-- Iteration 12 --
|
||||
HipHop Warning: %a
|
||||
NULL
|
||||
|
||||
-- Iteration 13 --
|
||||
HipHop Warning: %a
|
||||
NULL
|
||||
|
||||
-- Iteration 14 --
|
||||
HipHop Warning: %a
|
||||
NULL
|
||||
|
||||
-- Iteration 15 --
|
||||
HipHop Warning: %a
|
||||
NULL
|
||||
|
||||
-- Iteration 16 --
|
||||
HipHop Warning: %a
|
||||
NULL
|
||||
|
||||
-- Iteration 17 --
|
||||
HipHop Warning: %a
|
||||
NULL
|
||||
|
||||
-- Iteration 18 --
|
||||
HipHop Warning: %a
|
||||
NULL
|
||||
|
||||
-- Iteration 19 --
|
||||
HipHop Warning: %a
|
||||
NULL
|
||||
|
||||
-- Iteration 20 --
|
||||
HipHop Warning: %a
|
||||
NULL
|
||||
|
||||
-- Iteration 21 --
|
||||
HipHop Warning: %a
|
||||
NULL
|
||||
|
||||
-- Iteration 22 --
|
||||
HipHop Warning: %a
|
||||
NULL
|
||||
|
||||
-- Iteration 23 --
|
||||
HipHop Warning: %a
|
||||
NULL
|
||||
|
||||
-- Iteration 24 --
|
||||
HipHop Warning: %a
|
||||
NULL
|
||||
Done
|
||||
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
ob_start();
|
||||
|
||||
/*
|
||||
* Prototype : string session_id([string $id])
|
||||
* Description : Get and/or set the current session id
|
||||
* Source code : ext/session/session.c
|
||||
*/
|
||||
|
||||
echo "*** Testing session_id() : basic functionality ***\n";
|
||||
|
||||
var_dump(session_id());
|
||||
var_dump(session_id("test"));
|
||||
var_dump(session_id());
|
||||
var_dump(session_id("1234567890"));
|
||||
var_dump(session_id());
|
||||
var_dump(session_start());
|
||||
var_dump(session_id());
|
||||
var_dump(session_destroy());
|
||||
var_dump(session_id());
|
||||
|
||||
echo "Done";
|
||||
ob_end_flush();
|
||||
?>
|
||||
@@ -0,0 +1,11 @@
|
||||
*** Testing session_id() : basic functionality ***
|
||||
string(0) ""
|
||||
string(0) ""
|
||||
string(4) "test"
|
||||
string(4) "test"
|
||||
string(10) "1234567890"
|
||||
bool(true)
|
||||
string(10) "1234567890"
|
||||
bool(true)
|
||||
string(0) ""
|
||||
Done
|
||||
@@ -0,0 +1,89 @@
|
||||
<?php
|
||||
|
||||
ob_start();
|
||||
|
||||
/*
|
||||
* Prototype : string session_id([string $id])
|
||||
* Description : Get and/or set the current session id
|
||||
* Source code : ext/session/session.c
|
||||
*/
|
||||
|
||||
echo "*** Testing session_id() : error functionality ***\n";
|
||||
|
||||
// Get an unset variable
|
||||
$unset_var = 10;
|
||||
unset($unset_var);
|
||||
|
||||
class classA
|
||||
{
|
||||
public function __toString() {
|
||||
return "Hello World!";
|
||||
}
|
||||
}
|
||||
|
||||
$heredoc = <<<EOT
|
||||
Hello World!
|
||||
EOT;
|
||||
|
||||
$fp = fopen(__FILE__, "r");
|
||||
|
||||
// Unexpected values to be passed as arguments
|
||||
$inputs = array(
|
||||
|
||||
// Integer data
|
||||
/*1*/ 0,
|
||||
1,
|
||||
12345,
|
||||
-2345,
|
||||
|
||||
// Float data
|
||||
/*5*/ 10.5,
|
||||
-10.5,
|
||||
12.3456789000e10,
|
||||
12.3456789000E-10,
|
||||
.5,
|
||||
|
||||
// Null data
|
||||
/*10*/ NULL,
|
||||
null,
|
||||
|
||||
// Boolean data
|
||||
/*12*/ true,
|
||||
false,
|
||||
TRUE,
|
||||
FALSE,
|
||||
|
||||
// Empty strings
|
||||
/*16*/ "",
|
||||
'',
|
||||
|
||||
// Invalid string data
|
||||
/*18*/ "Nothing",
|
||||
'Nothing',
|
||||
$heredoc,
|
||||
|
||||
// Object data
|
||||
/*21*/ new classA(),
|
||||
|
||||
// Undefined data
|
||||
/*22*/ @$undefined_var,
|
||||
|
||||
// Unset data
|
||||
/*23*/ @$unset_var,
|
||||
|
||||
// Resource variable
|
||||
/*24*/ $fp
|
||||
);
|
||||
|
||||
|
||||
$iterator = 1;
|
||||
foreach($inputs as $input) {
|
||||
echo "\n-- Iteration $iterator --\n";
|
||||
var_dump(session_id($input));
|
||||
$iterator++;
|
||||
};
|
||||
|
||||
fclose($fp);
|
||||
echo "Done";
|
||||
ob_end_flush();
|
||||
?>
|
||||
@@ -0,0 +1,75 @@
|
||||
*** Testing session_id() : error functionality ***
|
||||
|
||||
-- Iteration 1 --
|
||||
string(0) ""
|
||||
|
||||
-- Iteration 2 --
|
||||
string(1) "0"
|
||||
|
||||
-- Iteration 3 --
|
||||
string(1) "1"
|
||||
|
||||
-- Iteration 4 --
|
||||
string(5) "12345"
|
||||
|
||||
-- Iteration 5 --
|
||||
string(5) "-2345"
|
||||
|
||||
-- Iteration 6 --
|
||||
string(4) "10.5"
|
||||
|
||||
-- Iteration 7 --
|
||||
string(5) "-10.5"
|
||||
|
||||
-- Iteration 8 --
|
||||
string(12) "123456789000"
|
||||
|
||||
-- Iteration 9 --
|
||||
string(13) "1.23456789E-9"
|
||||
|
||||
-- Iteration 10 --
|
||||
string(3) "0.5"
|
||||
|
||||
-- Iteration 11 --
|
||||
string(0) ""
|
||||
|
||||
-- Iteration 12 --
|
||||
string(0) ""
|
||||
|
||||
-- Iteration 13 --
|
||||
string(1) "1"
|
||||
|
||||
-- Iteration 14 --
|
||||
string(0) ""
|
||||
|
||||
-- Iteration 15 --
|
||||
string(1) "1"
|
||||
|
||||
-- Iteration 16 --
|
||||
string(0) ""
|
||||
|
||||
-- Iteration 17 --
|
||||
string(0) ""
|
||||
|
||||
-- Iteration 18 --
|
||||
string(0) ""
|
||||
|
||||
-- Iteration 19 --
|
||||
string(7) "Nothing"
|
||||
|
||||
-- Iteration 20 --
|
||||
string(7) "Nothing"
|
||||
|
||||
-- Iteration 21 --
|
||||
string(12) "Hello World!"
|
||||
|
||||
-- Iteration 22 --
|
||||
string(12) "Hello World!"
|
||||
|
||||
-- Iteration 23 --
|
||||
string(0) ""
|
||||
|
||||
-- Iteration 24 --
|
||||
HipHop Warning: %a
|
||||
NULL
|
||||
Done
|
||||
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
ob_start();
|
||||
|
||||
/*
|
||||
* Prototype : string session_id([string $id])
|
||||
* Description : Get and/or set the current session id
|
||||
* Source code : ext/session/session.c
|
||||
*/
|
||||
|
||||
echo "*** Testing session_id() : error functionality ***\n";
|
||||
|
||||
var_dump(session_id());
|
||||
var_dump(session_start());
|
||||
var_dump(session_id("test"));
|
||||
var_dump(session_id());
|
||||
var_dump(session_id("1234567890"));
|
||||
var_dump(session_id());
|
||||
var_dump(session_destroy());
|
||||
var_dump(session_id());
|
||||
|
||||
echo "Done";
|
||||
ob_end_flush();
|
||||
?>
|
||||
@@ -0,0 +1,10 @@
|
||||
*** Testing session_id() : error functionality ***
|
||||
string(0) ""
|
||||
bool(true)
|
||||
string(%d) "%s"
|
||||
string(4) "test"
|
||||
string(4) "test"
|
||||
string(10) "1234567890"
|
||||
bool(true)
|
||||
string(0) ""
|
||||
Done
|
||||
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
|
||||
ob_start();
|
||||
|
||||
/*
|
||||
* Prototype : string session_id([string $id])
|
||||
* Description : Get and/or set the current session id
|
||||
* Source code : ext/session/session.c
|
||||
*/
|
||||
|
||||
echo "*** Testing session_id() : error functionality ***\n";
|
||||
|
||||
@session_start();
|
||||
var_dump(session_id());
|
||||
var_dump(session_id("!"));
|
||||
var_dump(session_id());
|
||||
@session_destroy();
|
||||
|
||||
@session_start();
|
||||
var_dump(session_id());
|
||||
var_dump(session_id("?><"));
|
||||
var_dump(session_id());
|
||||
@session_destroy();
|
||||
|
||||
@session_start();
|
||||
var_dump(session_id());
|
||||
var_dump(session_id("£$%^&*()"));
|
||||
var_dump(session_id());
|
||||
@session_destroy();
|
||||
|
||||
@session_start();
|
||||
var_dump(session_id());
|
||||
var_dump(session_id("\r\n"));
|
||||
var_dump(session_id());
|
||||
@session_destroy();
|
||||
|
||||
@session_start();
|
||||
var_dump(session_id());
|
||||
var_dump(session_id("\0"));
|
||||
var_dump(session_id());
|
||||
@session_destroy();
|
||||
|
||||
@session_start();
|
||||
var_dump(session_id());
|
||||
var_dump(session_id("¬``@~:{>?><,./[]+--"));
|
||||
var_dump(session_id());
|
||||
@session_destroy();
|
||||
|
||||
echo "Done";
|
||||
ob_end_flush();
|
||||
?>
|
||||
@@ -0,0 +1,21 @@
|
||||
*** Testing session_id() : error functionality ***
|
||||
string(%d) "%s"
|
||||
string(%d) "%s"
|
||||
string(1) "!"
|
||||
string(%d) "%s"
|
||||
string(%d) "%s"
|
||||
string(3) "?><"
|
||||
string(%d) "%s"
|
||||
string(%d) "%s"
|
||||
string(8) "£$%^&*()"
|
||||
string(%d) "%s"
|
||||
string(%d) "%s"
|
||||
string(2) "
|
||||
"
|
||||
string(%d) "%s"
|
||||
string(%d) "%s"
|
||||
string(0) ""
|
||||
string(%d) "%s"
|
||||
string(%d) "%s"
|
||||
string(19) "¬``@~:{>?><,./[]+--"
|
||||
Done
|
||||
@@ -0,0 +1,88 @@
|
||||
<?php
|
||||
|
||||
ob_start();
|
||||
|
||||
/*
|
||||
* Prototype : string session_module_name([string $module])
|
||||
* Description : Get and/or set the current session module
|
||||
* Source code : ext/session/session.c
|
||||
*/
|
||||
|
||||
echo "*** Testing session_module_name() : error functionality ***\n";
|
||||
|
||||
// Get an unset variable
|
||||
$unset_var = 10;
|
||||
unset($unset_var);
|
||||
|
||||
class classA
|
||||
{
|
||||
public function __toString() {
|
||||
return "Hello World!";
|
||||
}
|
||||
}
|
||||
|
||||
$heredoc = <<<EOT
|
||||
Hello World!
|
||||
EOT;
|
||||
|
||||
$fp = fopen(__FILE__, "r");
|
||||
|
||||
// Unexpected values to be passed as arguments
|
||||
$inputs = array(
|
||||
|
||||
// Integer data
|
||||
/*1*/ 0,
|
||||
1,
|
||||
12345,
|
||||
-2345,
|
||||
|
||||
// Float data
|
||||
/*5*/ 10.5,
|
||||
-10.5,
|
||||
12.3456789000e10,
|
||||
12.3456789000E-10,
|
||||
.5,
|
||||
|
||||
// Null data
|
||||
/*10*/ NULL,
|
||||
null,
|
||||
|
||||
// Boolean data
|
||||
/*12*/ true,
|
||||
false,
|
||||
TRUE,
|
||||
FALSE,
|
||||
|
||||
// Empty strings
|
||||
/*16*/ "",
|
||||
'',
|
||||
|
||||
// Invalid string data
|
||||
/*18*/ "Nothing",
|
||||
'Nothing',
|
||||
$heredoc,
|
||||
|
||||
// Object data
|
||||
/*21*/ new classA(),
|
||||
|
||||
// Undefined data
|
||||
/*22*/ @$undefined_var,
|
||||
|
||||
// Unset data
|
||||
/*23*/ @$unset_var,
|
||||
|
||||
// Resource variable
|
||||
/*24*/ $fp
|
||||
);
|
||||
|
||||
$iterator = 1;
|
||||
foreach($inputs as $input) {
|
||||
echo "\n-- Iteration $iterator --\n";
|
||||
var_dump(session_module_name($input));
|
||||
$iterator++;
|
||||
};
|
||||
|
||||
fclose($fp);
|
||||
echo "Done";
|
||||
ob_end_flush();
|
||||
?>
|
||||
@@ -0,0 +1,98 @@
|
||||
*** Testing session_module_name() : error functionality ***
|
||||
|
||||
-- Iteration 1 --
|
||||
HipHop Warning: %a
|
||||
bool(false)
|
||||
|
||||
-- Iteration 2 --
|
||||
HipHop Warning: %a
|
||||
bool(false)
|
||||
|
||||
-- Iteration 3 --
|
||||
HipHop Warning: %a
|
||||
bool(false)
|
||||
|
||||
-- Iteration 4 --
|
||||
HipHop Warning: %a
|
||||
bool(false)
|
||||
|
||||
-- Iteration 5 --
|
||||
HipHop Warning: %a
|
||||
bool(false)
|
||||
|
||||
-- Iteration 6 --
|
||||
HipHop Warning: %a
|
||||
bool(false)
|
||||
|
||||
-- Iteration 7 --
|
||||
HipHop Warning: %a
|
||||
bool(false)
|
||||
|
||||
-- Iteration 8 --
|
||||
HipHop Warning: %a
|
||||
bool(false)
|
||||
|
||||
-- Iteration 9 --
|
||||
HipHop Warning: %a
|
||||
bool(false)
|
||||
|
||||
-- Iteration 10 --
|
||||
HipHop Warning: %a
|
||||
bool(false)
|
||||
|
||||
-- Iteration 11 --
|
||||
HipHop Warning: %a
|
||||
bool(false)
|
||||
|
||||
-- Iteration 12 --
|
||||
HipHop Warning: %a
|
||||
bool(false)
|
||||
|
||||
-- Iteration 13 --
|
||||
HipHop Warning: %a
|
||||
bool(false)
|
||||
|
||||
-- Iteration 14 --
|
||||
HipHop Warning: %a
|
||||
bool(false)
|
||||
|
||||
-- Iteration 15 --
|
||||
HipHop Warning: %a
|
||||
bool(false)
|
||||
|
||||
-- Iteration 16 --
|
||||
HipHop Warning: %a
|
||||
bool(false)
|
||||
|
||||
-- Iteration 17 --
|
||||
HipHop Warning: %a
|
||||
bool(false)
|
||||
|
||||
-- Iteration 18 --
|
||||
HipHop Warning: %a
|
||||
bool(false)
|
||||
|
||||
-- Iteration 19 --
|
||||
HipHop Warning: %a
|
||||
bool(false)
|
||||
|
||||
-- Iteration 20 --
|
||||
HipHop Warning: %a
|
||||
bool(false)
|
||||
|
||||
-- Iteration 21 --
|
||||
HipHop Warning: %a
|
||||
bool(false)
|
||||
|
||||
-- Iteration 22 --
|
||||
HipHop Warning: %a
|
||||
bool(false)
|
||||
|
||||
-- Iteration 23 --
|
||||
HipHop Warning: %a
|
||||
bool(false)
|
||||
|
||||
-- Iteration 24 --
|
||||
HipHop Warning: %a
|
||||
NULL
|
||||
Done
|
||||
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
ob_start();
|
||||
|
||||
/*
|
||||
* Prototype : string session_module_name([string $module])
|
||||
* Description : Get and/or set the current session module
|
||||
* Source code : ext/session/session.c
|
||||
*/
|
||||
|
||||
echo "*** Testing session_module_name() : variation ***\n";
|
||||
var_dump(session_module_name("blah"));
|
||||
var_dump(session_start());
|
||||
var_dump(session_module_name());
|
||||
var_dump(session_destroy());
|
||||
var_dump(session_module_name());
|
||||
|
||||
echo "Done";
|
||||
ob_end_flush();
|
||||
?>
|
||||
@@ -0,0 +1,8 @@
|
||||
*** Testing session_module_name() : variation ***
|
||||
HipHop Warning: %a
|
||||
bool(false)
|
||||
bool(true)
|
||||
string(%d) "%s"
|
||||
bool(true)
|
||||
string(%d) "%s"
|
||||
Done
|
||||
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
ob_start();
|
||||
|
||||
/*
|
||||
* Prototype : bool session_regenerate_id([bool $delete_old_session])
|
||||
* Description : Update the current session id with a newly generated one
|
||||
* Source code : ext/session/session.c
|
||||
*/
|
||||
|
||||
echo "*** Testing session_regenerate_id() : basic functionality ***\n";
|
||||
|
||||
var_dump(session_id());
|
||||
var_dump(session_regenerate_id());
|
||||
var_dump(session_id());
|
||||
var_dump(session_start());
|
||||
var_dump(session_regenerate_id());
|
||||
var_dump(session_id());
|
||||
var_dump(session_destroy());
|
||||
var_dump(session_regenerate_id());
|
||||
var_dump(session_id());
|
||||
|
||||
echo "Done";
|
||||
ob_end_flush();
|
||||
?>
|
||||
@@ -0,0 +1,11 @@
|
||||
*** Testing session_regenerate_id() : basic functionality ***
|
||||
string(0) ""
|
||||
bool(false)
|
||||
string(0) ""
|
||||
bool(true)
|
||||
bool(true)
|
||||
string(%d) "%s"
|
||||
bool(true)
|
||||
bool(false)
|
||||
string(0) ""
|
||||
Done
|
||||
@@ -0,0 +1,89 @@
|
||||
<?php
|
||||
|
||||
ob_start();
|
||||
|
||||
/*
|
||||
* Prototype : bool session_regenerate_id([bool $delete_old_session])
|
||||
* Description : Update the current session id with a newly generated one
|
||||
* Source code : ext/session/session.c
|
||||
*/
|
||||
|
||||
echo "*** Testing session_regenerate_id() : error functionality ***\n";
|
||||
|
||||
// Get an unset variable
|
||||
$unset_var = 10;
|
||||
unset($unset_var);
|
||||
|
||||
class classA
|
||||
{
|
||||
public function __toString() {
|
||||
return "Hello World!";
|
||||
}
|
||||
}
|
||||
|
||||
$heredoc = <<<EOT
|
||||
Hello World!
|
||||
EOT;
|
||||
|
||||
$fp = fopen(__FILE__, "r");
|
||||
|
||||
// Unexpected values to be passed as arguments
|
||||
$inputs = array(
|
||||
|
||||
// Integer data
|
||||
/*1*/ 0,
|
||||
1,
|
||||
12345,
|
||||
-2345,
|
||||
|
||||
// Float data
|
||||
/*5*/ 10.5,
|
||||
-10.5,
|
||||
12.3456789000e10,
|
||||
12.3456789000E-10,
|
||||
.5,
|
||||
|
||||
// Null data
|
||||
/*10*/ NULL,
|
||||
null,
|
||||
|
||||
// Boolean data
|
||||
/*12*/ true,
|
||||
false,
|
||||
TRUE,
|
||||
FALSE,
|
||||
|
||||
// Empty strings
|
||||
/*16*/ "",
|
||||
'',
|
||||
|
||||
// Invalid string data
|
||||
/*18*/ "Nothing",
|
||||
'Nothing',
|
||||
$heredoc,
|
||||
|
||||
// Object data
|
||||
/*21*/ new classA(),
|
||||
|
||||
// Undefined data
|
||||
/*22*/ @$undefined_var,
|
||||
|
||||
// Unset data
|
||||
/*23*/ @$unset_var,
|
||||
|
||||
// Resource variable
|
||||
/*24*/ $fp
|
||||
);
|
||||
|
||||
|
||||
$iterator = 1;
|
||||
foreach($inputs as $input) {
|
||||
echo "\n-- Iteration $iterator --\n";
|
||||
var_dump(session_regenerate_id($input));
|
||||
$iterator++;
|
||||
};
|
||||
|
||||
fclose($fp);
|
||||
echo "Done";
|
||||
ob_end_flush();
|
||||
?>
|
||||
@@ -0,0 +1,76 @@
|
||||
*** Testing session_regenerate_id() : error functionality ***
|
||||
|
||||
-- Iteration 1 --
|
||||
bool(false)
|
||||
|
||||
-- Iteration 2 --
|
||||
bool(false)
|
||||
|
||||
-- Iteration 3 --
|
||||
bool(false)
|
||||
|
||||
-- Iteration 4 --
|
||||
bool(false)
|
||||
|
||||
-- Iteration 5 --
|
||||
bool(false)
|
||||
|
||||
-- Iteration 6 --
|
||||
bool(false)
|
||||
|
||||
-- Iteration 7 --
|
||||
bool(false)
|
||||
|
||||
-- Iteration 8 --
|
||||
bool(false)
|
||||
|
||||
-- Iteration 9 --
|
||||
bool(false)
|
||||
|
||||
-- Iteration 10 --
|
||||
bool(false)
|
||||
|
||||
-- Iteration 11 --
|
||||
bool(false)
|
||||
|
||||
-- Iteration 12 --
|
||||
bool(false)
|
||||
|
||||
-- Iteration 13 --
|
||||
bool(false)
|
||||
|
||||
-- Iteration 14 --
|
||||
bool(false)
|
||||
|
||||
-- Iteration 15 --
|
||||
bool(false)
|
||||
|
||||
-- Iteration 16 --
|
||||
bool(false)
|
||||
|
||||
-- Iteration 17 --
|
||||
bool(false)
|
||||
|
||||
-- Iteration 18 --
|
||||
bool(false)
|
||||
|
||||
-- Iteration 19 --
|
||||
bool(false)
|
||||
|
||||
-- Iteration 20 --
|
||||
bool(false)
|
||||
|
||||
-- Iteration 21 --
|
||||
HipHop Warning: %a
|
||||
NULL
|
||||
|
||||
-- Iteration 22 --
|
||||
bool(false)
|
||||
|
||||
-- Iteration 23 --
|
||||
bool(false)
|
||||
|
||||
-- Iteration 24 --
|
||||
HipHop Warning: %a
|
||||
NULL
|
||||
Done
|
||||
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
ob_start();
|
||||
|
||||
/*
|
||||
* Prototype : bool session_regenerate_id([bool $delete_old_session])
|
||||
* Description : Update the current session id with a newly generated one
|
||||
* Source code : ext/session/session.c
|
||||
*/
|
||||
|
||||
echo "*** Testing session_regenerate_id() : variation ***\n";
|
||||
|
||||
var_dump(session_id());
|
||||
var_dump(session_regenerate_id(TRUE));
|
||||
var_dump(session_id());
|
||||
var_dump(session_start());
|
||||
var_dump(session_regenerate_id(TRUE));
|
||||
var_dump(session_id());
|
||||
var_dump(session_destroy());
|
||||
var_dump(session_regenerate_id(TRUE));
|
||||
var_dump(session_id());
|
||||
|
||||
echo "Done";
|
||||
ob_end_flush();
|
||||
?>
|
||||
@@ -0,0 +1,11 @@
|
||||
*** Testing session_regenerate_id() : variation ***
|
||||
string(0) ""
|
||||
bool(false)
|
||||
string(0) ""
|
||||
bool(true)
|
||||
bool(true)
|
||||
string(%d) "%s"
|
||||
bool(true)
|
||||
bool(false)
|
||||
string(0) ""
|
||||
Done
|
||||
@@ -0,0 +1,93 @@
|
||||
<?php
|
||||
|
||||
ob_start();
|
||||
|
||||
/*
|
||||
* Prototype : void session_set_cookie_params(int $lifetime [, string $path [, string $domain [, bool $secure [, bool $httponly]]]])
|
||||
* Description : Set the session cookie parameters
|
||||
* Source code : ext/session/session.c
|
||||
*/
|
||||
|
||||
echo "*** Testing session_set_cookie_params() : error functionality ***\n";
|
||||
|
||||
// Get an unset variable
|
||||
$unset_var = 10;
|
||||
unset($unset_var);
|
||||
|
||||
class classA
|
||||
{
|
||||
public function __toString() {
|
||||
return "Hello World!";
|
||||
}
|
||||
}
|
||||
|
||||
$heredoc = <<<EOT
|
||||
Hello World!
|
||||
EOT;
|
||||
|
||||
$fp = fopen(__FILE__, "r");
|
||||
|
||||
// Unexpected values to be passed as arguments
|
||||
$inputs = array(
|
||||
|
||||
// Integer data
|
||||
/*1*/ 0,
|
||||
1,
|
||||
12345,
|
||||
-2345,
|
||||
|
||||
// Float data
|
||||
/*5*/ 10.5,
|
||||
-10.5,
|
||||
12.3456789000e10,
|
||||
12.3456789000E-10,
|
||||
.5,
|
||||
|
||||
// Null data
|
||||
/*10*/ NULL,
|
||||
null,
|
||||
|
||||
// Boolean data
|
||||
/*12*/ true,
|
||||
false,
|
||||
TRUE,
|
||||
FALSE,
|
||||
|
||||
// Empty strings
|
||||
/*16*/ "",
|
||||
'',
|
||||
|
||||
// Invalid string data
|
||||
/*18*/ "Nothing",
|
||||
'Nothing',
|
||||
$heredoc,
|
||||
|
||||
// Object data
|
||||
/*21*/ new classA(),
|
||||
|
||||
// Undefined data
|
||||
/*22*/ @$undefined_var,
|
||||
|
||||
// Unset data
|
||||
/*23*/ @$unset_var,
|
||||
|
||||
// Resource variable
|
||||
/*24*/ $fp
|
||||
);
|
||||
|
||||
$iterator = 1;
|
||||
foreach($inputs as $input) {
|
||||
echo "\n-- Iteration $iterator --\n";
|
||||
var_dump(session_set_cookie_params($input));
|
||||
var_dump(session_set_cookie_params(1234567890, $input));
|
||||
var_dump(session_set_cookie_params(1234567890, "blah", $input));
|
||||
var_dump(session_set_cookie_params(1234567890, "blah", "foo", $input));
|
||||
var_dump(session_set_cookie_params(1234567890, "blah", "foo", TRUE, $input));
|
||||
var_dump(session_set_cookie_params(1234567890, "blah", "foo", TRUE, FALSE));
|
||||
$iterator++;
|
||||
};
|
||||
|
||||
fclose($fp);
|
||||
echo "Done";
|
||||
ob_end_flush();
|
||||
?>
|
||||
@@ -0,0 +1,200 @@
|
||||
*** Testing session_set_cookie_params() : error functionality ***
|
||||
|
||||
-- Iteration 1 --
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
|
||||
-- Iteration 2 --
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
|
||||
-- Iteration 3 --
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
|
||||
-- Iteration 4 --
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
|
||||
-- Iteration 5 --
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
|
||||
-- Iteration 6 --
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
|
||||
-- Iteration 7 --
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
|
||||
-- Iteration 8 --
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
|
||||
-- Iteration 9 --
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
|
||||
-- Iteration 10 --
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
|
||||
-- Iteration 11 --
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
|
||||
-- Iteration 12 --
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
|
||||
-- Iteration 13 --
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
|
||||
-- Iteration 14 --
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
|
||||
-- Iteration 15 --
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
|
||||
-- Iteration 16 --
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
|
||||
-- Iteration 17 --
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
|
||||
-- Iteration 18 --
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
|
||||
-- Iteration 19 --
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
|
||||
-- Iteration 20 --
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
|
||||
-- Iteration 21 --
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
HipHop Warning: %a
|
||||
NULL
|
||||
HipHop Warning: %a
|
||||
NULL
|
||||
NULL
|
||||
|
||||
-- Iteration 22 --
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
|
||||
-- Iteration 23 --
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
|
||||
-- Iteration 24 --
|
||||
NULL
|
||||
HipHop Warning: %a
|
||||
NULL
|
||||
HipHop Warning: %a
|
||||
NULL
|
||||
HipHop Warning: %a
|
||||
NULL
|
||||
HipHop Warning: %a
|
||||
NULL
|
||||
NULL
|
||||
Done
|
||||
@@ -0,0 +1,89 @@
|
||||
<?php
|
||||
|
||||
ob_start();
|
||||
|
||||
/*
|
||||
* Prototype : bool session_set_save_handler(callback $open, callback $close, callback $read, callback $write, callback $destroy, callback $gc)
|
||||
* Description : Sets user-level session storage functions
|
||||
* Source code : ext/session/session.c
|
||||
*/
|
||||
|
||||
echo "*** Testing session_set_save_handler() : error functionality ***\n";
|
||||
|
||||
// Get an unset variable
|
||||
$unset_var = 10;
|
||||
unset($unset_var);
|
||||
|
||||
class classA
|
||||
{
|
||||
public function __toString() {
|
||||
return "Hello World!";
|
||||
}
|
||||
}
|
||||
|
||||
$heredoc = <<<EOT
|
||||
Hello World!
|
||||
EOT;
|
||||
|
||||
$fp = fopen(__FILE__, "r");
|
||||
|
||||
// Unexpected values to be passed as arguments
|
||||
$inputs = array(
|
||||
|
||||
// Integer data
|
||||
/*1*/ 0,
|
||||
1,
|
||||
12345,
|
||||
-2345,
|
||||
|
||||
// Float data
|
||||
/*5*/ 10.5,
|
||||
-10.5,
|
||||
12.3456789000e10,
|
||||
12.3456789000E-10,
|
||||
.5,
|
||||
|
||||
// Null data
|
||||
/*10*/ NULL,
|
||||
null,
|
||||
|
||||
// Boolean data
|
||||
/*12*/ true,
|
||||
false,
|
||||
TRUE,
|
||||
FALSE,
|
||||
|
||||
// Empty strings
|
||||
/*16*/ "",
|
||||
'',
|
||||
|
||||
// Invalid string data
|
||||
/*18*/ "Nothing",
|
||||
'Nothing',
|
||||
$heredoc,
|
||||
|
||||
// Object data
|
||||
/*21*/ new classA(),
|
||||
|
||||
// Undefined data
|
||||
/*22*/ @$undefined_var,
|
||||
|
||||
// Unset data
|
||||
/*23*/ @$unset_var,
|
||||
|
||||
// Resource variable
|
||||
/*24*/ $fp
|
||||
);
|
||||
|
||||
|
||||
$iterator = 1;
|
||||
foreach($inputs as $input) {
|
||||
echo "\n-- Iteration $iterator --\n";
|
||||
var_dump(session_set_save_handler($input, NULL, NULL, NULL, NULL, NULL));
|
||||
$iterator++;
|
||||
};
|
||||
|
||||
fclose($fp);
|
||||
echo "Done";
|
||||
ob_end_flush();
|
||||
?>
|
||||
@@ -0,0 +1,98 @@
|
||||
*** Testing session_set_save_handler() : error functionality ***
|
||||
|
||||
-- Iteration 1 --
|
||||
HipHop Warning: %a
|
||||
bool(false)
|
||||
|
||||
-- Iteration 2 --
|
||||
HipHop Warning: %a
|
||||
bool(false)
|
||||
|
||||
-- Iteration 3 --
|
||||
HipHop Warning: %a
|
||||
bool(false)
|
||||
|
||||
-- Iteration 4 --
|
||||
HipHop Warning: %a
|
||||
bool(false)
|
||||
|
||||
-- Iteration 5 --
|
||||
HipHop Warning: %a
|
||||
bool(false)
|
||||
|
||||
-- Iteration 6 --
|
||||
HipHop Warning: %a
|
||||
bool(false)
|
||||
|
||||
-- Iteration 7 --
|
||||
HipHop Warning: %a
|
||||
bool(false)
|
||||
|
||||
-- Iteration 8 --
|
||||
HipHop Warning: %a
|
||||
bool(false)
|
||||
|
||||
-- Iteration 9 --
|
||||
HipHop Warning: %a
|
||||
bool(false)
|
||||
|
||||
-- Iteration 10 --
|
||||
HipHop Warning: %a
|
||||
bool(false)
|
||||
|
||||
-- Iteration 11 --
|
||||
HipHop Warning: %a
|
||||
bool(false)
|
||||
|
||||
-- Iteration 12 --
|
||||
HipHop Warning: %a
|
||||
bool(false)
|
||||
|
||||
-- Iteration 13 --
|
||||
HipHop Warning: %a
|
||||
bool(false)
|
||||
|
||||
-- Iteration 14 --
|
||||
HipHop Warning: %a
|
||||
bool(false)
|
||||
|
||||
-- Iteration 15 --
|
||||
HipHop Warning: %a
|
||||
bool(false)
|
||||
|
||||
-- Iteration 16 --
|
||||
HipHop Warning: %a
|
||||
bool(false)
|
||||
|
||||
-- Iteration 17 --
|
||||
HipHop Warning: %a
|
||||
bool(false)
|
||||
|
||||
-- Iteration 18 --
|
||||
HipHop Warning: %a
|
||||
bool(false)
|
||||
|
||||
-- Iteration 19 --
|
||||
HipHop Warning: %a
|
||||
bool(false)
|
||||
|
||||
-- Iteration 20 --
|
||||
HipHop Warning: %a
|
||||
bool(false)
|
||||
|
||||
-- Iteration 21 --
|
||||
HipHop Warning: %a
|
||||
bool(false)
|
||||
|
||||
-- Iteration 22 --
|
||||
HipHop Warning: %a
|
||||
bool(false)
|
||||
|
||||
-- Iteration 23 --
|
||||
HipHop Warning: %a
|
||||
bool(false)
|
||||
|
||||
-- Iteration 24 --
|
||||
HipHop Warning: %a
|
||||
bool(false)
|
||||
Done
|
||||
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
ob_start();
|
||||
|
||||
/*
|
||||
* Prototype : bool session_set_save_handler(callback $open, callback $close, callback $read, callback $write, callback $destroy, callback $gc)
|
||||
* Description : Sets user-level session storage functions
|
||||
* Source code : ext/session/session.c
|
||||
*/
|
||||
|
||||
echo "*** Testing session_set_save_handler() : error functionality ***\n";
|
||||
|
||||
function open($save_path, $session_name) { return true; }
|
||||
function close() { return true; }
|
||||
function read($id) { return false; }
|
||||
function write($id, $session_data) { }
|
||||
function destroy($id) { return true; }
|
||||
function gc($maxlifetime) { return true; }
|
||||
|
||||
session_set_save_handler("open", "close", "read", "write", "destroy", "gc");
|
||||
|
||||
session_start();
|
||||
$_SESSION["Blah"] = "Hello World!";
|
||||
$_SESSION["Foo"] = FALSE;
|
||||
$_SESSION["Guff"] = 1234567890;
|
||||
var_dump($_SESSION);
|
||||
|
||||
session_write_close();
|
||||
var_dump($_SESSION);
|
||||
session_set_save_handler("open", "close", "read", "write", "destroy", "gc");
|
||||
session_start();
|
||||
var_dump($_SESSION);
|
||||
session_destroy();
|
||||
|
||||
ob_end_flush();
|
||||
?>
|
||||
@@ -0,0 +1,19 @@
|
||||
*** Testing session_set_save_handler() : error functionality ***
|
||||
array(3) {
|
||||
["Blah"]=>
|
||||
string(12) "Hello World!"
|
||||
["Foo"]=>
|
||||
bool(false)
|
||||
["Guff"]=>
|
||||
int(1234567890)
|
||||
}
|
||||
array(3) {
|
||||
["Blah"]=>
|
||||
string(12) "Hello World!"
|
||||
["Foo"]=>
|
||||
bool(false)
|
||||
["Guff"]=>
|
||||
int(1234567890)
|
||||
}
|
||||
array(0) {
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
ob_start();
|
||||
|
||||
/*
|
||||
* Prototype : bool session_set_save_handler(callback $open, callback $close, callback $read, callback $write, callback $destroy, callback $gc)
|
||||
* Description : Sets user-level session storage functions
|
||||
* Source code : ext/session/session.c
|
||||
*/
|
||||
|
||||
echo "*** Testing session_set_save_handler() : error functionality ***\n";
|
||||
|
||||
function callback() { }
|
||||
|
||||
session_set_save_handler("callback", "callback", "callback", "callback", "callback", "callback");
|
||||
session_set_save_handler("callback", "echo", "callback", "callback", "callback", "callback");
|
||||
session_set_save_handler("callback", "callback", "echo", "callback", "callback", "callback");
|
||||
session_set_save_handler("callback", "callback", "callback", "echo", "callback", "callback");
|
||||
session_set_save_handler("callback", "callback", "callback", "callback", "echo", "callback");
|
||||
session_set_save_handler("callback", "callback", "callback", "callback", "callback", "echo");
|
||||
session_set_save_handler("callback", "callback", "callback", "callback", "callback", "callback");
|
||||
session_start();
|
||||
ob_end_flush();
|
||||
?>
|
||||
@@ -0,0 +1,6 @@
|
||||
*** Testing session_set_save_handler() : error functionality ***
|
||||
HipHop Warning: %a
|
||||
HipHop Warning: %a
|
||||
HipHop Warning: %a
|
||||
HipHop Warning: %a
|
||||
HipHop Warning: %a
|
||||
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
ob_start();
|
||||
|
||||
/*
|
||||
* Prototype : bool session_set_save_handler(callback $open, callback $close, callback $read, callback $write, callback $destroy, callback $gc)
|
||||
* Description : Sets user-level session storage functions
|
||||
* Source code : ext/session/session.c
|
||||
*/
|
||||
|
||||
echo "*** Testing session_set_save_handler() : variation ***\n";
|
||||
|
||||
var_dump(session_module_name());
|
||||
var_dump(session_module_name(FALSE));
|
||||
var_dump(session_module_name());
|
||||
var_dump(session_module_name("blah"));
|
||||
var_dump(session_module_name());
|
||||
var_dump(session_module_name("files"));
|
||||
var_dump(session_module_name());
|
||||
|
||||
ob_end_flush();
|
||||
?>
|
||||
@@ -0,0 +1,10 @@
|
||||
*** Testing session_set_save_handler() : variation ***
|
||||
string(%d) "%s"
|
||||
HipHop Warning: %a
|
||||
bool(false)
|
||||
string(%d) "%s"
|
||||
HipHop Warning: %a
|
||||
bool(false)
|
||||
string(%d) "%s"
|
||||
string(%d) "%s"
|
||||
string(5) "files"
|
||||
@@ -0,0 +1,90 @@
|
||||
<?php
|
||||
|
||||
ob_start();
|
||||
|
||||
/*
|
||||
* Prototype : bool session_start(void)
|
||||
* Description : Initialize session data
|
||||
* Source code : ext/session/session.c
|
||||
*/
|
||||
|
||||
echo "*** Testing session_start() : error functionality ***\n";
|
||||
|
||||
// Get an unset variable
|
||||
$unset_var = 10;
|
||||
unset($unset_var);
|
||||
|
||||
class classA
|
||||
{
|
||||
public function __toString() {
|
||||
return "Hello World!";
|
||||
}
|
||||
}
|
||||
|
||||
$heredoc = <<<EOT
|
||||
Hello World!
|
||||
EOT;
|
||||
|
||||
$fp = fopen(__FILE__, "r");
|
||||
|
||||
// Unexpected values to be passed as arguments
|
||||
$inputs = array(
|
||||
|
||||
// Integer data
|
||||
/*1*/ 0,
|
||||
1,
|
||||
12345,
|
||||
-2345,
|
||||
|
||||
// Float data
|
||||
/*5*/ 10.5,
|
||||
-10.5,
|
||||
12.3456789000e10,
|
||||
12.3456789000E-10,
|
||||
.5,
|
||||
|
||||
// Null data
|
||||
/*10*/ NULL,
|
||||
null,
|
||||
|
||||
// Boolean data
|
||||
/*12*/ true,
|
||||
false,
|
||||
TRUE,
|
||||
FALSE,
|
||||
|
||||
// Empty strings
|
||||
/*16*/ "",
|
||||
'',
|
||||
|
||||
// Invalid string data
|
||||
/*18*/ "Nothing",
|
||||
'Nothing',
|
||||
$heredoc,
|
||||
|
||||
// Object data
|
||||
/*21*/ new classA(),
|
||||
|
||||
// Undefined data
|
||||
/*22*/ @$undefined_var,
|
||||
|
||||
// Unset data
|
||||
/*23*/ @$unset_var,
|
||||
|
||||
// Resource variable
|
||||
/*24*/ $fp
|
||||
);
|
||||
|
||||
|
||||
$iterator = 1;
|
||||
foreach($inputs as $input) {
|
||||
echo "\n-- Iteration $iterator --\n";
|
||||
var_dump(session_start($input));
|
||||
var_dump(session_destroy());
|
||||
$iterator++;
|
||||
};
|
||||
|
||||
fclose($fp);
|
||||
echo "Done";
|
||||
ob_end_flush();
|
||||
?>
|
||||
@@ -0,0 +1,98 @@
|
||||
*** Testing session_start() : error functionality ***
|
||||
|
||||
-- Iteration 1 --
|
||||
bool(true)
|
||||
bool(true)
|
||||
|
||||
-- Iteration 2 --
|
||||
bool(true)
|
||||
bool(true)
|
||||
|
||||
-- Iteration 3 --
|
||||
bool(true)
|
||||
bool(true)
|
||||
|
||||
-- Iteration 4 --
|
||||
bool(true)
|
||||
bool(true)
|
||||
|
||||
-- Iteration 5 --
|
||||
bool(true)
|
||||
bool(true)
|
||||
|
||||
-- Iteration 6 --
|
||||
bool(true)
|
||||
bool(true)
|
||||
|
||||
-- Iteration 7 --
|
||||
bool(true)
|
||||
bool(true)
|
||||
|
||||
-- Iteration 8 --
|
||||
bool(true)
|
||||
bool(true)
|
||||
|
||||
-- Iteration 9 --
|
||||
bool(true)
|
||||
bool(true)
|
||||
|
||||
-- Iteration 10 --
|
||||
bool(true)
|
||||
bool(true)
|
||||
|
||||
-- Iteration 11 --
|
||||
bool(true)
|
||||
bool(true)
|
||||
|
||||
-- Iteration 12 --
|
||||
bool(true)
|
||||
bool(true)
|
||||
|
||||
-- Iteration 13 --
|
||||
bool(true)
|
||||
bool(true)
|
||||
|
||||
-- Iteration 14 --
|
||||
bool(true)
|
||||
bool(true)
|
||||
|
||||
-- Iteration 15 --
|
||||
bool(true)
|
||||
bool(true)
|
||||
|
||||
-- Iteration 16 --
|
||||
bool(true)
|
||||
bool(true)
|
||||
|
||||
-- Iteration 17 --
|
||||
bool(true)
|
||||
bool(true)
|
||||
|
||||
-- Iteration 18 --
|
||||
bool(true)
|
||||
bool(true)
|
||||
|
||||
-- Iteration 19 --
|
||||
bool(true)
|
||||
bool(true)
|
||||
|
||||
-- Iteration 20 --
|
||||
bool(true)
|
||||
bool(true)
|
||||
|
||||
-- Iteration 21 --
|
||||
bool(true)
|
||||
bool(true)
|
||||
|
||||
-- Iteration 22 --
|
||||
bool(true)
|
||||
bool(true)
|
||||
|
||||
-- Iteration 23 --
|
||||
bool(true)
|
||||
bool(true)
|
||||
|
||||
-- Iteration 24 --
|
||||
bool(true)
|
||||
bool(true)
|
||||
Done
|
||||
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
ob_start();
|
||||
|
||||
/*
|
||||
* Prototype : bool session_start(void)
|
||||
* Description : Initialize session data
|
||||
* Source code : ext/session/session.c
|
||||
*/
|
||||
|
||||
echo "*** Testing session_start() : variation ***\n";
|
||||
|
||||
var_dump(session_start());
|
||||
var_dump(session_start());
|
||||
var_dump(session_start());
|
||||
var_dump(session_start());
|
||||
var_dump(session_start());
|
||||
|
||||
session_destroy();
|
||||
echo "Done";
|
||||
ob_end_flush();
|
||||
?>
|
||||
@@ -0,0 +1,11 @@
|
||||
*** Testing session_start() : variation ***
|
||||
bool(true)
|
||||
HipHop Notice: %a
|
||||
bool(true)
|
||||
HipHop Notice: %a
|
||||
bool(true)
|
||||
HipHop Notice: %a
|
||||
bool(true)
|
||||
HipHop Notice: %a
|
||||
bool(true)
|
||||
Done
|
||||
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
ob_start();
|
||||
|
||||
/*
|
||||
* Prototype : bool session_start(void)
|
||||
* Description : Initialize session data
|
||||
* Source code : ext/session/session.c
|
||||
*/
|
||||
|
||||
echo "*** Testing session_start() : variation ***\n";
|
||||
|
||||
var_dump(session_start());
|
||||
var_dump(session_write_close());
|
||||
var_dump(session_start());
|
||||
var_dump(session_write_close());
|
||||
var_dump(session_start());
|
||||
var_dump(session_write_close());
|
||||
var_dump(session_start());
|
||||
var_dump(session_write_close());
|
||||
var_dump(session_start());
|
||||
var_dump(session_write_close());
|
||||
var_dump(session_destroy());
|
||||
|
||||
echo "Done";
|
||||
ob_end_flush();
|
||||
?>
|
||||
@@ -0,0 +1,14 @@
|
||||
*** Testing session_start() : variation ***
|
||||
bool(true)
|
||||
NULL
|
||||
bool(true)
|
||||
NULL
|
||||
bool(true)
|
||||
NULL
|
||||
bool(true)
|
||||
NULL
|
||||
bool(true)
|
||||
NULL
|
||||
HipHop Warning: %a
|
||||
bool(false)
|
||||
Done
|
||||
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
ob_start();
|
||||
|
||||
/*
|
||||
* Prototype : bool session_start(void)
|
||||
* Description : Initialize session data
|
||||
* Source code : ext/session/session.c
|
||||
*/
|
||||
|
||||
echo "*** Testing session_start() : variation ***\n";
|
||||
|
||||
var_dump(session_id());
|
||||
var_dump(session_start());
|
||||
var_dump(session_id());
|
||||
var_dump(session_destroy());
|
||||
var_dump(session_id());
|
||||
|
||||
echo "Done";
|
||||
ob_end_flush();
|
||||
?>
|
||||
@@ -0,0 +1,7 @@
|
||||
*** Testing session_start() : variation ***
|
||||
string(0) ""
|
||||
bool(true)
|
||||
string(%d) "%s"
|
||||
bool(true)
|
||||
string(0) ""
|
||||
Done
|
||||
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
ob_start();
|
||||
|
||||
echo "*** Testing session_status() : active, none\n";
|
||||
|
||||
var_dump(PHP_SESSION_NONE != PHP_SESSION_ACTIVE);
|
||||
var_dump(session_status() == PHP_SESSION_NONE);
|
||||
|
||||
session_start();
|
||||
|
||||
var_dump(session_status() == PHP_SESSION_ACTIVE);
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,4 @@
|
||||
*** Testing session_status() : active, none
|
||||
bool(true)
|
||||
bool(true)
|
||||
bool(true)
|
||||
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
ob_start();
|
||||
|
||||
/*
|
||||
* Prototype : void session_unset(void)
|
||||
* Description : Free all session variables
|
||||
* Source code : ext/session/session.c
|
||||
*/
|
||||
|
||||
echo "*** Testing session_unset() : basic functionality ***\n";
|
||||
|
||||
var_dump(session_start());
|
||||
$_SESSION["foo"] = "Hello World!";
|
||||
var_dump($_SESSION);
|
||||
var_dump(session_unset());
|
||||
var_dump($_SESSION);
|
||||
var_dump(session_destroy());
|
||||
var_dump($_SESSION);
|
||||
|
||||
echo "Done";
|
||||
ob_end_flush();
|
||||
?>
|
||||
@@ -0,0 +1,13 @@
|
||||
*** Testing session_unset() : basic functionality ***
|
||||
bool(true)
|
||||
array(1) {
|
||||
["foo"]=>
|
||||
string(12) "Hello World!"
|
||||
}
|
||||
NULL
|
||||
array(0) {
|
||||
}
|
||||
bool(true)
|
||||
array(0) {
|
||||
}
|
||||
Done
|
||||
@@ -0,0 +1,89 @@
|
||||
<?php
|
||||
|
||||
ob_start();
|
||||
|
||||
/*
|
||||
* Prototype : void session_unset(void)
|
||||
* Description : Free all session variables
|
||||
* Source code : ext/session/session.c
|
||||
*/
|
||||
|
||||
echo "*** Testing session_unset() : error functionality ***\n";
|
||||
|
||||
// Get an unset variable
|
||||
$unset_var = 10;
|
||||
unset($unset_var);
|
||||
|
||||
class classA
|
||||
{
|
||||
public function __toString() {
|
||||
return "Hello World!";
|
||||
}
|
||||
}
|
||||
|
||||
$heredoc = <<<EOT
|
||||
Hello World!
|
||||
EOT;
|
||||
|
||||
$fp = fopen(__FILE__, "r");
|
||||
|
||||
// Unexpected values to be passed as arguments
|
||||
$inputs = array(
|
||||
|
||||
// Integer data
|
||||
/*1*/ 0,
|
||||
1,
|
||||
12345,
|
||||
-2345,
|
||||
|
||||
// Float data
|
||||
/*5*/ 10.5,
|
||||
-10.5,
|
||||
12.3456789000e10,
|
||||
12.3456789000E-10,
|
||||
.5,
|
||||
|
||||
// Null data
|
||||
/*10*/ NULL,
|
||||
null,
|
||||
|
||||
// Boolean data
|
||||
/*12*/ true,
|
||||
false,
|
||||
TRUE,
|
||||
FALSE,
|
||||
|
||||
// Empty strings
|
||||
/*16*/ "",
|
||||
'',
|
||||
|
||||
// Invalid string data
|
||||
/*18*/ "Nothing",
|
||||
'Nothing',
|
||||
$heredoc,
|
||||
|
||||
// Object data
|
||||
/*21*/ new classA(),
|
||||
|
||||
// Undefined data
|
||||
/*22*/ @$undefined_var,
|
||||
|
||||
// Unset data
|
||||
/*23*/ @$unset_var,
|
||||
|
||||
// Resource variable
|
||||
/*24*/ $fp
|
||||
);
|
||||
|
||||
|
||||
$iterator = 1;
|
||||
foreach($inputs as $input) {
|
||||
echo "\n-- Iteration $iterator --\n";
|
||||
var_dump(session_unset($input));
|
||||
$iterator++;
|
||||
};
|
||||
|
||||
fclose($fp);
|
||||
echo "Done";
|
||||
ob_end_flush();
|
||||
?>
|
||||
@@ -0,0 +1,74 @@
|
||||
*** Testing session_unset() : error functionality ***
|
||||
|
||||
-- Iteration 1 --
|
||||
bool(false)
|
||||
|
||||
-- Iteration 2 --
|
||||
bool(false)
|
||||
|
||||
-- Iteration 3 --
|
||||
bool(false)
|
||||
|
||||
-- Iteration 4 --
|
||||
bool(false)
|
||||
|
||||
-- Iteration 5 --
|
||||
bool(false)
|
||||
|
||||
-- Iteration 6 --
|
||||
bool(false)
|
||||
|
||||
-- Iteration 7 --
|
||||
bool(false)
|
||||
|
||||
-- Iteration 8 --
|
||||
bool(false)
|
||||
|
||||
-- Iteration 9 --
|
||||
bool(false)
|
||||
|
||||
-- Iteration 10 --
|
||||
bool(false)
|
||||
|
||||
-- Iteration 11 --
|
||||
bool(false)
|
||||
|
||||
-- Iteration 12 --
|
||||
bool(false)
|
||||
|
||||
-- Iteration 13 --
|
||||
bool(false)
|
||||
|
||||
-- Iteration 14 --
|
||||
bool(false)
|
||||
|
||||
-- Iteration 15 --
|
||||
bool(false)
|
||||
|
||||
-- Iteration 16 --
|
||||
bool(false)
|
||||
|
||||
-- Iteration 17 --
|
||||
bool(false)
|
||||
|
||||
-- Iteration 18 --
|
||||
bool(false)
|
||||
|
||||
-- Iteration 19 --
|
||||
bool(false)
|
||||
|
||||
-- Iteration 20 --
|
||||
bool(false)
|
||||
|
||||
-- Iteration 21 --
|
||||
bool(false)
|
||||
|
||||
-- Iteration 22 --
|
||||
bool(false)
|
||||
|
||||
-- Iteration 23 --
|
||||
bool(false)
|
||||
|
||||
-- Iteration 24 --
|
||||
bool(false)
|
||||
Done
|
||||
@@ -0,0 +1,89 @@
|
||||
<?php
|
||||
|
||||
ob_start();
|
||||
|
||||
/*
|
||||
* Prototype : bool session_write_close(void)
|
||||
* Description : Write session data and end session
|
||||
* Source code : ext/session/session.c
|
||||
*/
|
||||
|
||||
echo "*** Testing session_write_close() : error functionality ***\n";
|
||||
|
||||
// Get an unset variable
|
||||
$unset_var = 10;
|
||||
unset($unset_var);
|
||||
|
||||
class classA
|
||||
{
|
||||
public function __toString() {
|
||||
return "Hello World!";
|
||||
}
|
||||
}
|
||||
|
||||
$heredoc = <<<EOT
|
||||
Hello World!
|
||||
EOT;
|
||||
|
||||
$fp = fopen(__FILE__, "r");
|
||||
|
||||
// Unexpected values to be passed as arguments
|
||||
$inputs = array(
|
||||
|
||||
// Integer data
|
||||
/*1*/ 0,
|
||||
1,
|
||||
12345,
|
||||
-2345,
|
||||
|
||||
// Float data
|
||||
/*5*/ 10.5,
|
||||
-10.5,
|
||||
12.3456789000e10,
|
||||
12.3456789000E-10,
|
||||
.5,
|
||||
|
||||
// Null data
|
||||
/*10*/ NULL,
|
||||
null,
|
||||
|
||||
// Boolean data
|
||||
/*12*/ true,
|
||||
false,
|
||||
TRUE,
|
||||
FALSE,
|
||||
|
||||
// Empty strings
|
||||
/*16*/ "",
|
||||
'',
|
||||
|
||||
// Invalid string data
|
||||
/*18*/ "Nothing",
|
||||
'Nothing',
|
||||
$heredoc,
|
||||
|
||||
// Object data
|
||||
/*21*/ new classA(),
|
||||
|
||||
// Undefined data
|
||||
/*22*/ @$undefined_var,
|
||||
|
||||
// Unset data
|
||||
/*23*/ @$unset_var,
|
||||
|
||||
// Resource variable
|
||||
/*24*/ $fp
|
||||
);
|
||||
|
||||
|
||||
$iterator = 1;
|
||||
foreach($inputs as $input) {
|
||||
echo "\n-- Iteration $iterator --\n";
|
||||
var_dump(session_write_close($input));
|
||||
$iterator++;
|
||||
};
|
||||
|
||||
fclose($fp);
|
||||
echo "Done";
|
||||
ob_end_flush();
|
||||
?>
|
||||
@@ -0,0 +1,74 @@
|
||||
*** Testing session_write_close() : error functionality ***
|
||||
|
||||
-- Iteration 1 --
|
||||
NULL
|
||||
|
||||
-- Iteration 2 --
|
||||
NULL
|
||||
|
||||
-- Iteration 3 --
|
||||
NULL
|
||||
|
||||
-- Iteration 4 --
|
||||
NULL
|
||||
|
||||
-- Iteration 5 --
|
||||
NULL
|
||||
|
||||
-- Iteration 6 --
|
||||
NULL
|
||||
|
||||
-- Iteration 7 --
|
||||
NULL
|
||||
|
||||
-- Iteration 8 --
|
||||
NULL
|
||||
|
||||
-- Iteration 9 --
|
||||
NULL
|
||||
|
||||
-- Iteration 10 --
|
||||
NULL
|
||||
|
||||
-- Iteration 11 --
|
||||
NULL
|
||||
|
||||
-- Iteration 12 --
|
||||
NULL
|
||||
|
||||
-- Iteration 13 --
|
||||
NULL
|
||||
|
||||
-- Iteration 14 --
|
||||
NULL
|
||||
|
||||
-- Iteration 15 --
|
||||
NULL
|
||||
|
||||
-- Iteration 16 --
|
||||
NULL
|
||||
|
||||
-- Iteration 17 --
|
||||
NULL
|
||||
|
||||
-- Iteration 18 --
|
||||
NULL
|
||||
|
||||
-- Iteration 19 --
|
||||
NULL
|
||||
|
||||
-- Iteration 20 --
|
||||
NULL
|
||||
|
||||
-- Iteration 21 --
|
||||
NULL
|
||||
|
||||
-- Iteration 22 --
|
||||
NULL
|
||||
|
||||
-- Iteration 23 --
|
||||
NULL
|
||||
|
||||
-- Iteration 24 --
|
||||
NULL
|
||||
Done
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
ob_start();
|
||||
|
||||
/*
|
||||
* Prototype : bool session_write_close(void)
|
||||
* Description : Write session data and end session
|
||||
* Source code : ext/session/session.c
|
||||
*/
|
||||
|
||||
echo "*** Testing session_write_close() : variation ***\n";
|
||||
|
||||
var_dump(session_id("test"));
|
||||
var_dump(session_start());
|
||||
var_dump(session_id());
|
||||
var_dump(session_write_close());
|
||||
var_dump(session_id());
|
||||
var_dump(session_start());
|
||||
var_dump(session_id());
|
||||
var_dump(session_write_close());
|
||||
var_dump(session_id());
|
||||
var_dump(session_start());
|
||||
var_dump(session_id());
|
||||
var_dump(session_write_close());
|
||||
var_dump(session_id());
|
||||
var_dump(session_start());
|
||||
var_dump(session_destroy());
|
||||
|
||||
echo "Done";
|
||||
ob_end_flush();
|
||||
?>
|
||||
@@ -0,0 +1,17 @@
|
||||
*** Testing session_write_close() : variation ***
|
||||
string(0) ""
|
||||
bool(true)
|
||||
string(4) "test"
|
||||
NULL
|
||||
string(4) "test"
|
||||
bool(true)
|
||||
string(4) "test"
|
||||
NULL
|
||||
string(4) "test"
|
||||
bool(true)
|
||||
string(4) "test"
|
||||
NULL
|
||||
string(4) "test"
|
||||
bool(true)
|
||||
bool(true)
|
||||
Done
|
||||
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
ini_set('session.save_handler', 'files');
|
||||
$x = new SessionHandler;
|
||||
$x->open('','');
|
||||
$x->open('','');
|
||||
$x->open('','');
|
||||
$x->open('','');
|
||||
|
||||
print "Done!\n";
|
||||
|
||||
?>
|
||||
@@ -0,0 +1 @@
|
||||
Done!
|
||||
@@ -0,0 +1,4 @@
|
||||
<?php
|
||||
error_reporting(E_ALL);
|
||||
session_unset();
|
||||
print "ok\n";
|
||||
@@ -0,0 +1 @@
|
||||
ok
|
||||
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
session_set_save_handler(
|
||||
array(&$arf, 'open'),
|
||||
array(&$arf, 'close'),
|
||||
array(&$arf, 'read'),
|
||||
array(&$arf, 'write'),
|
||||
array(&$arf, 'destroy'),
|
||||
array(&$arf, 'gc'));
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
@@ -0,0 +1,2 @@
|
||||
HipHop Warning: %a
|
||||
Done
|
||||
@@ -0,0 +1,6 @@
|
||||
<?php
|
||||
session_start();
|
||||
session_regenerate_id();
|
||||
session_destroy();
|
||||
echo "Done\n";
|
||||
?>
|
||||
@@ -0,0 +1 @@
|
||||
Done
|
||||
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
|
||||
DEFINE("SESSION_FILE_PREFIX" ,"session_test_");
|
||||
function open($save_path, $session_name) {
|
||||
global $session_save_path, $name;
|
||||
$session_save_path = $save_path;
|
||||
$name = $session_name;
|
||||
echo "Open [${session_save_path},${session_name}]\n";
|
||||
return true;
|
||||
}
|
||||
|
||||
function close() {
|
||||
global $session_save_path, $name;
|
||||
echo "Close [${session_save_path},${name}]\n";
|
||||
return true;
|
||||
}
|
||||
|
||||
function read($id) {
|
||||
global $session_save_path, $name, $session_id;
|
||||
$session_id = $id;
|
||||
echo "Read [${session_save_path},${id}]\n";
|
||||
$session_file = "$session_save_path/".SESSION_FILE_PREFIX.$id;
|
||||
return (string) @file_get_contents($session_file);
|
||||
}
|
||||
|
||||
function write($id, $session_data) {
|
||||
global $session_save_path, $name, $session_id;
|
||||
$session_id = $id;
|
||||
echo "Write [${session_save_path},${id},${session_data}]\n";
|
||||
$session_file = "$session_save_path/".SESSION_FILE_PREFIX.$id;
|
||||
if ($fp = fopen($session_file, "w")) {
|
||||
$return = fwrite($fp, $session_data);
|
||||
fclose($fp);
|
||||
return $return;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function destroy($id) {
|
||||
global $session_save_path, $name;
|
||||
echo "Destroy [${session_save_path},${id}]\n";
|
||||
$session_file = "$session_save_path/".SESSION_FILE_PREFIX.$id;
|
||||
return unlink($session_file);
|
||||
}
|
||||
|
||||
function gc($maxlifetime) {
|
||||
global $session_save_path, $name;
|
||||
$directory = opendir($session_save_path."/");
|
||||
$length = strlen(SESSION_FILE_PREFIX);
|
||||
while (($file = readdir($directory)) !== FALSE) {
|
||||
$qualified = ($session_save_path."/".$file);
|
||||
if (is_file($qualified) === TRUE) {
|
||||
if (substr($file, 0, $length) === SESSION_FILE_PREFIX) {
|
||||
unlink($qualified);
|
||||
}
|
||||
}
|
||||
}
|
||||
closedir($directory);
|
||||
return true;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
ob_start();
|
||||
|
||||
/*
|
||||
* Prototype : int session_cache_expire([int $new_cache_expire])
|
||||
* Description : Return current cache expire
|
||||
* Source code : ext/session/session.c
|
||||
*/
|
||||
|
||||
echo "*** Testing session_cache_expire() : basic functionality ***\n";
|
||||
|
||||
var_dump(session_cache_expire());
|
||||
var_dump(session_cache_expire(1234567890));
|
||||
var_dump(session_cache_expire(180));
|
||||
var_dump(session_start());
|
||||
var_dump(session_cache_expire());
|
||||
var_dump(session_destroy());
|
||||
var_dump(session_cache_expire());
|
||||
|
||||
echo "Done";
|
||||
ob_end_flush();
|
||||
?>
|
||||
Alguns arquivos não foram exibidos porque demasiados arquivos foram alterados neste diff Mostrar Mais
Referência em uma Nova Issue
Bloquear um usuário