--TEST-- Test session_create_id() function : invalid prefix --INI-- session.save_handler=files session.sid_length=32 --EXTENSIONS-- session --SKIPIF-- --FILE-- getMessage() . "\n"; } try { var_dump(session_create_id("AB\0CD")); } catch (Throwable $e) { echo $e::class . ': ' . $e->getMessage() . "\n"; } ?> Done --EXPECTF-- Warning: session_create_id(): Prefix cannot contain special characters. Only the A-Z, a-z, 0-9, "-", and "," characters are allowed in %s on line %d bool(false) Warning: session_create_id(): Prefix cannot contain special characters. Only the A-Z, a-z, 0-9, "-", and "," characters are allowed in %s on line %d bool(false) ValueError: session_create_id(): Argument #1 ($prefix) cannot be longer than 256 characters ValueError: session_create_id(): Argument #1 ($prefix) must not contain any null bytes Done