位置: 编程技术 - 正文

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)

  • 所得税费用调增分录
  • 多交企业所得税可以放弃退税吗
  • 怎么找回丢失的手机号
  • 不在经营范围内开票会受到什么惩罚
  • 季度不超过30万是含税还是不含税
  • 所有者权益是
  • 发票一年不能开超多少才不扣税费
  • 电子承兑银行承兑
  • 实收资本未实缴到位,是否缴纳印花税
  • 每股收益的无差别点小于息税前利润选择什么筹资方式
  • 出售二手车税收优惠
  • 装修发票是什么发票
  • 民办中小学收费新政策
  • 建筑发票怎么抵税
  • 进项税额转出凭证怎么做
  • 发票显示上传失败
  • 小微企业差旅费可以税前扣除吗
  • 农产品进项税抵扣计算例题
  • 发票冲红可以冲红数量不变金额减少
  • 怎样才能防止臭虫在卧室里呢
  • 人力资源服务收入计入什么科目
  • 如何在win7系统中查看电脑基本信息
  • 物业公司监控一般保留多久
  • 电脑维修会不会对电脑有影响
  • PHP:pg_prepare()的用法_PostgreSQL函数
  • 生育津贴差额账务处理
  • 分享php守护进程失败
  • 申请一般纳税人流程
  • 计提消费税的会计科目
  • 销售方运输发票怎么做账?
  • 只有进项税没有销项
  • 小规模纳税人印花税减半征收政策
  • 出口免税税务备案流程图
  • css 3有哪些新特性
  • 融资租赁租金计算公式有残值
  • 连带责任担保会被拘留吗
  • 研发费用属于什么成本
  • 应付职工薪酬相关认定有哪些
  • java基础运算符有哪些
  • 织梦怎么套模板
  • 税务已注销工商如何注销
  • 现金日记账应采用的格式为订本式
  • 三免三减半如何申报
  • 金税盘税务申报流程
  • 物业管理费发票备注栏要求
  • 计提折旧是哪个月的
  • 职工基本医疗保险怎么用
  • 销售返现如何做账务处理
  • 存货报废计入
  • 单位临时账户可以取现吗
  • 转账支票需要知道开户行吗
  • 对于审核后的凭证可直接修改对吗
  • ca证书费用计入什么科目
  • 买别人的银行卡是啥罪
  • 商业资本金
  • 货币资金核算制度是什么
  • 在sql server中关于数据库的说法正确的是
  • win10怎么关闭防火系统
  • 如何创建虚拟硬盘
  • 盗版win7升级win10
  • 2021年win10累积更新
  • centos简介
  • win10开机显示recover
  • windows定位
  • Screen.sleepTimeout=SleepTimeOut.NeverSleep 禁止屏幕锁屏
  • unity ui坐标
  • unity3d脚本参考手册
  • Python IDE PyCharm的基本快捷键和配置简介
  • JavaScript事件类型中UI事件详解
  • 大学的python选修课好学吗
  • python中列表和元组的典型案例
  • android 5.1 WIFI图标上的感叹号及其解决办法
  • 大征期和小征期的区别
  • 税务总局和税务局区别
  • 个人所得税代扣代缴手续费返还政策
  • 所得税汇总纳税分配表
  • 重庆经开区属于哪个大区
  • 外经证核销在公司所在地还是在项目所在地
  • 民族贸易产生的原因
  • 坡面台阶
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

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

    友情链接: 武汉网站建设