1--TEST-- 2Bug #31454 (session_set_save_handler crashes PHP when supplied non-existent object ref) 3--EXTENSIONS-- 4session 5--FILE-- 6<?php 7 8try { 9 session_set_save_handler( 10 array(&$arf, 'open'), 11 array(&$arf, 'close'), 12 array(&$arf, 'read'), 13 array(&$arf, 'write'), 14 array(&$arf, 'destroy'), 15 array(&$arf, 'gc') 16 ); 17} catch (TypeError $exception) { 18 echo $exception->getMessage() . "\n"; 19} 20 21echo "Done\n"; 22?> 23--EXPECTF-- 24Deprecated: session_set_save_handler(): Providing individual callbacks instead of an object implementing SessionHandlerInterface is deprecated in %s on line %d 25session_set_save_handler(): Argument #1 ($open) must be a valid callback, first array member is not a valid class name or object 26Done 27