| 
        php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits             
             [2008-04-04 08:10 UTC] pierre dot php at gmail dot com
  [2008-04-12 12:23 UTC] Jared dot Williams1 at ntlworld dot com
  [2008-04-12 13:10 UTC] pierre dot php at gmail dot com
  [2013-02-18 00:35 UTC] pecl-dev at lists dot php dot net
  | 
    |||||||||||||||||||||||||||
            
                 
                Copyright © 2001-2025 The PHP GroupAll rights reserved.  | 
        Last updated: Tue Nov 04 02:00:01 2025 UTC | 
Description: ------------ It's common practice to combine several values into a single cookie. But there is no method of validating each of the values individually. So proposing something along the lines of... $values = array( 'expires' => $_SERVER['REQUEST_TIME'] + 3600, 'value' => 'foo'; ); setcookie('comp', http_build_query($values,'', '&')); And to read & filter... $v = filter_input(INPUT_COOKIE, 'comp', FILTER_VALIDATE_QUERY, array( 'expires' => FILTER_VALIDATE_INT, 'value' => ... ));