Home >Backend Development >PHP Tutorial >Data reading problem of memcached in java and php

Data reading problem of memcached in java and php

巴扎黑
巴扎黑Original
2016-11-12 15:24:40977browse

I have been using JAVA to read and write memcached without any problems
When I connected with the PHP system today, I could not get the elements stored by PHP, but PHP got the elements stored by JAVA.
Finally, I installed MemAdmin and checked. The Flags of the elements stored in PHP are all 0, while the Flags of the character type stored in Java using the class library are 32. The problem is solved after letting PHP modify the stored Flags.
Comes with the following types of Flags:

Java code

public static final int MARKER_BYTE             = 1;  
public static final int MARKER_BOOLEAN          = 8192;  
public static final int MARKER_INTEGER          = 4;  
public static final int MARKER_LONG             = 16384;  
public static final int MARKER_CHARACTER        = 16;  
public static final int MARKER_STRING           = 32;  
public static final int MARKER_STRINGBUFFER     = 64;  
public static final int MARKER_FLOAT            = 128;  
public static final int MARKER_SHORT            = 256;  
public static final int MARKER_DOUBLE           = 512;  
public static final int MARKER_DATE             = 1024;  
public static final int MARKER_STRINGBUILDER    = 2048;  
public static final int MARKER_BYTEARR          = 4096;


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:Revisiting PHPNext article:Revisiting PHP