1--TEST-- 2Test session_encode() function : variation 3--EXTENSIONS-- 4session 5--SKIPIF-- 6<?php include('skipif.inc'); ?> 7--FILE-- 8<?php 9 10ob_start(); 11 12echo "*** Testing session_encode() : variation ***\n"; 13 14var_dump(session_start()); 15$_SESSION[] = 1234567890; 16var_dump(session_encode()); 17var_dump(session_destroy()); 18var_dump(session_start()); 19$_SESSION[1234567890] = "Hello World!"; 20var_dump(session_encode()); 21var_dump(session_destroy()); 22var_dump(session_start()); 23$_SESSION[-1234567890] = 1234567890; 24var_dump(session_encode()); 25var_dump(session_destroy()); 26 27echo "Done"; 28ob_end_flush(); 29?> 30--EXPECTF-- 31*** Testing session_encode() : variation *** 32bool(true) 33 34Warning: session_encode(): Skipping numeric key 0 in %s on line %d 35bool(false) 36bool(true) 37bool(true) 38 39Warning: session_encode(): Skipping numeric key 1234567890 in %s on line %d 40bool(false) 41bool(true) 42bool(true) 43 44Warning: session_encode(): Skipping numeric key -1234567890 in %s on line %d 45bool(false) 46bool(true) 47Done 48