1--TEST-- 2Test basic function : variation2 3--INI-- 4session.use_strict_mode=1 5session.save_handler=files 6session.hash_bits_per_character=4 7session.gc_probability=1 8session.gc_divisor=1000 9session.gc_maxlifetime=300 10session.save_path= 11session.sid_length=32 12session.name=PHPSESSID 13--SKIPIF-- 14<?php include('skipif.inc'); ?> 15--FILE-- 16<?php 17 18ob_start(); 19 20echo "*** Testing basic session functionality : variation2 ***\n"; 21 22$session_id = 'testid'; 23session_id($session_id); 24$path = __DIR__; 25var_dump(session_save_path($path)); 26 27echo "*** Without lazy_write ***\n"; 28var_dump(session_id($session_id)); 29var_dump(session_start(['lazy_write'=>FALSE])); 30$session_id_new1 = session_id(); 31var_dump($session_id_new1 !== $session_id); 32var_dump(session_write_close()); 33var_dump(session_id()); 34 35echo "*** With lazy_write ***\n"; 36var_dump(session_id($session_id)); 37var_dump(session_start(['lazy_write'=>TRUE])); 38$session_id_new2 = session_id(); 39var_dump($session_id_new1 !== $session_id_new2); 40var_dump(session_commit()); 41var_dump(session_id()); 42 43echo "*** Cleanup ***\n"; 44ini_set('session.use_strict_mode',0); 45var_dump(session_id($session_id_new1)); 46var_dump(session_start()); 47var_dump(session_destroy()); 48var_dump(session_id($session_id_new2)); 49var_dump(session_start()); 50var_dump(session_destroy()); 51 52ob_end_flush(); 53?> 54--EXPECTF-- 55*** Testing basic session functionality : variation2 *** 56string(0) "" 57*** Without lazy_write *** 58string(6) "testid" 59bool(true) 60bool(true) 61bool(true) 62string(32) "%s" 63*** With lazy_write *** 64string(32) "%s" 65bool(true) 66bool(true) 67bool(true) 68string(32) "%s" 69*** Cleanup *** 70string(32) "%s" 71bool(true) 72bool(true) 73string(0) "" 74bool(true) 75bool(true) 76