1--TEST-- 2Test session_create_id() function : basic functionality 3--INI-- 4session.save_handler=files 5session.sid_length=32 6--SKIPIF-- 7<?php include('skipif.inc'); ?> 8--FILE-- 9<?php 10 11ob_start(); 12 13echo "*** Testing session_create_id() : basic functionality ***\n"; 14 15// No session 16var_dump(session_create_id()); 17var_dump(session_create_id('ABCD')); 18 19ini_set('session.use_strict_mode', true); 20$sid = session_create_id('XYZ'); 21var_dump($sid); 22var_dump(session_id($sid)); 23session_start(); 24var_dump(session_id()); 25var_dump(session_id() === $sid); 26session_destroy(); 27 28ini_set('session.use_strict_mode', false); 29$sid = session_create_id('XYZ'); 30var_dump($sid); 31var_dump(session_id($sid)); 32session_start(); 33var_dump(session_id()); 34var_dump(session_id() === $sid); 35session_destroy(); 36 37echo "Done"; 38ob_end_flush(); 39?> 40--EXPECTF-- 41*** Testing session_create_id() : basic functionality *** 42string(32) "%s" 43string(36) "ABCD%s" 44string(35) "XYZ%s" 45string(0) "" 46string(32) "%s" 47bool(false) 48string(35) "XYZ%s" 49string(0) "" 50string(35) "XYZ%s" 51bool(true) 52Done 53