HTTP Cookies are not a feature of PHP, nor a feature of Javascript : those are just programming languages that allow a developper to manipulate them.

The biggest difference between JS and PHP is that :

Javascript runs on the client side
PHP runs on the server side

But cookies are still the same : they are defined as a standard — see RFC 2965.

Still, note that modern browsers implement cookies that are not accessible from Javascript (see the httponly option of setcookie) — which means that, depending on the browser, and the way a cookie was set, it might not be accessible from Javascript.

This is a security measure — and is not a difference between “js cookies” and “php cookies” : it’s just a property of some cookies.

Create session cookie

  $.cookie('CookieName', 'Value');

Cookie that Expires in 7 days

 $.cookie('CookieName', 'Value', { expires: 7 });

Create cookie valid across entire site:

  $.cookie('CookieName', 'Value', { expires: 7, path: '/' });

Read value cookie:

 $.cookie('the_cookie'); // => "the_value"
 $.cookie('not_existing'); // => null

Delete cookie:

 // Returns true when cookie was found, false when no cookie was found...
 $.removeCookie('the_cookie');

 // Same path as when the cookie was written...
 $.removeCookie('the_cookie', { path: '/' });