Home >Backend Development >PHP Tutorial >php中怎样将1变成一个字节的Integer类型啊?

php中怎样将1变成一个字节的Integer类型啊?

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-23 14:10:16895browse

pack函数怎么用啊?


回复讨论(解决方案)

prck('c', 1) 单字节有符号整数
prck('C', 1) 单字节无符号整数

与 chr(1) 等价

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