位置: 编程技术 - 正文

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次后如何开票
  • 附加税费申报表出不来数据
  • 低值易耗品残料有哪些
  • 公司注销时有大额应付款如何做账务处理合适?
  • 个体工商户不经营会自动注销吗
  • 补助属不属于工资
  • 政府给的专款专用发票
  • 一般纳税人进项发票认证操作流程
  • 月初缴纳的保险是当月的吗
  • 企业破产清算怎么做账务处理实务工作
  • 年会费用的会计分录
  • 以前年度的税务怎么查
  • 以公允价值模式后续计量的投资性房地产无须计提减值
  • 医疗器械 税点
  • 物业管理费属于应付账款吗
  • excel自动计算增值税
  • 超市里销售
  • 失控发票进项转出申报
  • 出口报关和不报关的区别
  • 500人的公司财务部几人
  • 公司低价处理旧汽车涉税账务处理
  • 先计提社保还是先计提工资
  • 如何修改windows11开机密码
  • 高新技术企业研究开发费用加计扣除
  • 公司增资扩股需要考略公司资产吗
  • 建筑行业收到工程款会计分录
  • 前端实现拖拽拉动图片
  • nvidia gpu系列
  • 开出发票单位收到款项如何平账?
  • os x 10.10 yosemite自动纠正怎么关?os x yosemite自动纠正功能关闭教程
  • uniapp自定义tabbar功能
  • 谷歌插件下载网址
  • 小规模场地租赁费税率是1还是5
  • javascript基础编程
  • 简单的php文件
  • 增值税出口税
  • 报废的固定资产清理的净损失计入营业外支出
  • php 上传
  • pythonproperty
  • 只要有销售收入就能赚钱
  • 个人银行存款要手续费吗
  • 固定资产是否可调剂
  • 递延收入怎么做账
  • 会计的三个结转是什么
  • 废品损失是什么要素
  • 营业利润包括资本化支出吗
  • 装饰公司收到的礼品
  • 企业固定资产内部控制风险防范体系的构建原则
  • 资金结存属于资产类吗
  • 计提折旧的固定资产有哪些
  • 银行业应收票据分析
  • mysql如何输入数据
  • Navicat for MySQL定时备份数据库及数据恢复详解
  • xp系统登录界面登录管理员账号
  • xbox无法连接无线网络
  • wp7.8升级wp8
  • linux搭建l2tp服务器
  • 怎么解决xp不能安装软件
  • 如何卸载centos7
  • win7系统使用ituns设置iphone铃声图文教程
  • win8.1截图工具快捷键
  • input submit、button和回车键提交数据详解
  • firefox浏览器标识ua
  • android新手入门
  • linux 网卡 配置
  • jquery怎么给文本框赋值
  • u3d unity3d
  • html加载条代码
  • 轻松实现的英文
  • 安卓手机管家删除的照片怎么恢复
  • android获取屏幕内容
  • 如何理解改革创新是时代要求
  • 小汽车都交消费税吗
  • 天津环保网站官网
  • 个人股权转让是否增值了怎么判断
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

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

    友情链接: 武汉网站建设