Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
--TEST-- Test session_name() function : variation --INI-- session.save_path= session.name=..
Decoded Output download
--TEST--
Test session_name() function : variation
--INI--
session.save_path=
session.name=PHPSESSID
session.save_handler=files
--EXTENSIONS--
session
--SKIPIF--
<?php include('skipif.inc'); ?>
--FILE--
<?php
ob_start();
echo "*** Testing session_name() : variation ***
";
var_dump(session_name(""));
var_dump(session_start());
var_dump(session_name());
var_dump(session_destroy());
var_dump(session_name());
var_dump(session_name(" "));
var_dump(session_start());
var_dump(session_name());
var_dump(session_destroy());
var_dump(session_name());
var_dump(session_name(""));
var_dump(session_start());
var_dump(session_name());
var_dump(session_destroy());
var_dump(session_name());
echo "Done";
ob_end_flush();
?>
--EXPECTF--
*** Testing session_name() : variation ***
string(9) "PHPSESSID"
bool(true)
string(9) "PHPSESSID"
bool(true)
string(9) "PHPSESSID"
string(9) "PHPSESSID"
Warning: session_start(): session.name cannot contain any of the following '=,;.[
' in %s on line %d
bool(true)
string(1) " "
bool(true)
string(1) " "
Warning: session_name(): session.name "" cannot be numeric or empty in %s on line %d
string(1) " "
Warning: session_start(): session.name cannot contain any of the following '=,;.[
' in %s on line %d
bool(true)
string(1) " "
bool(true)
string(1) " "
Done
Did this file decode correctly?
Original Code
--TEST--
Test session_name() function : variation
--INI--
session.save_path=
session.name=PHPSESSID
session.save_handler=files
--EXTENSIONS--
session
--SKIPIF--
<?php include('skipif.inc'); ?>
--FILE--
<?php
ob_start();
echo "*** Testing session_name() : variation ***\n";
var_dump(session_name("\0"));
var_dump(session_start());
var_dump(session_name());
var_dump(session_destroy());
var_dump(session_name());
var_dump(session_name("\t"));
var_dump(session_start());
var_dump(session_name());
var_dump(session_destroy());
var_dump(session_name());
var_dump(session_name(""));
var_dump(session_start());
var_dump(session_name());
var_dump(session_destroy());
var_dump(session_name());
echo "Done";
ob_end_flush();
?>
--EXPECTF--
*** Testing session_name() : variation ***
string(9) "PHPSESSID"
bool(true)
string(9) "PHPSESSID"
bool(true)
string(9) "PHPSESSID"
string(9) "PHPSESSID"
Warning: session_start(): session.name cannot contain any of the following '=,;.[ \t\r\n\013\014' in %s on line %d
bool(true)
string(1) " "
bool(true)
string(1) " "
Warning: session_name(): session.name "" cannot be numeric or empty in %s on line %d
string(1) " "
Warning: session_start(): session.name cannot contain any of the following '=,;.[ \t\r\n\013\014' in %s on line %d
bool(true)
string(1) " "
bool(true)
string(1) " "
Done
Function Calls
None |
Stats
MD5 | f961bf03c609d587c50977b153c82b17 |
Eval Count | 0 |
Decode Time | 113 ms |