1--TEST-- 2Test basic function : variation1 3--INI-- 4session.use_strict_mode=0 5session.save_handler=files 6session.gc_probability=1 7session.gc_divisor=1000 8session.gc_maxlifetime=300 9session.save_path= 10session.name=PHPSESSID 11--EXTENSIONS-- 12session 13--SKIPIF-- 14<?php include('skipif.inc'); ?> 15--FILE-- 16<?php 17 18ob_start(); 19 20echo "*** Testing basic session functionality : variation1 ***\n"; 21 22$session_id = 'session-basic1'; 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)); 29$config = ['lazy_write'=>FALSE]; 30var_dump(session_start($config)); 31var_dump($config); 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])); 38var_dump(session_commit()); 39var_dump(session_id()); 40 41echo "*** Cleanup ***\n"; 42var_dump(session_id($session_id)); 43var_dump(session_start()); 44var_dump(session_destroy()); 45 46ob_end_flush(); 47?> 48--EXPECT-- 49*** Testing basic session functionality : variation1 *** 50string(0) "" 51*** Without lazy_write *** 52string(14) "session-basic1" 53bool(true) 54array(1) { 55 ["lazy_write"]=> 56 bool(false) 57} 58bool(true) 59string(14) "session-basic1" 60*** With lazy_write *** 61string(14) "session-basic1" 62bool(true) 63bool(true) 64string(14) "session-basic1" 65*** Cleanup *** 66string(14) "session-basic1" 67bool(true) 68bool(true) 69