Loading ...
Sorry, an error occurred while loading the content.

difference b/w $HTTP_COOKIE_VARS['V']; & $_COOKIE['V'];

Expand Messages
  • Saleha Latif
    Asalamoalikum all, I hope all of you are in good health. Can any1 tell me whats difference b/w  $HTTP_COOKIE_VARS[ V ];   &   $_COOKIE[ V ]; Thanks in
    Message 1 of 3 , Jun 1, 2011
    • 0 Attachment
      Asalamoalikum all,

      I hope all of you are in good health.
      Can any1 tell me whats difference b/w 
      $HTTP_COOKIE_VARS['V'];   &   $_COOKIE['V'];
      Thanks in advance,

      Regards
      Saleha

    • shiplu
      ... All the HTTP_*_VARS are changed to _*. Here * stands for GET,POST,ENV,SERVER,COOKIE. if HTTP_*_VARS is not availabel in your system _* will be
      Message 2 of 3 , Jun 1, 2011
      • 0 Attachment
        On Wed, Jun 1, 2011 at 5:59 PM, Saleha Latif <salehalatif@...> wrote:


        Asalamoalikum all,

        I hope all of you are in good health.
        Can any1 tell me whats difference b/w 
        $HTTP_COOKIE_VARS['V'];   &   $_COOKIE['V'];


        All the   HTTP_*_VARS are changed to   _*. Here * stands for GET,POST,ENV,SERVER,COOKIE.

        if  HTTP_*_VARS   is not availabel in your system _* will be available.
        Both are same. 

        So to answer your question, there is not difference. 
      • ymnoor21
        Saleha, $HTTP_COOKIE_VARS was used before PHP 4.1 and $_COOKIE is used after PHP 4.1 and it is a superglobal variable. Unless you are using PHP 4.1 or less i
        Message 3 of 3 , Jun 1, 2011
        • 0 Attachment
          Saleha,
          $HTTP_COOKIE_VARS was used before PHP 4.1 and
          $_COOKIE is used after PHP 4.1 and it is a superglobal variable.

          Unless you are using PHP 4.1 or less i strongly encourage you to use the latest version of PHP predefined variable as the old naming conventions has been depreciated.

          http://php.net/manual/en/reserved.variables.cookies.php

          And if you are unsure which PHP version you should move on, then check your production server version of PHP and do a clone setup on your local. Otherwise if you want to just practice PHP in your local, i'd prefer latest stable version. You could find it here:

          http://www.php.net/downloads.php

          Thanks
          Yamin

          --- In phpexperts@yahoogroups.com, Saleha Latif <salehalatif@...> wrote:
          >
          > Asalamoalikum all,
          >
          > I hope all of you are in good health.
          > Can any1 tell me whats difference b/w 
          >
          > $HTTP_COOKIE_VARS['V'];   &   $_COOKIE['V'];
          > Thanks in advance,
          >
          > Regards
          > Saleha
          >
        Your message has been successfully submitted and would be delivered to recipients shortly.