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

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

WBOY
Release: 2016-06-23 14:10:16
Original
868 people have browsed it

pack函数怎么用啊?


回复讨论(解决方案)

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

与 chr(1) 等价

source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template