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 #175865 is a reply to message #175860] Tue, 01 November 2011 19:23 Go to previous messageGo to previous message
Denis McMahon is currently offline  Denis McMahon
Messages: 634
Registered: September 2010
Karma:
Senior Member
On Tue, 01 Nov 2011 06:19:01 -0700, gaoqiang wrote:

> line 13: when using array_push($keys,"1234"), it works fine. but not
> with 1234.

Memcached::set() and Memcached::get() both look for a string as the first
(ie key) parameter.

public bool Memcached::set ( string $key , mixed $value [, int
$expiration ] )

public mixed Memcached::get ( string $key [, callback $cache_cb [, float &
$cas_token ]] )

This suggests to me that keys must be strings, and so an array of keys
must be an array of string values. Hence the numeric value 1234 may not
be a valid key value even if it's in an array.

Rgds

Denis McMahon
[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: Thu Nov 28 04:45:07 GMT 2024

Total time taken to generate the page: 0.04060 seconds