位置: 编程技术 - 正文

PHP:unpack()的用法_misc函数(php unset())

编辑:rootadmin
unpack

推荐整理分享PHP:unpack()的用法_misc函数(php unset()),希望有所帮助,仅作参考,欢迎阅读内容。

文章相关热门搜索词:php_uname,php uniqid(),php unpack,php_uname,php unserialize,phpunit,php unset(),php uniqid(),内容如对您有帮助,希望把文章链接给更多的朋友!

(PHP 4, PHP 5)

unpack — Unpack data from binary string

说明 array unpack ( string $format , string $data )

Unpacks from a binary string into an array according to the given format.

The unpacked data is stored in an associative array. To accomplish this you have to name the different format codes and separate them by a slash /. If a repeater argument is present, then each of the array keys will have a sequence number behind the given name.

参数

format

See pack() for an explanation of the format codes.

data

The packed data.

返回值

Returns an associative array containing unpacked elements of binary string.

更新日志

版本 说明 5.5.0

Changes were made to bring this function into line with Perl:

The "a" code now retains trailing NULL bytes.

The "A" code now strips all trailing ASCII whitespace (spaces, tabs, newlines, carriage returns, and NULL bytes).

PHP:unpack()的用法_misc函数(php unset())

The "Z" code was added for NULL-padded strings, and removes trailing NULL bytes.

范例

Example #1 unpack() example

<?php$binarydata="xxxa0x";$array=unpack("cchars/nint",$binarydata);?>

The resulting array will contain the entries "chars" with value 4 and "int" with .

Example #2 unpack() example with a repeater

<?php$binarydata="xxxa0x";$array=unpack("c2chars/nint",$binarydata);?>

The resulting array will contain the entries "chars1", "chars2" and "int".

注释 Caution

Note that PHP internally stores integral values as signed. If you unpack a large unsigned long and it is of the same size as PHP internally stored values the result will be a negative number even though unsigned unpacking was specified.

Caution

Be aware that if you do not name an element, an empty string is used. If you do not name more than one element, this means that some data is overwritten as the keys are the same such as in:

Example #3 unpack() example with unnamed keys

<?php$binarydata="xxxxa0";$array=unpack("c2/n",$binarydata);var_dump($array);?>

The resulting array will contain the entries "1" with value and "2" with . The first value from the c specifier is overwritten by the first value from the n specifier.

参见

pack() - Pack data into binary string

PHP:usleep()的用法_misc函数 usleep(PHP4,PHP5)usleep以指定的微秒数延迟执行说明voidusleep(int$micro_seconds)以指定的微秒数延缓程序的执行。参数micro_seconds暂停的时间以微秒计。1微秒(micro

PHP:time_nanosleep()的用法_misc函数 time_nanosleep(PHP5)time_nanosleep延缓执行若干秒和纳秒说明mixedtime_nanosleep(int$seconds,int$nanoseconds)程序延缓执行指定数量的seconds和nanoseconds。参数seconds必须是一

PHP:time_sleep_until()的用法_misc函数 time_sleep_until(PHP5=5.1.0)time_sleep_until使脚本睡眠到指定的时间为止。说明booltime_sleep_until(float$timestamp)使脚本睡眠到指定的timestamp。参数timestamp将脚本唤醒

标签: php unset()

本文链接地址:https://www.jiuchutong.com/biancheng/280621.html 转载请保留说明!

上一篇:PHP:uniqid()的用法_misc函数(phpunicode)

下一篇:PHP:usleep()的用法_misc函数(php lee)

  • 企业所得税税前扣除管理办法
  • 年度应纳税所得额计算公式
  • 异地预缴怎么做账
  • 豆粕适用税率
  • 房地产开发企业土地增值税清算
  • 会计账簿账目核对要求包括哪些
  • 商业承兑汇票可以提前承兑吗
  • 固定资产转在建工程
  • 增值税没达到起征标准
  • 案例分析:如何缓解幼儿在幼儿园的焦虑情绪
  • 可以自行设计的软件
  • 生产型企业一般会有哪些外来文件
  • 会计对帐是银行账户吗
  • 个人所得税工资薪金税率表
  • 企业购入存货分录
  • 资产减值损失能否在所得税税前扣除
  • 未开票收入计入预收账款
  • 返利冲减销售收入还是进费用
  • 产品配件属于什么会计科目
  • 应收冲预收是什么意思
  • 亏损计提递延
  • 怎么访问海康硬盘录像机
  • 什么是电子发票图片
  • php获取用户名
  • 建筑业成本率是多少
  • 收购农产品进项税抵扣税率是多少
  • 工业企业采购部工作职责
  • php二维码解码
  • 无形资产使用寿命的复核
  • 前端后端选择
  • 基于php的系统
  • 带息应收票据会计处理
  • 对公打款打错了
  • 用php写的一个冒号的句子
  • php判断https
  • 工程完工后的质量抽检不合格怎么办
  • Vue项目打包
  • 数据库查询框架
  • php读取excel数据
  • 总纳税与就地纳税区别
  • 长期待摊费用账务处理
  • 年金现值系数和年金终值系数的公式
  • 递延所得税资产借贷方向
  • ubuntu下安装windows
  • mongodb分片技术
  • 我想问一下移动
  • 建筑业预缴增值税计算公式
  • 实收资本与资本公积之和小于实收资本
  • 本月开发票下月收款
  • 去年亏损今年盈利能分红吗
  • 无法收回离职员工合法吗
  • 个税起征点调整最新消息
  • 合并报表时抵消内部交易包含的未实现损益的影响包括
  • 房屋租赁税按什么收
  • 现金流量表是指现金还是银行存款
  • 可供出售金融资产和交易性金融资产
  • 个人向对公账户付款有风险吗
  • 现金支付的范围包括
  • 租赁费属于酌量性固定成本
  • 存货与总账对账
  • mysql的分区表
  • 数据库 mysql
  • win8系统运行慢怎么办
  • .exe是什么软件
  • ipguard关闭进程
  • win7如何运行命令
  • win7如何设置关机快捷方式
  • [置顶]bilinovel
  • 批处理中如何判断当前文件中是否存在一个子目录
  • (cocs2dx)二、 利用Eclipse编译apk应用
  • angular实战
  • 基于javascript的论文题目
  • python类怎么用
  • javascript playground
  • javascript图片
  • android数据存储与访问的方式有
  • 公司0申报怎么申报视频
  • 得之于社会要回馈社会的感想
  • 融资租赁公司购入老旧租赁资产会计处理
  • 深圳交警的微博
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

    网站地图: 企业信息 工商信息 财税知识 网络常识 编程技术

    友情链接: 武汉网站建设