1--TEST-- 2bug compatibility: unset($c) with enabled register_globals 3--SKIPIF-- 4<?php include('skipif.inc'); ?> 5--INI-- 6register_long_arrays=1 7session.use_cookies=0 8session.cache_limiter= 9register_globals=1 10session.bug_compat_42=1 11session.serialize_handler=php 12session.save_handler=files 13precision=14 14--FILE-- 15<?php 16error_reporting(E_ALL); 17 18session_id("abtest"); 19 20### Phase 1 cleanup 21session_start(); 22session_destroy(); 23 24### Phase 2 $HTTP_SESSION_VARS["c"] does not contain any value 25session_id("abtest"); 26session_register("c"); 27unset($c); 28$c = 3.14; 29session_write_close(); 30unset($HTTP_SESSION_VARS); 31unset($c); 32 33### Phase 3 $HTTP_SESSION_VARS["c"] is set 34session_start(); 35var_dump($c); 36var_dump($HTTP_SESSION_VARS); 37unset($c); 38$c = 2.78; 39 40session_write_close(); 41unset($HTTP_SESSION_VARS); 42unset($c); 43 44### Phase 4 final 45 46session_start(); 47var_dump($c); 48var_dump($HTTP_SESSION_VARS); 49 50session_destroy(); 51?> 52--EXPECTF-- 53Deprecated: Directive 'register_globals' is deprecated in PHP 5.3 and greater in Unknown on line 0 54 55Deprecated: Directive 'register_long_arrays' is deprecated in PHP 5.3 and greater in Unknown on line 0 56 57Deprecated: Function session_register() is deprecated in %s on line %d 58float(3.14) 59array(1) { 60 ["c"]=> 61 &float(3.14) 62} 63float(3.14) 64array(1) { 65 ["c"]=> 66 &float(3.14) 67} 68