FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » integer and string what's the difference ?
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: integer and string what's the difference ? [message #175864 is a reply to message #175860] Tue, 01 November 2011 19:07 Go to previous messageGo to previous message
Balazs Nadasdi is currently offline  Balazs Nadasdi
Messages: 7
Registered: November 2011
Karma:
Junior Member
http://www.php.net/manual/en/memcache.set.php
http://www.php.net/manual/en/memcache.get.php

bool Memcache::set ( string $key , mixed $var [, int $flag [, int $expire ]] )
string Memcache::get ( string $key [, int &$flags ] )
array Memcache::get ( array $keys [, array &$flags ] )


If you add an integer based key, PHP convert it into string (get or set).
I think if you are add as array (key list) PHP doesn't convert it into string (each item). But when you try to get a single value (1234) as an integer PHP automatically convert it because the function needs a string.

Difference between Integer and String... In php:
"1234" == 1234 # => true
"1234" === 1234 # => false


I hope, I was able to help you with something (and I don't misunderstand your problem).
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: missing variable
Next Topic: Stats comp.lang.php (last 7 days)
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat Nov 30 23:31:14 GMT 2024

Total time taken to generate the page: 0.04500 seconds