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-- Bug #68063 (Empty session IDs do still start sessions) --EXTENSIONS-- session --S..

Decoded Output download

--TEST--
Bug #68063 (Empty session IDs do still start sessions)
--EXTENSIONS--
session
--SKIPIF--
<?php include('skipif.inc'); ?>
--INI--
session.use_strict_mode=0
session.sid_length=40
session.sid_bits_per_character=4
--FILE--
<?php
// Empty session ID may happen by browser bugs

// Could also be set with a cookie like "PHPSESSID=; path=/"
session_id('');

// Start the session with empty string should result in new session ID
var_dump(session_start());

// Returns newly created session ID
var_dump(session_id());
?>
--EXPECTF--
bool(true)
string(40) "%s"

Did this file decode correctly?

Original Code

--TEST--
Bug #68063 (Empty session IDs do still start sessions)
--EXTENSIONS--
session
--SKIPIF--
<?php include('skipif.inc'); ?>
--INI--
session.use_strict_mode=0
session.sid_length=40
session.sid_bits_per_character=4
--FILE--
<?php
// Empty session ID may happen by browser bugs

// Could also be set with a cookie like "PHPSESSID=; path=/"
session_id('');

// Start the session with empty string should result in new session ID
var_dump(session_start());

// Returns newly created session ID
var_dump(session_id());
?>
--EXPECTF--
bool(true)
string(40) "%s"

Function Calls

None

Variables

None

Stats

MD5 c727e428a12b59753c1d88c0f9b9570a
Eval Count 0
Decode Time 92 ms